Re: [Resin-interest] Forwarding rewrite path location

2008-01-25 Thread Sam
>> I want to forward the request to a jsp file in the root directory,  
>> e.g. /confirm.jsp, however after forwarding the path location is  
>> still /somepath/, any ideas how to set the path location as well?

> Have you investigated using the rewrite-dispatch tag in your  
> resin.conf file? 

For this purpose, rewrite-real-path is a good fit.

http://caucho.com/ns/resin";>
  

  


http://www.caucho.com/resin/doc/rewrite-tags.xtp#rewrite-real-path

-- Sam



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Forwarding rewrite path location

2008-01-24 Thread Rob Lockstone
Have you investigated using the rewrite-dispatch tag in your  
resin.conf file? To do it at the domain level, you can put a rewrite- 
dispatch block inside the  block. But it sounds like you want  
it in the  block.

http://www.caucho.com/resin/doc/rewrite-tags.xtp#rewrite-dispatch

Maybe something like this?


 ...
 
 
 
 ...
  

Or maybe use  instead of  if you want to  
avoid sending a 302 to the requesting browser. There are several  
different options.

Rob

On Jan 24, 2008, at 2:43 AM, Ron Pitts wrote:

> This has been bugging me for awhile so here it goes
>
> I'm currently displaying a jsp page located at /somepath/somefile.jsp
>
> I want to forward the request to a jsp file in the root directory,  
> e.g. /confirm.jsp, however after forwarding the path location is  
> still /somepath/, any ideas how to set the path location as well?
>
> HttpServletRequest request,
> HttpServletResponse response,
> RequestDispatcher disp;
>
>   disp = request.getRequestDispatcher("/confirm.jsp");
>   disp.forward(request, response);
>
>
> thanks
>


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Forwarding rewrite path location

2008-01-24 Thread Ron Pitts
Its just part of the path info.

Some of the images contained in the root jsp file havent got absolute path
location, e.g. /banner.gif  so when its forwarded the image is looking at
/somepath/banner.gif , the simple way would be to change the image location.

Its probably to do with the location displayed in the browser because as far
as the browser is concerned its still reading the original file at
/somepath/somefile.jsp  but actually its been forwarded to /rootfile.jsp.


On Jan 25, 2008 3:59 AM, Mike Wynholds <[EMAIL PROTECTED]> wrote:

>  Is /somepath actually the context path for the web app?  Or is it just
> part of the path info?  If it is the web app context path, then you cannot
> forward outside that context.  That request dispatcher would not know
> anything about resources outside of its context.
>
>
>
> You would probably have to send a browser redirect, which can be a
> relative path too (I think).
>
>
>
> Now… if /somepath is really just path info, then this seems to be a bug.
>
>
>
> ..mike..
>
>
>  --
>
> *From:* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *On Behalf Of *Ron Pitts
> *Sent:* Thursday, January 24, 2008 2:43 AM
> *To:* resin-interest@caucho.com
> *Subject:* [Resin-interest] Forwarding rewrite path location
>
>
>
> This has been bugging me for awhile so here it goes
>
>
>
> I'm currently displaying a jsp page located at /somepath/somefile.jsp
>
>
>
> I want to forward the request to a jsp file in the root directory, e.g.
> /confirm.jsp, however after forwarding the path location is still
> /somepath/, any ideas how to set the path location as well?
>
>
>
> HttpServletRequest request,
> HttpServletResponse response,
>
> RequestDispatcher disp;
>
>
>
>   disp = request.getRequestDispatcher("/confirm.jsp");
>   disp.forward(request, response);
>
>
>
>
>
> thanks
>
>
>
> ___
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
>
>
___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Forwarding rewrite path location

2008-01-24 Thread Mike Wynholds
Is /somepath actually the context path for the web app?  Or is it just
part of the path info?  If it is the web app context path, then you
cannot forward outside that context.  That request dispatcher would not
know anything about resources outside of its context.

 

You would probably have to send a browser redirect, which can be a
relative path too (I think).

 

Now... if /somepath is really just path info, then this seems to be a
bug.

 

..mike..

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron Pitts
Sent: Thursday, January 24, 2008 2:43 AM
To: resin-interest@caucho.com
Subject: [Resin-interest] Forwarding rewrite path location

 

This has been bugging me for awhile so here it goes 

 

I'm currently displaying a jsp page located at /somepath/somefile.jsp 

 

I want to forward the request to a jsp file in the root directory, e.g.
/confirm.jsp, however after forwarding the path location is still
/somepath/, any ideas how to set the path location as well? 

 

HttpServletRequest request,
HttpServletResponse response,

RequestDispatcher disp;

 

  disp = request.getRequestDispatcher("/confirm.jsp");
  disp.forward(request, response);

 

 

thanks 

 

___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest