• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting /resources in a BackedBean to send mails

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
I need to code a "Forgot password" backedbean in JSF2 that sends the password reminder mail. I used to use Freemarker templates for this in my previous Struts2 webapps and want to keep them. I need to access these templates, which I guess /resources/freemarker/ is a good place for them but ¿how can I read them from a [Managed] Backed Bean? I know I can do #{resource['freemarker:myTemplate.ftl']} in a JSF2 xhtml but could now find any method in FacesContext class (or other) to do this.

Thanks for any help/directions (of course, if there is any good practice or just better method to send templated mails in JSF2 applications I'm all ears)
Ignacio
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, actually, I use Velocity, but JSF doesn't really get involved in where Velocity finds its resources. That's all determined by how I configure and invoke Velocity.
 
reply
    Bookmark Topic Watch Topic
  • New Topic