struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Multiple Struts Config - Using the form tag
Date Wed, 29 Aug 2007 18:43:25 GMT
Hi all,
I have an application which uses multiple struts-config files.  I'm trying 
to add a new one in which there will be an action which I want to be 
called when a particular jsp submit button is depressed.  As I would with 
a single struts-config file, I'm just constructing a form tag like this:
        <html:form action="someAction" method="post">
where someAction is defined in struts-module2.xml
The web.xml defines the second module like this:
When I run the jsp, it can't find the action.  I highly suspect this is 
because the struts custom tag library is building a URL for the action 
based on my web-context and not including the module name.  Then it is 
looking for the URL.  Of course it isn't found because the URL should 
include the module name which in this case is 
"/context/module2/".  I would think though that struts is 
smart enough to manipulate the URL until it finds a config file that 
contains the action!  The error message I get is:
        Error 500: Cannot retrieve mapping for action: "/someAction" 
I can make the error go away buy putting the action in the default 
struts-config.  I could deal with this using a javascript submit button, 
or some other creative solution, but I'd rather do it the "right" way. Any 
ideas? Is this a bug?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message