Re: help with modules

2004-03-26 Thread James Norman
Try adding contextRelative=true to the forwards in your
struts-config.  I remember a similar problem I had a while back, but I'm
not entirely sure this will solve it.  Here is an example of an Action I
had in a struts module I wrote:

action path=/listLoggers
type=com.perceptive.logconfig.actions.GetLoggersAction
name=loggersForm
attribute=loggers
scope=request
validate=false
forward name=success
path=/WEB-INF/logging/listLoggers.jsp redirect=false
contextRelative=true/
/action

-james
 
On Fri, 2004-03-26 at 10:08, Bruce Christie wrote:
 Hello,
 
 I am playing around with modules and things work pretty nicely =
 except
 
 I have a tiles template that reads in a menu.jsp from the default =
 WEB-INF.  The links to the actions are prepended with the module. (i.e. =
 html:link action =3Dmodule1/dosomething.do/. )
 
 This works fine expect that once I am in the correct module the link =
 then points to  module1/module1/dosomething.do.  Is there a way that the =
 link tag can be used so that it will drop the module prefix when I am in =
 the module asscoiated with the action?
 
 I think I read something about adding a module @ to the link tag but DTD =
 complains.
 
 Thanks
 Bruce
 
 -
 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]



RE: help implementing modules...

2004-03-12 Thread Liu, Anne I
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-nameconfig/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=Module1HomeLinkbean: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

RE: help implementing modules...

2004-03-12 Thread Liu, Anne I
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-nameconfig/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=Module1HomeLinkbean: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

RE: help implementing modules...

2004-03-12 Thread Damm, Gary
Thanks, this is the best explanation I've read so far on switching
modules.

One issue I have with this.  In my applications I always have an
application specific BaseAction that all of my Action classes extend
from.  This is to enforce my business rules on every request.  I do not
use generic/predefined Actions.  When I have found the need for the
functionality of the predefined actions (Success, Dispatch, Switch, etc)
I've reimplemented them so they extend my BaseAction.

What I would like to see, and this is targeted to the community in
general, is a way to use these generic behaviors without having to
bypass my BaseAction or reimplement them.  Maybe as helper classes that
I call from my actions.  

There are several ways to solve this and I just thought I should put it
out there to see if others have experienced the same issues and have
some other solutions.

 -Original Message-
 From: Srikanth Shenoy [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 11, 2004 7:30 PM
 To: [EMAIL PROTECTED]
 Subject: Re: help implementing modules...
 
 Hi Gary,
 
 I would suggest download the following free chapter from my book -
 Struts Survival Guide.
 Go to http://www.objectsource.com and find the link there to download
 Chapter 4.
 It tells you how to setup and use modules.
 
 Hope that helps,
 
   Srikanth Shenoy
   Author
   Struts Survival Guide: Basics to Best Practices
 http://www.objectsource.com/strutsbook.html
   J2EE Project Survival Guide
 http://www.theserverside.com/books/review/J2EESurvivalGuide.tss
 
 
 Damm, Gary [EMAIL PROTECTED] wrote in message

news:[EMAIL PROTECTED]...
 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-nameconfig/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=Module1HomeLinkbean: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]



RE: help implementing modules...

2004-03-11 Thread Liu, Anne I
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_modu
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-nameconfig/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=Module1HomeLinkbean: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]



Re: help implementing modules...

2004-03-11 Thread Daniel
take out the redirect attribute.

Abra├žos
Daniel S.

- 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_modu
 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-nameconfig/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=Module1HomeLinkbean: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]



Re: help implementing modules...

2004-03-11 Thread Daniel
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_modu
 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-nameconfig/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=Module1HomeLinkbean: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]



RE: help implementing modules...

2004-03-11 Thread Damm, Gary
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-nameconfig/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=Module1HomeLinkbean: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]



Re: help implementing modules...

2004-03-11 Thread Srikanth Shenoy
Hi Gary,

I would suggest download the following free chapter from my book -
Struts Survival Guide.
Go to http://www.objectsource.com and find the link there to download
Chapter 4.
It tells you how to setup and use modules.

Hope that helps,

  Srikanth Shenoy
  Author
  Struts Survival Guide: Basics to Best Practices
http://www.objectsource.com/strutsbook.html 
  J2EE Project Survival Guide
http://www.theserverside.com/books/review/J2EESurvivalGuide.tss 


Damm, Gary [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
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-nameconfig/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=Module1HomeLinkbean: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
...
--