web.xml: context-param : web.xml « javax.servlet.http « Java by API






web.xml: context-param

       
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">

<web-app>
    <context-param>
        <param-name>name</param-name>
        <param-value>value</param-value>
    </context-param>
    <context-param>
        <param-name>name2</param-name>
        <param-value>1099</param-value>
    </context-param>

    <mime-mapping>
        <extension>java</extension>
        <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>cpp</extension>
        <mime-type>text/plain</mime-type>
    </mime-mapping>
</web-app>

           
       








Related examples in the same category

1.web.xml: filter-name and filter-mapping
2.web.xml: error page with error code
3.web.xml: error page with exception type
4.web.xml: mime-mapping
5.web.xml: welcome-file-list
6.web.xml: session-config timeout
7.web.xml: security-constraint
8.web.config: login-config
9.web.xml: servlet-name, init-param, servlet-mapping