This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

configuring multiple application modules in struts framework  RSS feed

 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • 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
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Hello Marc,
What you have said is correct but what will be directory structure for diffrent modules?

Shrinivas
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!