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
How nested beans can be used in Struts applications?
Describe the mvc on struts?
Which interceptor is responsible for mapping request parameters to action class Java Bean properties?
Explain about the library tag?
What do you mean by action errors and what are the results they force?
What is the purpose of constant tag in struts.xml?
In struts.xml, what does the attribute "method" stands for in the "action" tag?
What are the main classes which are used in struts application?
What is request processor and how does it relates to action mapping?
Are struts and shocks the same?
What is struts actionmapping?
Why are springs better than struts?
Briefly tell the two kinds of form beans.
What are result types in struts?
What configuration changes are required to use resource files in Struts?