Tomcat container Web. XML Specific Explanation

Source: Internet
Author: User

<init-param>

<param-name>debug</param-name>

<param-value>0</param-value>

</init-param>

Debug is set to debug level, and 0 indicates the least amount of information available. 9 indicates the most information provided .


<init-param>

<param-name>listings</param-name>

<param-value>false</param-value>

</init-param>

In the Web development phase, you typically want to list all pages under the Web path. This makes it easy to select the JSP page that needs to be debugged , listings is set to true to indicate the list page, False indicates that the display of the folder structure is not supported


<load-on-startup>1</load-on-startup>

1) Load-on-startupThe element tag container is loaded when it is started.servlet (instantiate and invoke itsInit ()Method).
2)its value must be an integer. Representsservletthe order that should be loaded
2)Duty is0or greater than0indicates that the container is loaded and initialized when the app is startedservlet.
3)Value less than0or when not specified. The container is represented in theservletbe loaded only when selected.
4)The smaller the value of a positive number, theservletthe higher the priority, the more loaded it will be when the app starts.
5)The same time as the duty. The container will be loaded in its own order of choice.

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

<load-on-startup>3</load-on-startup>

</servlet>

Number of references

Descriptive narrative

Development

The default value is true. Note that the JSP file is still in development, so Jasper should be modificationtestinterval by the number of JSP file for inspection. when the JSP changes, it is recompiled

Fork

The default value is true.

Indicates that the JSPis compiled with a different JVM . This eliminates resource contention and class loader conflicts in the development phase

Checkinterval

Unit is seconds. Specifies that the Jasper at this time interval to check whether the JSP needs to be recompiled, the default feel 0. Indicates the use of a background program to process

Modificationtestinterval

It works primarily when development is true , and the default value is 4. Jasper will check to See if the JSP file is validated for changes at this frequency.

Compiler

The cache size to use when reading resources. Tacit feeling 2KB

Classdebuginfo

Cache size used when writing resources, default feel 2KB

keepgenerated

The default value is true. Instructs Jasper to keep the servlet in the working folder between Two calls to the servlet . This will greatly improve Tomcat 's efficiency.

Mappedfilegenstraschararray
Dumpsmaptrimspaces
Supresssmap

These are the optimization and debugging options used by JSP developers.

ScratchDir

Jasper the temporary directory that is used when compiling the JSP , it is implied that a temporary directory under the $CATALINA _home/work

Xpoweredby

I feel false. function for generating x-power-by header (header)

Compilertargetvm

To compile the target VM for the generated servlet

Compilersourcevm

Generate the source VM for the servlet

<mime-mapping>

<extension>zip</extension>

<mime-type>application/zip</mime-type>

</mime-mapping>

Mime-mapping is a node in Web. Xml. Used to specify the appropriate format for the browser processing, but also to configure the static page open encoding:

<mime-mapping>

<extension>htm</extension>

<mime-type>text/html;charset=gb2312</mime-type>

</mime-mapping>

<mime-mapping>

<extension>html</extension>

<mime-type>text/html;charset=gb2312</mime-type>

</mime-mapping>

Assuming that the Web application includes files that are infrequently used, it is necessary to ensure that some MIME typesare assigned, and themime-mapping element is designed for this purpose. Add mime-type mappings such as rar,iso . Avoid opening directly in the browser

<mime-mapping>

<extension>rar</extension>

<mime-type>application/octet-stream</mime-type>

</mime-mapping>

<mime-mapping>

<extension>iso</extension>

<mime-type>application/octet-stream</mime-type>

</mime-mapping>

of commonMIMEtype:
Hypertext Markup Language text. htm,.html text/html
Normal text. txt Text/plain
Rtftext. rtf Application/rtf
GifGraphics. gif image/gif
JpegGraphics. ipeg,.jpg Image/jpeg
AuSound Files. Au audio/basic
MidiMusic FilesMid,.midi Audio/midi,audio/x-midi
RealAudioMusic Files. RA,. Ram Audio/x-pn-realaudio
MPEGfile. Mpg,.mpeg Video/mpeg
Avifile. avi Video/x-msvideo
Gzipfile. GZ Application/x-gzip
TARfile. Tar Application/x-tar

Tomcat container Web. XML Specific Explanation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.