Discussion:
Forward to external url
Raj Atchutuni
2003-08-26 19:02:57 UTC
Permalink
I am trying to forward to an external link (commerce server). Here is my code. Can anyone tell me what is wrong with it. Is there any way i can specify the url in the action instead in 'forward' ?
Thanks
Raj.

My action class has only one line of code as follows.....
---------------
ApparelAction.java

return (mapping.findForward("success"));

Struts-config.xml
-----------------
<action path="/dsapparel" type="com.action.pb.ApparelAction">
<forward name="success" path="https://wcs-kbarnwell.com/index.jsp"/>
</action>



---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Sgarlata Matt
2003-08-26 19:10:14 UTC
Permalink
You probably want to change your forward declaration so that it is a
redirect like this:

<forward name="success" path="https://wcs-kbarnwell.com/index.jsp"
redirect="true"/>
Post by Raj Atchutuni
I am trying to forward to an external link (commerce server). Here is my code. Can anyone tell me what is wrong with it. Is there any way i can specify the url in the action instead in 'forward' ?
Thanks
Raj.
My action class has only one line of code as follows.....
---------------
ApparelAction.java
return (mapping.findForward("success"));
Struts-config.xml
-----------------
<action path="/dsapparel" type="com.action.pb.ApparelAction">
<forward name="success" path="https://wcs-kbarnwell.com/index.jsp"/>
</action>
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
--
Matthew Sgarlata
Senior Consultant
Booz Allen Hamilton Inc.
Work: 703-377-0871
Fax: 703-902-3608
Rune Peter Bjørnstad
2003-08-26 19:13:52 UTC
Permalink
Don't take this for granted, but a forward happens on the server-side. Set
the redirect attribute to true, and the external request is "routed" via
the clients browser.

<forward name="success" path="https://etc...." redirect="true"/>

Did that help?

Rune.
Post by Raj Atchutuni
I am trying to forward to an external link (commerce server). Here is my code. Can anyone tell me what is wrong with it. Is there any way i can specify the url in the action instead in 'forward' ?
Thanks
Raj.
My action class has only one line of code as follows.....
---------------
ApparelAction.java
return (mapping.findForward("success"));
Struts-config.xml
-----------------
<action path="/dsapparel" type="com.action.pb.ApparelAction">
<forward name="success" path="https://wcs-kbarnwell.com/index.jsp"/>
</action>
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Raj Atchutuni
2003-08-26 19:41:26 UTC
Permalink
Great. it worked with redirect="true". Thanks guys.


Rune_Peter_BjÞrnstad <***@student.utwente.nl> wrote:
Don't take this for granted, but a forward happens on the server-side. Set
the redirect attribute to true, and the external request is "routed" via
the clients browser.



Did that help?

Rune.
Post by Raj Atchutuni
I am trying to forward to an external link (commerce server). Here is my code. Can anyone tell me what is wrong with it. Is there any way i can specify the url in the action instead in 'forward' ?
Thanks
Raj.
My action class has only one line of code as follows.....
---------------
ApparelAction.java
return (mapping.findForward("success"));
Struts-config.xml
-----------------
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-***@jakarta.apache.org
For additional commands, e-mail: struts-user-***@jakarta.apache.org


---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

John Habbouche
2003-08-26 19:10:51 UTC
Permalink
Not sure if that helps but try adding a contextRelative='false" to your
forward

<forward name="success" path="https://wcs-kbarnwell.com/index.jsp"
contextRelative="false"/>

-----Original Message-----
From: Raj Atchutuni [mailto:***@yahoo.com]
Sent: Tuesday, August 26, 2003 2:03 PM
To: struts-***@jakarta.apache.org
Subject: Re: Forward to external url


I am trying to forward to an external link (commerce server). Here is my
code. Can anyone tell me what is wrong with it. Is there any way i can
specify the url in the action instead in 'forward' ?
Thanks
Raj.

My action class has only one line of code as follows.....
---------------
ApparelAction.java

return (mapping.findForward("success"));

Struts-config.xml
-----------------
<action path="/dsapparel" type="com.action.pb.ApparelAction">
<forward name="success" path="https://wcs-kbarnwell.com/index.jsp"/>
</action>



---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Loading...