Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001010 [Resin] minor always 03-23-06 14:18 03-24-06 11:20
Reporter ferg View Status public  
Assigned To
Priority urgent Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.0.19 Product Version 3.0.18
  Product Build
Summary 0001010: rewrite-dispatch issues
Description (rep by Bill Au)

I have two webapps, webapp1 and webapp2, installed in my resin server.
For URL that looks like "/webapp1/select", I actually
need to have it handed by webapp2 (ie /webapp2/select).
So I somehow need to rewrite/map/forward/redirect requests with the
URL /webapp1/select to /webapp2/select.

I came across <rewrite-dispatch>. I tried putting the following
under <host>:

  <rewrite-dispatch>
    <forward regexp='^/webapp1/select' target='/webapp2/select'/>
  </rewrite-dispatch>

But got a 500 response:
500 Servlet Exception
java.lang.NullPointerException
    at com.caucho.server.connection.AbstractHttpRequest.getRequestDispatcher(AbstractHttpRequest.java:2016)
    at com.caucho.server.dispatch.ForwardFilterChain.doFilter(ForwardFilterChain.java:78)
    at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
    at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:268)
    at com.caucho.server.port.TcpConnection.run(TcpConnection.java:389)
    at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:492)
    at com.caucho.util.ThreadPool.run(ThreadPool.java:425)
    at java.lang.Thread.run(Thread.java:595)

When I tried:

  <rewrite-dispatch>
    <redirect regexp='^/webapp1/select' target='/webapp2/select'/>
  </rewrite-dispatch>

I got a different 500 response:
500 Servlet Exception
java.lang.NullPointerException
    at com.caucho.server.connection.AbstractHttpResponse.getAbsolutePath(AbstractHttpResponse.java:633)
    at com.caucho.server.connection.AbstractHttpResponse.sendRedirect(AbstractHttpResponse.java:557)
    at com.caucho.server.dispatch.RedirectFilterChain.doFilter(RedirectFilterChain.java:87)
    at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
    at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:268)
    at com.caucho.server.port.TcpConnection.run(TcpConnection.java:389)
    at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:492)
    at com.caucho.util.ThreadPool.run(ThreadPool.java:425)
    at java.lang.Thread.run(Thread.java:595)

/webapp2/select is mapped to a servlet but there is no mapping for
/webapp1/select. Is that the cause of the NullPointerException?

Should the RewriteFilter be used instead?

Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0000944)
ferg
03-24-06 11:20

server/13sf
 

- Issue History
Date Modified Username Field Change
03-23-06 14:18 ferg New Issue
03-24-06 11:20 ferg Note Added: 0000944
03-24-06 11:20 ferg Status new => closed
03-24-06 11:20 ferg Resolution open => fixed
03-24-06 11:20 ferg Fixed in Version  => 3.0.19


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker