Yes. Here we are just preventing Struts from sending any response, since
we are going to send a response manually (by writing bytes to the
response OutputStream). If you were to send a response manually, and
then return an ActionForward to the controller, you would in effect be
attempting to send two responses.
Erik
Dhaliwal, Pritpal (HQP) wrote:
Isn't there always a response? And if there is no response how would you
know that things went great?
Why not just return a little status code... Maybe 0 or 1, or some other
number. 0 = things went great any other number can be code for how
things didn't go great. Just like processes..
Mi dos cientos..
Pritpal
-----Original Message-----
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 17, 2004 9:00 AM
To: Struts Users Mailing List
Subject: Re: java application to struts
In a case like this my action mapping would look something like this:
<action path="/actor/downloadFile" type="MyActionClass"
parameter="serveBinaryFile"/>
In other words, no forwards, no form beans.
Your execute method in your action class can manipulate the response
OutputStream, flush and close it manually and then return null to the
controller.
Erik
Erik Weber wrote:
Ah. Your Action's execute method, which returns an ActionForward
instance, can return null, and (as far as I know) the controller won't
send a response. I use this when serving binary files.
Erik
Saurabh Bhatla wrote:
Erik,
then my question is what do i need to change in .xml file if i dont
want anything to be returned back to the application from struts?.
reading and writing to the stream is handled manually in servlets.
Will it be like if i dont apecify <forward> in .xml file then nothing
will be returned to the application. regards
saurabh
On Tue, 2004-08-17 at 10:26, Erik Weber wrote:
To your HTTP client, there should be no difference between a Struts
app and any other Servlet-based app (or HTTP server app for that
matter).
Right?
Erik
Saurabh Bhatla wrote:
Hi all,
I have my web application based on struts framework. This
application takes some information from the user. I can submit
information using jsp but now i want to have a java application
that would connect to my webapplication using http connection and
submit the information. I know
I can do that if I have a servlet. Now my question is how do that
with
struts. What will be action mapping and all that information.
Any suggestions
regards
saurabh
-------------------------------------------------------------------
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]