Although this is possible, as other posters have said, I'd ask what you are
going to achieve by doing this? The servlet you already have will quite
happily work alongside the Struts servlet without any problems.

If you've got existing servlets you want to migrate to Struts & model 2 then
I'd do roughly the following:
1) In your servlet identify the objects/properties that are used inside your
out.write() statements.
2) Create a struts action based on your servlet code, replacing the
out.writes()s with setting request scope attributes with the relevant
objects and properties
3) Create a jsp (based on the html output from the original servlet) which
used the request scope attributes for the dynamic content.

Paul

> -----Original Message-----
> From: Ricardo Andres Quintero [mailto:[EMAIL PROTECTED]
> Sent: 16 June 2004 17:28
> To: [EMAIL PROTECTED]
> Subject: Using a servlet code within Struts
> 
> 
> Hello everyone
> I want to make some servlet code to work in Struts.
> i dont want to make the servlet to work. i want to
> rewrite the code into Struts.
> 
> The servlet uses out = response.getOutputStream()
> and then out.write();
> 
> I know Struts uses the model 2, so that the view is 
> a jsp.
> 
> Im thinking of using and action, where i use the response object,
> and i would do it like i do in the servlet. However, i 
> dont know how to use the ActionForward, because i would
> render the output, based in the servlet. i mean no JSP.
> 
> How would u solve this problem?
> 
> 
> 
> 
> --
> Ricardo Andrés Quintero R.
> Ubiquando Ltda.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


**********************************************************************
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.
**********************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to