On Fri, 11 May 2001, Pedro E. G�mez wrote:

> 
> Sorry for the confution.
> 
> The idea is other, is something like this:
> 
> The data base have some products information, and i want to send this information to 
>an user, the
> goal is to format the data using an JSP template, and produce a HTML page and send 
>it by email....
> 
> Something like this:
> 
> EJB COMPONENT ---> Get data form the DB.
> |
> |----------------------------> Get the JSP template (Page)
> |
> |-----------------------------> Execute the template with the data
> |
> |-----------------------------> Send the result by email.

*new list member decloaking*
Hello everyone,

Sorry, no can do. The JSP page is not interpreted but instead compiled
into a servlet that must be accessed via HTTP (the web server). What you'd
have to do in that case would be to make an HTTP connection to the web
server which would run the JSP page and produce HTML output.

Unfortunately an EJB is not allowed to open a socket (perhaps you can
grant that permission somehow) so you'd have to do it from outside.

You could write a client that runs outside the EJB container and downloads
the JSP and passes the result an EJB. Either by connecting to a session
bean or using JMS and a message driven bean. But then it would be just as
easy to use JavaMail from the client directly.


> 
> I want to send a beatifull EMAIL to the user....
> 
> There is not a servlet involved, becouse of is a proccess that is 100% executed in 
>the EJB container.

The JSP is compiled into a servlet.

> The mails has to be send in batch proccess.
> 
> I will have a proccess that every night sends the emails to the users.
> 
> I will appreciate a lot your help.

Hope it helps.


-----------------------------------------------------------------------
Per Lewau ([EMAIL PROTECTED]) 

"Why waste time learning, when ignorance is instantaneous?"
                                                - Hobbes



_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to