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 struts framework?

546


What is spring hibernate and struts in java?

486


What is controller in struts2?

496


What is the different actions available in struts?

542


Can you explain the directory structure for a struts folder in brief ?

518






What is the forward action utilized for?

550


What's mvc pattern ?

584


Explain the difference between jakarta struts and apache struts?

521


What is switchaction?

653


Explain the difference between dispatchaction and lookupdispatchaction in struts?

2089


How to work with error tags?

561


What is the difference between requestaware and servletrequestaware interface?

578


What are the steps of struts installation?

569


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

520


What is apache struts cve 2017 5638?

542