Tomcat4.1.24 以后为了安全问题 servelet 要在web.xml 中设置, 下面是Example中的例子: PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
Tomcat Examples
Tomcat Example servlets and JSP pages.
Servlet Mapped Filter filters.ExampleFilter
attribute filters.ExampleFilter.SERVLET_MAPPED
Path Mapped Filter filters.ExampleFilter
attribute filters.ExampleFilter.PATH_MAPPED
Request Dumper Filter filters.RequestDumperFilter
Set Character Encoding filters.SetCharacterEncodingFilter
encoding gb2312
Compression Filter compressionFilters.CompressionFilter
compressionThreshold 10
debug 0
Servlet Mapped Filter invoker
Path Mapped Filter /servlet/*
listeners.ContextListener
listeners.SessionListener
SendMailServlet SendMailServlet
snoop
SnoopServlet
Security role for anonymous access tomcat
servletToJsp
servletToJsp
CompressionFilterTestServlet
compressionFilters.CompressionFilterTestServlet
invoker /servlet/*
CompressionFilterTestServlet
/CompressionTest
SendMailServlet /SendMailServlet
snoop
/snoop
servletToJsp
/servletToJsp
http://jakarta.apache.org/tomcat/debug-taglib
/WEB-INF/jsp/debug-taglib.tld
http://jakarta.apache.org/tomcat/examples-taglib
/WEB-INF/jsp/example-taglib.tld
mail/Session javax.mail.Session Container
Example Security Constraint
Protected Area
/jsp/security/protected/*
DELETE GET POST PUT
tomcat role1
FORM Example Form-Based Authentication Area
/jsp/security/protected/login.jsp /jsp/security/protected/error.jsp
role1
tomcat
minExemptions 1 java.lang.Integer
foo/name1 value1 java.lang.String
foo/bar/name2 true java.lang.Boolean
name3 1 java.lang.Integer
foo/name4 10 java.lang.Integer
Example EJB Reference ejb/Account Entity com.mycompany.mypackage.AccountHome com.mycompany.mypackage.Account
Example Local EJB Reference ejb/ProcessOrder Session com.mycompany.mypackage.ProcessOrderHome com.mycompany.mypackage.ProcessOrder
|