struts.xml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
  3. "http://struts.apache.org/dtds/struts-2.1.7.dtd">
  4. <struts>
  5. <constant name="struts.devMode" value="false"></constant>
  6. <constant name="struts.objectFactory" value="spring"></constant>
  7. <constant name="struts.locale" value="zh_CN"></constant>
  8. <constant name="struts.i18n.encoding" value="utf-8"></constant>
  9. <constant name="struts.ui.theme" value="simple"></constant>
  10. <constant name="struts.custom.i18n.resources" value="globalMessages"></constant>
  11. <constant name="struts.multipart.maxSize" value="209715200"/>
  12. <constant name="struts.convention.result.path" value="/pages/"/>
  13. <constant name="struts.convention.classes.reload" value="true" />
  14. <constant name="struts.convention.default.parent.package" value="jeeweb-default"/>
  15. <package name="jeeweb-default" extends="convention-default">
  16. <result-types>
  17. <result-type name="json" class="com.hcks.cmfds.core.web.PlainStringResult"></result-type>
  18. </result-types>
  19. <!-- <interceptors>
  20. <interceptor class="com.hcks.cmfds.core.security.AuthenticationInterceptor" name="authenticate"/>
  21. <interceptor-stack name="defaultStack">
  22. <interceptor-ref name="exception"/> 引用异常映射拦截器
  23. <interceptor-ref name="servletConfig"/>
  24. <interceptor-ref name="authenticate"/> 引用自定义安全验证用户拦截器
  25. <interceptor-ref name="checkbox"/>
  26. <interceptor-ref name="params">
  27. <param name="excludeParams">.*\\u0023.*</param>
  28. </interceptor-ref>
  29. <interceptor-ref name="conversionError"/> 引用类型转换拦截器
  30. <interceptor-ref name="chain" />
  31. <interceptor-ref name="validation">
  32. <param name="excludeMethods">input,back,cancel,browse,load,list</param>
  33. </interceptor-ref>
  34. <interceptor-ref name="workflow">
  35. <param name="excludeMethods">input,back,cancel,browse,load,list</param>
  36. </interceptor-ref>
  37. </interceptor-stack>
  38. <interceptor-stack name="fileUploadStack">
  39. <interceptor-ref name="fileUpload"/>
  40. <interceptor-ref name="defaultStack"/>
  41. </interceptor-stack>
  42. <interceptor-stack name="tokenStack">
  43. <interceptor-ref name="token"/>
  44. <interceptor-ref name="defaultStack"/>
  45. </interceptor-stack>
  46. <interceptor-stack name="uploadStack">
  47. <interceptor-ref name="fileUpload">
  48. <param name="maximumSize">20971520</param> 20M=20*1024*1024 byte
  49. </interceptor-ref>
  50. </interceptor-stack>
  51. </interceptors> -->
  52. <global-results>
  53. <result name="errorHandler" type="chain">
  54. <param name="actionName">error</param>
  55. <param name="namespace">/</param>
  56. </result>
  57. <result name="login" type="redirect">/index.action${#request.returnURL}</result>
  58. </global-results>
  59. <global-exception-mappings>
  60. <exception-mapping
  61. exception="com.hcks.cmfds.core.security.AuthenticationException" result="invalid.permission" />
  62. <exception-mapping exception="java.lang.Throwable" result="errorHandler" />
  63. </global-exception-mappings>
  64. </package>
  65. </struts>