Reputation: 10606
I would need the following configuration only for my webapp:
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>mappedfile</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>trimSpaces</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
So far I thought this is a setting which is global for Tomcat (i.e., it can only be configured in Tomcat's web.xml). This is something I am not allowed to do, beceause the Tomcat has other apps too.
I have made some experiments and for me it seems when I run the app locally on my developer machine these settings take place even when it is only in the web.xml of my own application.
Could someone enlighten me what is the exact mechanism here?
The official docs also say "The servlet which implements Jasper is configured using init parameters in your global $CATALINA_BASE/conf/web.xml" so I'm confused if this is an expected behaviour, only a "developer setting" or it could work in a more restrictive production environment too. What I can think of is that the servlet generator has different contexts for all the applications, and if there is no specific setting then it inherits the one defined in the global web.xml.
Any links / pointers / suggestions would be more than welcome!
Upvotes: 3
Views: 1059
Reputation: 10606
I've contacted the tomcat-users mailing list, Christopher Schultz provided a positive answer.
See the details here: http://mail-archives.apache.org/mod_mbox/tomcat-users/201801.mbox/%[email protected]%3E
Upvotes: 1