Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is purpose of <init-param>mappedfile</init-param> in JspServlet in web.xml?

What is purpose of 'mappedfile' init-param in JspServlet in web.xml?

<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>

What if i set it to 'TRUE'? What will happen if i set it to 'False'?

Note: I need to implement this as a solution to problem in which one of JSP in application is giving error of exceeding the 65535 bytes limit. I need to find whether this will cause any global issue or not if changed to false or true.

like image 208
fatherazrael Avatar asked Mar 11 '23 09:03

fatherazrael


1 Answers

It is a parameter to tune performance.

The default property values are tuned for development of JSP files at the cost of performance. To maximize performance, set jsp-config properties to these non-default values:

development - false (as an alternative, set to true and give modificationTestInterval a large value)

mappedfile - false

trimSpaces - true

suppressSmap - true

fork - false (on Solaris)

classdebuginfo - false

mappedFile description: Should we generate static content with one print statement per input line, to ease debugging? true or false, default true.

Source: https://docs.oracle.com/cd/E19226-01/820-7693/beatx/index.html

You can look here too: What does "mappedfile" parameter in JspServlet stand for?

like image 171
Azodious Avatar answered Mar 13 '23 17:03

Azodious