aspose file tools*
The moose likes Struts and the fly likes configuring multiple application modules in struts framework Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "configuring multiple application modules in struts framework" Watch "configuring multiple application modules in struts framework" New topic
Author

configuring multiple application modules in struts framework

Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
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

Joined: Feb 05, 2003
Posts: 4727

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>


A good workman is known by his tools.
Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
Hello Marc,
What you have said is correct but what will be directory structure for diffrent modules?

Shrinivas
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: configuring multiple application modules in struts framework
 
Similar Threads
user object across multiple web Context
A process (or flow ) for creating an application
How to Link spring into struts
Can i have multiple struts-config files in struts1.1
session management -cookie disabled