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


Please Help Members By Posting Answers For Below Questions

What is the purpose of '@customvalidator'?

580


How can we integrate log4j in Struts2 application?

562


What do you mean by inner class and anonymous class?

595


What is a custom tag?

545


Can you give an overview of how a struts application flows?

527






What is the different actions available in struts?

544


What does i18n interceptor?

581


Explain struts?

554


What is the difference between plain-validator and field-validator?

520


Is struts 1 still supported?

512


What should be the name of xml file used for validation in struts?

541


Which class of struts is responsible to converts data types from string and vice versa?

663


What is the purpose of '@keyproperty'?

573


What do you mean by actionform?

581


What is used to display the intermediate result in an interceptor?

503