配置struts应用(1)
struts应用采用两个基于xml的配置文件来配置应用,这两个配置文件是web.xml和struts-config.xml。web.xml适用于所有的java web应用。struts-config.xml文件是struts应用专有的配置文件。
dtd文档类型定义(document type definition)对xml文档的格式做了定义。<web-app>是web应用发布文件的顶层元素。
<!element web-app(icon?,display-name?,description?,distributable?,
context-param*,filter*,filter-mapping*,
listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,
welcome-file-list?,error-page*,taglib*,
resource-env-ref*,resource-ref*,security-constraint*,login-config?,
security-role*,env-entry*,ejb-ref*,ejb-local-ref*)
>