• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

configuring multiple application modules in struts framework

 
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
can anyone please tell me how to configured multiple application modules in struts framework?
Can you tell me the directory structure of web application.
How it is going to distinguish application modules with the help of request.

I am referring to the code snippet given in jakarta Struts by Oreilly

Protected void process(HttpServletRequest req, HttpServletResponse res) throws IOException,ServletException
{
org.apache.struts.util.RequestUtils.selectModule(req,getServletContext());
getRequestProcessor(getModuleConfig(req)).process(req,res);
}

Thanks in advance
Shrinivas
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's all done in the web.xml. Instead of listing only one struts-config file, you make one for each module.
<init-param>
<param-name>config</param-name>
<param-value>WEB-INF/config/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>config/module1</param-name>
<param-value>WEB-INF/config/struts-config-module1.xml</param-value>
</init-param>
<init-param>
<param-name>config/module2</param-name>
<param-value>WEB-INF/config/struts-config-module2.xml</param-value>
</init-param>
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Marc,
What you have said is correct but what will be directory structure for diffrent modules?

Shrinivas
 
It means our mission is in jeapordy! Quick, read this tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic