File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

configuring multiple application modules in struts framework

 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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