struts.xml常用配置
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"><struts><constant name="struts.custom.i18n.resources" value="message"></constant><constant name="struts.multipart.saveDir" value="c:"></constant><package name="struts2" extends="struts-default"> <global-results><result name="global-exception">/global_exception.jsp</result></global-results><global-exception-mappings><exception-mapping result="global-exception" exception="java.lang.Exception"></exception-mapping></global-exception-mappings><!-- <interceptors><interceptor name="myInterceptor" type="redirect">/login2.jsp</result><result name="passwordInvalid">/passwordInvalid.jsp</result></global-results><global-exception-mappings><exception-mapping result="passwordInvalid" exception="com.test.exception.PasswordException"></exception-mapping></global-exception-mappings><action name="login" exception="com.test.exception.UsernameException"></exception-mapping><result name="success">/result.jsp</result><result name="usernameInvalid">/usernameInvalid.jsp</result></action><action name="pointConverter" type="stream"><param name="contentType">application/vnd.ms-powerpoint</param><param name="contentDisposition">filename="Struts2.ppt"</param><param name="inputName">downloadFile</param></result></action></package></struts>