tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fred Toth <>
Subject Re: Mystery migrating from tomcat 6 to 7
Date Tue, 13 Nov 2012 04:31:34 GMT
On 11/12/2012 4:24 PM, Konstantin Kolinko wrote:
> 2012/11/13 Fred Toth <>:
>> Hello again,
>> I've found my problem, sort of.
>> In this particular application, ever since tomcat 5, we've been remapping
>> the DefaultServlet url-pattern. Works fine in 5 and 6, but not in 7. Which
>> means I've got another problem, but at least I know why the app fails to
>> run.
>> Here's the problem bit from my web.xml:
>>      <servlet-mapping>
>>          <servlet-name>default</servlet-name>
>>          <url-pattern>/default/*</url-pattern>
>>      </servlet-mapping>
>> The idea here is to be able to do access control at the struts level, but
>> then to be able to forward to DefaultServlet so that it can do what it does
>> best (like serving PDFs, for example). I'm not sure why having this setup in
>> tomcat 7 causes my app to fail completely, but taking this out cures the
>> core problem. URLs start working properly, but now I have access control
>> problems that were solved by the above.
> It was a change to fix an issue important for security. See
> If you just need to forward to the servlet, do you need to map it to
> different path?
> It is possible to select the servlet by its name,
> ServletContext.getNamedDispatcher("default").forward(..)
> Best regards,
> Konstantin Kolinko
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Thanks for the pointer, Konstantin. This helps me understand the issues. 
However, any idea why that mapping should cause my entire app to fail? 
The forwards to "/default" happen only in fairly restricted 
circumstances. Why, for example, would this cause failures to serve 
everything else?

To be more specific: We're serving *.html with struts2 and this has 
nothing to do with DefaultServlet. Yet somehow having that mapping in 
place breaks the whole thing.

I'll try your suggestion (forwarding to DefaultServlet without the 
mapping) tomorrow.



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

View raw message