请问如何配置WEB.XML?听说SCWCD中考了不少,急~~~~

deeprising 2002-05-01 11:34:47
如题
...全文
37 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
deeprising 2002-05-07
  • 打赏
  • 举报
回复
谢谢~~~请问在tomcat,resin等中配置都一样吗
cxmlc 2002-05-04
  • 打赏
  • 举报
回复
<?xml version="1.0" encoding="UTF-8" ?>
- <!-- edited with XML Spy v3.5 NT (http://www.xmlspy.com) by ()
-->
<!DOCTYPE web-app (View Source for full doctype...)>
- <web-app>
<display-name>SCWCD</display-name>
<description>学习配置DD</description>
- <context-param>
<param-name>user</param-name>
<param-value>scwd</param-value>
</context-param>
- <context-param>
<param-name>password</param-name>
<param-value>scwcd</param-value>
</context-param>
- <listener>
<listener-class>javax.servlet.http.HttpSessionListener</listener-class>
</listener>
- <servlet>
<servlet-name>index</servlet-name>
<servlet-class>servlets.index</servlet-class>
- <init-param>
<param-name>name</param-name>
<param-value>servlet</param-value>
</init-param>
- <init-param>
<param-name>password</param-name>
<param-value>scwcd</param-value>
</init-param>
- <security-role-ref>
<role-name>my</role-name>
</security-role-ref>
</servlet>
- <servlet-mapping>
<servlet-name>index</servlet-name>
<url-pattern>/index</url-pattern>
</servlet-mapping>
- <session-config>
<session-timeout>30</session-timeout>
</session-config>
- <mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
- <mime-mapping>
<extension>doc</extension>
<mime-type>application/msword</mime-type>
</mime-mapping>
- <welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
- <error-page>
<error-code>404</error-code>
<location>error/404.html</location>
</error-page>
- <error-page>
<exception-type>java.lang.Exception</exception-type>
<location>error/exception.html</location>
</error-page>
- <taglib>
<taglib-uri>/mytld</taglib-uri>
<taglib-location>/WEB-INF/tlds/mytld/tld</taglib-location>
</taglib>
- <security-constraint>
- <web-resource-collection>
<web-resource-name>my</web-resource-name>
<url-pattern>/index</url-pattern>
<url-pattern>/admin/*</url-pattern>
<http-method>get</http-method>
</web-resource-collection>
- <auth-constraint>
<description>Secury Test</description>
<role-name>Admin</role-name>
</auth-constraint>
- <user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
- <login-config>
<auth-method>FORM</auth-method>
<realm-name>Form Based Scuruty</realm-name>
- <form-login-config>
<form-login-page>/login.html</form-login-page>
<form-error-page>/error.html</form-error-page>
</form-login-config>
</login-config>
- <security-role>
<role-name>my</role-name>
<description>这是一个安全规则</description>
</security-role>
</web-app>

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧