I'm not sure I understand the question but..

I needed to have a dynamically created image inserted into a graph.jsp

I solved the problem using <html:img page="createImage.do" />

Then the action mapped to "createImage.do" can do anything you want without 
influencing the loading of the main
graph.jsp.

I write my image to the graph.jsp using - in my CreateImageAction:

OutputStream os = response.getOutputstream;
response.setContentType("image/jpeg");
.. write to os stream...
os.close
return null;

Works a treat - the page loads and as it does so, an action is performed - but goes 
nowhere other than to write an image
to the OutputStream.

Would a modification of the above help solve the problem?

db

> -----Original Message-----
> From: Howard Roark [mailto:[EMAIL PROTECTED]]
> Sent: 29 January 2003 18:50
> To: [EMAIL PROTECTED]
> Subject: Re: Auto execution of an action on page display
>
>
> Two follow-on questions to the suggestion:
>
> 1) Will this initial servlet be able to hand over
>    control to Struts for all other actions?
>
> 2) Should the ActionServlet itself be extended to
>    accomplish these actions, or does a separate
>    servlet make more sense?  TIA.
>
> HR
>
> Date: Wed, 29 Jan 2003 13:27:19 -0500
> To: 'Struts Users Mailing List'
> <[EMAIL PROTECTED]>
> From: "Pani, Gourav" <[EMAIL PROTECTED]>
> Subject: RE: Auto execution of an action on page
> display
> Message-ID:
> <[EMAIL PROTECTED]>
>
> have you considered setting it up as a servlet instead
> and do a load on
> startup in web.xml?
>
> -----Original Message-----
> From: Howard Roark
> [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 29, 2003 1:28 PM
> To: [EMAIL PROTECTED]
> Subject: Auto execution of an action on page display
>
> I'm a newbie to Struts, and would like to know if its
> possible for Struts to automatically execute an Action
> upon the display of the initial page?  I would like to
> avoid having the user click on something to initiate
> certain user-specific house-keeping tasks, if
> possible.  TIA.
>
> HR
>
> P.S. Initiating this action as part of the Login
> action
> is not possible, since this application does not
> require
> the use of a login process.
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> ---------------------------------------------------------------------
> 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]

Reply via email to