Tomcat embedded container jsp servlet configuration

621 views
Skip to first unread message

Dalibor Zdravkovic

unread,
Nov 14, 2020, 3:37:31 PM11/14/20
to Codehaus Cargo
Is it possible to change init-params of "org.apache.jasper.servlet.JspServlet" for tomcat embedded container. I want to change "mappedfile" param to value "false" because default value is "true".

I do not want to put something like this:
<servlet>
    <servlet-name>jsp</servlet-name>
    <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
    <init-param>
        <param-name>fork</param-name>
        <param-value>false</param-value>
    </init-param>
    <init-param>
        <param-name>xpoweredBy</param-name>
        <param-value>false</param-value>
    </init-param>
    <init-param>
        <param-name>mappedfile</param-name>
        <param-value>false</param-value>
    </init-param>
    <load-on-startup>3</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>jsp</servlet-name>
    <url-pattern>*.jsp</url-pattern>
    <url-pattern>*.jspx</url-pattern>
</servlet-mapping>

in "web.xml" file of my application

S. Ali Tokmen

unread,
Nov 15, 2020, 5:13:51 AM11/15/20
to codehau...@googlegroups.com

Hi Dalibor

Tomcat sets the various web.xml defaults in the TOMCAT_BASE/conf/web.xml file.

What you can hence do is to use the https://codehaus-cargo.github.io/cargo/Configuration+files+option.html technique to override the Tomcat configuration's conf/web.xml file with one setting mappedfile to false.

Does this help?

Regards

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/
--
You received this message because you are subscribed to the Google Groups "Codehaus Cargo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/fa0948e7-9f20-4c9e-8b40-ae4dc53a9399n%40googlegroups.com.

Dalibor Zdravkovic

unread,
Nov 15, 2020, 7:38:52 AM11/15/20
to Codehaus Cargo
Embedded type of tomcat does not use "TOMCAT_BASE/conf/web.xml" as global "web.xml". When I run cargo embedded tomcat server I am always getting this notification "INFORMATION: No global web.xml found".

S. Ali Tokmen

unread,
Nov 15, 2020, 7:54:17 AM11/15/20
to codehau...@googlegroups.com

Hi Dalibor

You are right - The default web.xml files for embedded Tomcat containers seem to be missing on Codehaus Cargo for Tomcat 8+ (and others have older web.xml files).

Can you nevertheless kindly use the https://codehaus-cargo.github.io/cargo/Configuration+files+option.html technique to override the Tomcat configuration's conf/web.xml file with one (that you define yourself) setting mappedfile to false.

Reply all
Reply to author
Forward
0 new messages