Tuesday, 12 April 2016

How to use multiple Struts 2x configuration files ?


In Struts 2x, you should always have module-wise struts configuration files.

Example 
struts-audit.xml – Put all audit module settings here.
struts-user.xml – Put all user modules settings here. 
struts.xml – Put default settings and include the struts-audit.xml and struts-user.xml.

struts.xml
<struts>
  <package name="default" namespace="/" extends="struts-default">
     .......
  </package>
  <include file="user/struts-user.xml" />
  <include file="audit/struts-audit.xml" />
</struts>

No comments:

Post a Comment

Note: only a member of this blog may post a comment.