Mantis - Resin
Viewing Issue Advanced Details
4090 minor always 06-28-10 15:32 06-30-10 10:16
JTinCA  
ferg  
normal  
closed 3.1.6  
fixed  
none    
none 4.0.8  
0004090: 404 on rewritten URL results in FileNotFoundException
In resin conf we have this to trick the browser into updating the cached files when we need:

<filter filter-name='StaticRewrite' filter-class='com.caucho.filters.RewriteFilter'>
  <init>
    <rewrite pattern="/static/[0-9]+(/.*)$" target="$1"/>
  </init>
</filter>

If a user requests "/static/123/foo.gif" and it does not exist, they get the expected 404 not found response.

But if a user requests "/static/123/foo.jsp" and it does not exist, they get a 500 server error response with a stack like this:

java.io.FileNotFoundException: /foo.jsp
at com.caucho.jsp.PageManager.getPage(PageManager.java:253)
at com.caucho.jsp.PageManager.getPage(PageManager.java:178)
at com.caucho.jsp.PageManager.getPage(PageManager.java:161)
at com.caucho.jsp.QServlet.getSubPage(QServlet.java:301)
at com.caucho.jsp.QServlet.getPage(QServlet.java:210)
at com.caucho.server.dispatch.PageFilterChain.compilePage(PageFilterChain.java:238)
at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:145)...
This is with the 3.1.6 Professional version running on Ubuntu Linux with Java 1.6.0_20.

Notes
(0004647)
ferg   
06-30-10 10:16   
server/1kse