On 25/04/18 21:08, Daryl Stultz wrote:
> Hello,
> 
> 
> We are upgrading from Tomcat 6 to Tomcat 8.5. We have a servlet that extends 
> org.apache.catalina.servlets.DefaultServlet. We override 
> getRelativePath(HttpServletRequest request), that's all.
> 
> 
> The purpose of this servlet is to do a sort of redirect, the browser asks for 
> a spreadsheet "my-site.css" which is mapped to our servlet. In 
> getRelativePath we return "my-site-prod.css" or "my-site-test.css" for 
> example depending on the environment the application is running in.
> 
> 
> If I override doGet (calling super) I can see that doGet is called but 
> getRelativePath is never called and the browser gets a 404 error for 
> "my-site.css".
> 
> 
> Anyone know what I need to change to restore the behavior as it was in Tomcat 
> 6? I'm afraid I inherited this code so it's hard to say why it was done this 
> way.

Have you looked at the source code for the DefaultServlet in 8.5.x?

https://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?view=annotate

If you look at doGet() and follow the code you should be able to figure
out what you need to change to get things working in 8.5.x.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to