This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
The Struts custom tags will look for a ModuleConfig object that is placed in request scope. This object relates to a struts config file. If a URL refers to a module, the request will contain a ModuleConfig object for that module, regardless of where your JSP page is located. Thus, the html:link tag that uses the ModuleConfig object may be looking in the wrong Struts config file for your action mapping.
So should I add the action forward to each modules struts-config.xml? If so then how do I get around the relative path URL? Will the module assume the path is relative to the itself even though my index.jsp is in a folder one layer up? Is it just "../index.jsp"?
Also, how would you link from one module to another? Would you enter the module name in the url or again would this be seen as a path relative to the current module?
Joined: Sep 25, 2003
I prefer to use JSTL tags in favor of Struts custom tags where there is an overlap in functionality. Struts 1.24 has added a 'module' attribute to some of its custom tags, but I'm not sure what version you are trying to use. My advice is to start working with JSTL. Here's an example of rendering an image in the public module using JSTL: