[Opensource] how can you email html generated by the current request object an d an action forward

Mike Traum mtraum at cirnetwork.org
Wed Feb 19 15:12:32 PST 2003


Sorry, I should have been more verbose. Here's the situation:
- user clicks and calls a state
- state generates output to user
- i want that same state to generate an email with the same information in
the output to the user, just displayed differently
- i can't simply use a URL connection to call the state again because there
is business logic in there which prevents the Output's from being generated
when the state is run again

So, I want to be able to use the same response object (or just the Outputs
from that response object) to create a stream based off of a jsp. I've been
thinking somthing like using a RequestDispatcher to basically make another
call to a state with no business logic with the same response, but that
doesn't work because I can't read the data in the response object, only
write to it.

Thanks,
Mike

-----Original Message-----
From: larry hamel [mailto:expresso at codeguild.com]
Sent: Tuesday, February 18, 2003 7:31 PM
To: opensource at jcorporate.com
Subject: Re: [Opensource] how can you email html generated by the
current request object an d an action forward


Did you get an answer to this one?

I'm not sure I understand the entire question...  do you mean you can NOT
use current response object?.  I assume that the URL connection would be to
get the HTML as a stream.  You can probably manipulate the framework,
particularly ExpressoActionServlet.java, such that the JSP output is not
flushed into the HTTP stream, but rather captured in some string-stream and
subsequently e-mailed.

larry

At 04:21 PM 2/10/2003, you wrote:
>I have Ouputs for a jsp view that I want to apply to a different view and
send as an email. Is there some mechanism in struts to do this, or do I have
to use a URLConnection to call another page. The obvious problems with using
a URLConnection is that I can use the current response object.
> 
>Thanks,
>Mike
> 

_______________________________________________
Opensource mailing list
Opensource at jcorporate.com
http://mail.jcorporate.com/mailman/listinfo/opensource
Archives: http://mail.jcorporate.com/pipermail/opensource/



More information about the Opensource mailing list