You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pani R <pa...@lycos.com> on 2003/03/06 21:32:51 UTC

forward using Struts

Hi:

I have 3 SUBMIT buttons and one of which, when clicked, should open the resultant page in a new browser. I dont want to use JavaScript. I want the ActionClass to handle the request and for a particular Submit button, it should forward the JSP to a new browser.

Can struts forward the page to a new browser?

-Pani.



_____________________________________________________________
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus

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


RE: forward using Struts

Posted by James Mitchell <jm...@apache.org>.
No, that won't work either.  But you are right about this being html
stuff.

Once you submit a form, you cannot forward it to any window.  In fact,
you are not really forwarding it to anything.  When the browser submits
a form, it is simply making a request for a document that it can display
in its window.  The document name might happen to be called 'mypage.do',
but your browser doesn't know that there is no such document by that
name, it simply retrieves the stream and displays it in the browser.

Where (I think) you were going with your question is how to have the
results of some process display in another window.

You need to answer a few questions first.

Do you want the user to still see the form (as it was filled out prior
to hitting submit)?
If yes, then you will submit that form to a new target (<html:form .....
target="_new">)
If no, then you must use JavaScript.  After the page is submitted, you
process the form and return the user to some page that can (with
JavaScript) open a new window to a URL that you specify.


--
James Mitchell
Web Developer/Struts Evangelist
http://jakarta.apache.org/struts/

"People demand freedom of speech to make up for the freedom of thought
which they avoid."
    - Soren Aabye Kierkegaard (1813-1855)




> -----Original Message-----
> From: Robert S. Sfeir [mailto:robert@codepuccino.com] 
> Sent: Thursday, March 06, 2003 3:36 PM
> To: Struts Users Mailing List
> Cc: Robert S. Sfeir
> Subject: Re: forward using Struts 
> 
> 
> make the button a link and use target="_blank"  this is html stuff.  
> The link can point to a new URL which will call your Action.
> 
> On Thursday, Mar 6, 2003, at 15:32 US/Eastern, Pani R wrote:
> 
> > Hi:
> >
> > I have 3 SUBMIT buttons and one of which, when clicked, should open 
> > the resultant page in a new browser. I dont want to use 
> JavaScript. I 
> > want the ActionClass to handle the request and for a 
> particular Submit 
> > button, it should forward the JSP to a new browser.
> >
> > Can struts forward the page to a new browser?
> >
> > -Pani.
> >
> >
> >
> > _____________________________________________________________
> > Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
> > http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


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


Re: forward using Struts

Posted by "Robert S. Sfeir" <ro...@codepuccino.com>.
make the button a link and use target="_blank"  this is html stuff.  
The link can point to a new URL which will call your Action.

On Thursday, Mar 6, 2003, at 15:32 US/Eastern, Pani R wrote:

> Hi:
>
> I have 3 SUBMIT buttons and one of which, when clicked, should open 
> the resultant page in a new browser. I dont want to use JavaScript. I 
> want the ActionClass to handle the request and for a particular Submit 
> button, it should forward the JSP to a new browser.
>
> Can struts forward the page to a new browser?
>
> -Pani.
>
>
>
> _____________________________________________________________
> Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
> http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


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