Can we have multiple struts-config files in a single web
app? If yes why should we have them? Will multiple copies
make any impact on performance?
Answer Posted / sumit sharma
Yes it is possible... If you are developing the distributed
applications (means do you have diff modules)
then you can provide any number of struts-config.xml files
based on your number of modules.
But the thing is you must enter those struts-config.xml
files details in deployment descripter (i.e. web.xml) like
<init-param>
<param-name>
config</param-name>
<param-value>/WEB-INF/struts-first-config.xml /WEB-
INF/struts-second-config.xml /WEB-INF/struts-third-
config.xml</param-value>
</init-param>
Here I assumed as 'I have 3 modules'. Thats why I entered 3
struts-config.xml files information.
In the time of calling files which are provided under
different modules you must provide Page and prefix
attributes in
your URL.
| Is This Answer Correct ? | 40 Yes | 1 No |
Post New Answer View All Answers
Can you explain aware interfaces in struts2?
What is token used for?
What is value stack?
Lists the bundled validators in struts?
What are the steps of struts installation?
What are action classes in struts?
What is struts xml?
What is the purpose of @validations annotation?
What is xml based validation in struts2?
What is controller in struts2?
How can we write our own interceptor and map it for action?
What are the Core classes of Struts Framework?
What is the purpose of action tag in struts.xml?
What is the purpose of @requiredstringvalidator annotation?
In how many ways duplicate form submission can occurs?