You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nicolas De Loof <ni...@cgey.com> on 2002/05/30 10:47:39 UTC
response.sendRedirect on WebSphere
As conclusion on my "redirect" troubles :
I've made some test on WAS to understand the behaviour of it's
response.sendRedirect implementation.
If path used begins with "/", WAS builds an absolute URL considering root as
WEBAPP CONTEXT (and not Servlet container root as servlet API defines the
behaviour).
So, on WAS, Struts does not require to add context to the redirected URL
when using a "redirect=true" forward. If you use an absolute URL as path
(with protocol://server:port ...) WAS uses it.
To use Struts redirect option on WAS, you just have to comment this two
lines in an dedicated Servlet (that extens ActionServlet) :
// if (path.startsWith("/"))
// path = request.getContextPath() + path;
If you don't want to have a WAS specific servlet, you can use this code in
an extended ActionServlet (Struts 1.0.2) or RequestProcessor (Struts 1.1) :
if (path.startsWith('/')) {
// build a absolute URL to the path
path = request.getScheme() + "://"
+ request.getServerName()
+ ":" + request.getServerPort()
+ request.getContextPath()
+ path
}
response.sendRedirect(response.encodeRedirectURL(path));
Nico
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Struts and iWS 4.1
Posted by Carmen FLOREA <cf...@aubay.com>.
Thank you for your suggestion, James.
Carmen
----- Original Message -----
From: "James Holmes" <jh...@yahoo.com>
To: "Struts Developers List" <st...@jakarta.apache.org>
Sent: Thursday, June 20, 2002 5:38 PM
Subject: Re: Struts and iWS 4.1
> Carmen,
>
> You'll have better luck asking these types of
> questions on the Struts Users list:
>
> struts-user@jakarta.apache.org
>
> -james
> james@jamesholmes.com
> http://www.jamesholmes.com/struts/
>
>
> --- Carmen FLOREA <cf...@aubay.com> wrote:
> > Hello Everybody
> >
> > I read the emails concernig how to get Struts
> > working under the IPlanet web
> > Server 4.1, and I found a message from Stanley
> > Santiago who wrote a
> > documentation about how to get Struts based
> > application to work on iWS 4.1.
> > Can somebody send me this documentation?
> >
> >
> > Thank you,
> > Carmen
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Struts and iWS 4.1
Posted by James Holmes <jh...@yahoo.com>.
Carmen,
You'll have better luck asking these types of
questions on the Struts Users list:
struts-user@jakarta.apache.org
-james
james@jamesholmes.com
http://www.jamesholmes.com/struts/
--- Carmen FLOREA <cf...@aubay.com> wrote:
> Hello Everybody
>
> I read the emails concernig how to get Struts
> working under the IPlanet web
> Server 4.1, and I found a message from Stanley
> Santiago who wrote a
> documentation about how to get Struts based
> application to work on iWS 4.1.
> Can somebody send me this documentation?
>
>
> Thank you,
> Carmen
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Struts and iWS 4.1
Posted by Carmen FLOREA <cf...@aubay.com>.
Hello Everybody
I read the emails concernig how to get Struts working under the IPlanet web
Server 4.1, and I found a message from Stanley Santiago who wrote a
documentation about how to get Struts based application to work on iWS 4.1.
Can somebody send me this documentation?
Thank you,
Carmen
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: response.sendRedirect on WebSphere
Posted by Carmen FLOREA <cf...@aubay.com>.
Hello Everybody
I read the emails concernig how to get Struts working under the IPlanet web
Server 4.1, and I found a message from Stanley Santiago who wrote a
documentation about how to get Struts based application to work on iWS 4.1.
Can somebody send me this documentation?
Thank you,
Carmen
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>