Re: redirect="true" mappings with Websphere 4

2002-05-29 Thread Hertzel Karbasi - OPTinity eBusiness Solutions

Hi

I have encountered the same situation and changed the following lines (See
// Hertzel Tags)
in org.apache.struts.action.RequestProcessor.processActionForward

protected void processActionForward(HttpServletRequest request,
HttpServletResponse response, ActionForward forward) throws IOException,
ServletException {

if (forward == null)
{return;}

/* Hertzel ->
When Redirect:
encodeRedirectURL(path) adds the Host,port and ContextPath automatically to
the path. So we do not need to add the ContextPath to path manually!
*/
String path = forward.getPath();

// Hertzel ->
String path1 = forward.getPath();

if (forward.getRedirect()) {
if (path.startsWith("/")) {
if (forward.getContextRelative()) {
path = request.getContextPath() + path;
} else {
path = request.getContextPath() + appConfig.getPrefix() + path;
}
}

// Hertzel ->
String p1 = response.encodeRedirectURL(path1);

// Hertzel ->
// response.sendRedirect(response.encodeRedirectURL(path));
response.sendRedirect(p1);

} else {
if (path.startsWith("/") && !forward.getContextRelative()) {
path = appConfig.getPrefix() + path;
}
doForward( path, request, response);
}
}

Hertzel

- Original Message -
From: "Nicolas De Loof" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, May 29, 2002 4:28 PM
Subject: Re: redirect="true" mappings with Websphere 4


> same behaviour ...
>
> >
> > What happens if you take the slash out of the path? ie path
> > ="otherAction.do"
> >
> >
> >
> >
> > "Nicolas De Loof" <[EMAIL PROTECTED]> on 05/29/2002 06:28:35 AM
> >
> > Please respond to "Struts Users Mailing List"
> >   <[EMAIL PROTECTED]>
> >
> > To:   "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > cc:
> > Subject:  redirect="true" mappings with Websphere 4
> >
> >
> > Hi,
> >
> > My application (based on Struts 1.0.2) uses the context "greco", and I
> have
> > some Actions with forward defined like this with a redirect flag :
> >
> >  >   type="greco.webapp.MyAction"
> >   name="MyForm"
> >   scope="request"
> >   input="/one.jsp">
> >   
> > 
> >
> > On websphere 4.0.2, I get a curious behaviour : When a browser calls
> > http://www.myserver.com/greco/oneAction.do
> > I'm redirected to
> > http://www.myserver.com/greco/greco/otherAction.do  (two times "greco")
> >
> > Did someone notice such context string duplication on redirect ?
> > Do you have any solution to avoid it ?
> >
> > Nico
> >
> >
> >
> > --
> > To unsubscribe, e-mail:   <
> > mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: <
> > mailto:[EMAIL PROTECTED]>
> >
> >
> >
> >
> >
> >
> > **
> > Please Note:
> > The information in this E-mail message, and any files transmitted
> > with it, is confidential and may be legally privileged.  It is
> > intended only for the use of the individual(s) named above.  If you
> > are the intended recipient, be aware that your use of any confidential
> > or personal information may be restricted by state and federal
> > privacy laws.  If you, the reader of this message, are not the
> > intended recipient, you are hereby notified that you should not
> > further disseminate, distribute, or forward this E-mail message.
> > If you have received this E-mail in error, please notify the sender
> > and delete the material from any computer.  Thank you.
> > **
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: redirect="true" mappings with Websphere 4

2002-05-29 Thread Nicolas De Loof

same behaviour ...

>
> What happens if you take the slash out of the path? ie path
> ="otherAction.do"
>
>
>
>
> "Nicolas De Loof" <[EMAIL PROTECTED]> on 05/29/2002 06:28:35 AM
>
> Please respond to "Struts Users Mailing List"
>   <[EMAIL PROTECTED]>
>
> To:   "Struts Users Mailing List" <[EMAIL PROTECTED]>
> cc:
> Subject:  redirect="true" mappings with Websphere 4
>
>
> Hi,
>
> My application (based on Struts 1.0.2) uses the context "greco", and I
have
> some Actions with forward defined like this with a redirect flag :
>
>type="greco.webapp.MyAction"
>   name="MyForm"
>   scope="request"
>   input="/one.jsp">
>   
> 
>
> On websphere 4.0.2, I get a curious behaviour : When a browser calls
> http://www.myserver.com/greco/oneAction.do
> I'm redirected to
> http://www.myserver.com/greco/greco/otherAction.do  (two times "greco")
>
> Did someone notice such context string duplication on redirect ?
> Do you have any solution to avoid it ?
>
> Nico
>
>
>
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
>
>
>
>
>
>
> **
> Please Note:
> The information in this E-mail message, and any files transmitted
> with it, is confidential and may be legally privileged.  It is
> intended only for the use of the individual(s) named above.  If you
> are the intended recipient, be aware that your use of any confidential
> or personal information may be restricted by state and federal
> privacy laws.  If you, the reader of this message, are not the
> intended recipient, you are hereby notified that you should not
> further disseminate, distribute, or forward this E-mail message.
> If you have received this E-mail in error, please notify the sender
> and delete the material from any computer.  Thank you.
> **
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: redirect="true" mappings with Websphere 4

2002-05-29 Thread Raffy_Lata


What happens if you take the slash out of the path? ie path
="otherAction.do"




"Nicolas De Loof" <[EMAIL PROTECTED]> on 05/29/2002 06:28:35 AM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   "Struts Users Mailing List" <[EMAIL PROTECTED]>
cc:
Subject:  redirect="true" mappings with Websphere 4


Hi,

My application (based on Struts 1.0.2) uses the context "greco", and I have
some Actions with forward defined like this with a redirect flag :


  


On websphere 4.0.2, I get a curious behaviour : When a browser calls
http://www.myserver.com/greco/oneAction.do
I'm redirected to
http://www.myserver.com/greco/greco/otherAction.do  (two times "greco")

Did someone notice such context string duplication on redirect ?
Do you have any solution to avoid it ?

Nico



--
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>






**
Please Note:
The information in this E-mail message, and any files transmitted
with it, is confidential and may be legally privileged.  It is
intended only for the use of the individual(s) named above.  If you
are the intended recipient, be aware that your use of any confidential
or personal information may be restricted by state and federal
privacy laws.  If you, the reader of this message, are not the
intended recipient, you are hereby notified that you should not
further disseminate, distribute, or forward this E-mail message.
If you have received this E-mail in error, please notify the sender
and delete the material from any computer.  Thank you.
**




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




redirect="true" mappings with Websphere 4

2002-05-29 Thread Nicolas De Loof

Hi,

My application (based on Struts 1.0.2) uses the context "greco", and I have
some Actions with forward defined like this with a redirect flag :


  


On websphere 4.0.2, I get a curious behaviour : When a browser calls
http://www.myserver.com/greco/oneAction.do
I'm redirected to
http://www.myserver.com/greco/greco/otherAction.do  (two times "greco")

Did someone notice such context string duplication on redirect ?
Do you have any solution to avoid it ?

Nico



--
To unsubscribe, e-mail:   
For additional commands, e-mail: