Article Title: Change the servlet context in apach5.x. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Problem: In Apache 5.0 and 5.5, I need to modify the servlet name and class name in the web. xml file for each program. These are not seen in Apache Tomcat 4.0. Why?
Jeff Hanson answers: According to Tomcat 5.0 release instructions:
"Let web applications ask CGI and SSI, which is used when a Security Manager program (for example, a malicious Web application can use them to bypass security management programs for Access Control) creates security issues. In Tomcat 5.0, they are all set as not permitted, because our goal is to provide a completely secure default setting. However, CGI and SSI are still usable ."
How to use CGI:
Rename the file $ CATALINA_HOME/server/lib/servlets-cgi.renametojar to $ CATALINA_HOME/server/lib/servlets-cgi.jar.
#8226; in the file $ CATALINA_HOME/conf/web. xml, you need to remove the gaze in two places, servlet declaration and servlet mapping. The servlet declaration looks like the following ::
<Servlet>
<Servlet-name> cgi </servlet-name>
...
</Servlet>
Servlet ing looks like the following ::
<Servlet-mapping>
<Servlet-name> cgi </servlet-name>
<Url-pattern>/cgi-bin/* </url-pattern>
</Servlet-mapping>
These servlet declarations and ings can be added to your Web application deployment descriptor alternately.
Make SSI available:
? Rename the file $ CATALINA_HOME/server/lib/servlets-ssi.renametojar to $ CATALINA_HOME/server/lib/servlets-ssi.jar.
#8226; in the file $ CATALINA_HOME/conf/web. xml, you need to remove the gaze in two places, servlet declaration and servlet mapping. The servlet declaration looks similar to the following:
<Servlet>
<Servlet-name> ssi </servlet-name>
...
</Servlet>
Servlet ing looks similar to the following:
<Servlet-mapping>
<Servlet-name> ssi </servlet-name>
<Url-pattern> *. shtml </url-pattern>
</Servlet-mapping>
These servlet declarations and mappings can be added to your Web application deployment descriptor alternately. "
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.