struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nagesh.kumar" <nagesh.ku...@interglobetechnologies.com>
Subject RE: Jsp out to Persist
Date Tue, 01 May 2007 11:51:17 GMT
Thanks a lot buddy,

I need to send a mail by using the same html generated by jsp  
 just like your idea [save the file to the server]

How can I implement this do u have any example where I can refer.

Thanks & Regards
Nagesh Reddy.

-----Original Message-----
From: Lance [mailto:lance.semmens@marketpipe.com] 
Sent: Tuesday, May 01, 2007 4:52 PM
To: Struts Users Mailing List
Subject: Re: Jsp out to Persist

Are you saving the file to the client or to the server?

If you want the client to save the file, you can set the content disposition
header... this will cause a file download dialog to appear
    response.setHeader("content-disposition", "attachment;
filename=someFileName.html");

If you want to save the file to the server, you could use a
javax.servlet.Filter which is mapped to the uri(s) that you want to keep a
record of.
You could wrap the resppnse in a custom ResponseWrapper The response wrapper
overrides getOutputStream() and getWriter() so that they return objects that
write to the file system and the wrapped response.

Cheers,
Lance,

nagesh.kumar wrote:
> Hi All,
>
> I have a scenario like I need to persist or get stream of generated 
> output JSP OUT PUT [HTML]
>
> I have  flow like ACTION  >  JSP >  gives HTML out oput to browser
>
> Now I need to persist this generated html from jsp to some file.
>
> How can I close this
>
> Please give me a solution
>
> Or
>
> How can I call this action > jsp with out HTTP also.
>
> Thanks & Regards
> Nagesh Reddy
>
>
>
> DISCLAIMER:
> The information in this e-mail is the property of InterGlobe and is 
> confidential and privileged. It is intended solely for the addressee. 
> Access to this email by anyone else is unauthorized. If you are not 
> the intended recipient, any disclosure, copying, distribution or any 
> action taken in reliance on it is prohibited and will be unlawful. If 
> you receive this message in error, please notify the sender 
> immediately and delete all copies of this message
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


DISCLAIMER:
The information in this e-mail is the property of InterGlobe and is confidential and privileged.
It is intended solely for the addressee. Access to this email by anyone else is unauthorized.
If you are not the intended recipient, any disclosure, copying, distribution or any action
taken in reliance on it is prohibited and will be unlawful. If you receive this message in
error, please notify the sender immediately and delete all copies of this message



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message