Looking for suggestions on how to solve an EJB application design problem.

An EJB app I am building (using JBoss, Linux, Apache, Tomcat, and MySQL with Servlets 
and JSPs) needs templates for letters and emails that will be sent to customers.

These templates will contain "boilerplate" and actual data values for each customer 
will be inserted when the letter or email is generated while processing an order for 
the customer.

Originally, the templates were just plain text, so I was able to use an HTML form 
Textarea for input and display, storing the templates in varchar database fields. Now, 
however, I need templates that contain HTML, so I can generate HTML format emails and 
letters.

I have run into several problems:

1) Typing HTML code into an HTML form text area seems to cause problems. The tags in 
the templates appear to get confused with the tags in the JSP pages. In effect, I 
would like the contents of the textarea to be treated as <code>.

2) My "Plan B" is to store the HTML templates in files on the web server and just 
store the names of the files in the database. These files are read-only from the 
perspective of the EJB app. But my understanding is that the EJB spec does not allow 
direct access to the file system.

3) "Plan C" is to put the HTML template files in my EAR and use getResourceAsStream, 
but I would like them to be able to FTP new templates to the server dynamically, 
without having to deploy a new EAR.

Can anyone provide insight on how to approach this requirement?

Thanks, Hugh

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.721 / Virus Database: 477 - Release Date: 7/16/2004
_______________________________________________
Juglist mailing list
[EMAIL PROTECTED]
http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to