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

Where can I get help with struts?

770


What is the purpose of @conversionerrorfieldvalidator annotation?

873


Which servlet does the struts framework use?

730


How duplicate form submission can be controlled in struts?

886


Explain about logic match tag?

796


How struts2 supports internationalization?

899


how does request processor relates to action mapping?

702


What’s the difference between struts and turbine? What’s the difference between struts and espresso?

754


Do we need to pay the struts if being used in commercial purpose?

753


Mark the differences between html tags and strut specific html tags.

781


Are struts and shocks the same?

686


Explain integrate log4j in struts2 application?

785


Explain about the validation steps which have to be carried during validation of client-side address?

752


What do you mean by struts.dev mode?

716


How are interceptors and servlet filters different?

707