After doing a little more research, it looks like the html:form tag only
uses the current module.  Thus, what you need to do is switch modules before
you do a form post.

One way to do this is change your default config xml to link to the html
form page in your module1

<action path="/Module1HomeLink"
type="com.qualcomm.bds.struts.SampleAppSuccessAction" validate="false" >

  <forward name="success" path="module1/home.do"  />   
</action>


Then in your struts-config-module1.xml add the following entry....
        <action path="/home" forward="/Home.jsp" />
        
        <action
      path="/DomainSearch"
      name="SearchForm"
      type="com.qualcomm.bds.struts.SampleAppSearchAction"
      input="/Home.jsp" >

Hope this helps!
> -----Original Message-----
> From: Liu, Anne I [SMTP:[EMAIL PROTECTED]
> Sent: Friday, March 12, 2004 10:13 AM
> To:   'Struts Users Mailing List'
> Subject:      RE: help implementing modules...
> 
> I think it might be a problem with using the html tag library?? 
> 
> I use straight HTML and it seems to work fine....
> 
> <form action="DomainSearch.do">
> > -----Original Message-----
> > From:       Damm, Gary [SMTP:[EMAIL PROTECTED]
> > Sent:       Thursday, March 11, 2004 5:50 PM
> > To: Daniel; Struts Users Mailing List
> > Subject:    RE: help implementing modules...
> > 
> > Thanks for the feedback.  I removed these and still the same problem.
> > 
> > Also, I originally put them in on the guidance of the UserGuide.
> > 
> > Anything else look like a problem?
> > 
> > Thanks,
> > Gary
> > 
> > > -----Original Message-----
> > > From: Daniel [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, March 11, 2004 1:41 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: help implementing modules...
> > > 
> > > ops ;-) and contextRelative too.
> > > 
> > > 
> > > ----- Original Message -----
> > > From: "Liu, Anne I" <[EMAIL PROTECTED]>
> > > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > > Sent: Thursday, March 11, 2004 5:08 PM
> > > Subject: RE: help implementing modules...
> > > 
> > > 
> > > > I don't know if this will help, but you have to prepend the module
> > name
> > > into
> > > > your URL.
> > > >
> > > > Thus, your link should look like
> > > >
> > > > <html-el:form action="module1/DomainSearch">
> > > >
> > > > I've found the short section in the struts the most helpful when
> > dealing
> > > > with modules....
> > > >
> > > >
> > >
> > http://jakarta.apache.org/struts/userGuide/configuration.html#dd_config_
> > mo
> > > du
> > > > les
> > > >
> > > > > -----Original Message-----
> > > > > From: Damm, Gary [SMTP:[EMAIL PROTECTED]
> > > > > Sent: Thursday, March 11, 2004 1:56 PM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: help implementing modules...
> > > > >
> > > > > I've successfully used Struts for several applications and have
> > been
> > > > > very happy with it.  I am getting ready to use it for a larger
> > project
> > > > > and would like to use modules but I'm having some problems.
> > > > >
> > > > > It appears that when I attempt to switch from the default module
> > to a
> > > > > new module (module1) it never actually recognizes the new module.
> > > When
> > > > > I attempt to go to a page in the new module that references an
> > action
> > > > > that is defined in the new module action mappings I consistently
> > get
> > > the
> > > > > following error.  I have looked through the documentation and
> > browsed
> > > > > the list archive and still can not figure out what I'm doing
> > wrong.
> > > Any
> > > > > help appreciated.
> > > > >
> > > > > Also, if anyone knows a good book that documents modules well I'd
> > like
> > > > > to know (Struts In Action and Jakarta Struts have little
> > information
> > > on
> > > > > modules).
> > > > >
> > > > > The error:
> > > > > ...
> > > > > [2004/03/11 11:23:07] Cannot retrieve mapping for action
> > /DomainSearch
> > > > > javax.servlet.jsp.JspException: Cannot retrieve mapping for action
> > > > > /DomainSearch
> > > > >         at
> > > > > org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:810)
> > > > >         at
> > > > > org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
> > > > >         at
> > > > >
> > >
> > org.apache.strutsel.taglib.html.ELFormTag.doStartTag(ELFormTag.java:324)
> > > > >         at _module1._home__jsp._jspService(_home__jsp.java:448)
> > > > > ...
> > > > >
> > > > > Here is my web.xml where I define the module:
> > > > >
> > > > > ...
> > > > > <init-param id="InitParam_4">
> > > > > <param-name>config/module1</param-name>
> > > > > <param-value>/WEB-INF/struts-config-module1.xml</param-value>
> > > > > </init-param>
> > > > > ...
> > > > >
> > > > > Here is my forward to the page in module1:
> > > > > ...
> > > > > <action
> > > > >       path="/Module1HomeLink"
> > > > >       type="com.qualcomm.bds.struts.SampleAppSuccessAction"
> > > > >       unknown="false"
> > > > >       validate="false" >
> > > > >
> > > > >       <forward
> > > > > name="success"
> > > > > path="/module1/Home.jsp"
> > > > > contextRelative="true"
> > > > > redirect="true" />
> > > > >
> > > > >     </action>
> > > > > ...
> > > > >
> > > > > Here is my link on the originating jsp (in default module):
> > > > > ...
> > > > > <html-el:link action="Module1HomeLink"><bean:message
> > > > > key="label.module1"/></html-el:link>
> > > > > ...
> > > > >
> > > > > Here is the form in the new module that references the action:
> > > > > ...
> > > > > <html-el:form action="DomainSearch">
> > > > > ...
> > > > >
> > > > > Here is the action in the module1 config file:
> > > > > ...
> > > > > <action
> > > > >       path="/DomainSearch"
> > > > >       name="SearchForm"
> > > > >       type="com.qualcomm.bds.struts.SampleAppSearchAction"
> > > > >       unknown="false"
> > > > >       validate="true"
> > > > >       input="/module1/Home.jsp" >
> > > > >
> > > > >       <forward
> > > > >         name="success"
> > > > >         path="/module1/List.jsp"
> > > > >         contextRelative="true" />
> > > > >
> > > > > <exception
> > > > > key="errors.generic"
> > > > > type="java.lang.Exception"/>
> > > > >
> > > > >     </action>
> > > > > ...
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to