RE: Action Mapping From a JSP to Another JSP (How to Do Global Forward)

2004-09-08 Thread Jim Barrows


> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 08, 2004 10:56 AM
> To: Struts Users Mailing List
> Subject: RE: Action Mapping From a JSP to Another JSP (How to 
> Do Global
> Forward)
> 
> 
> Thanks a lot for being around and helping us.

You're welcome.. and thank you for helping me, not only directly but by asking 
questions and making me dig through code and documentation to find the answers.  I 
learn a lot by answering questions.

> 
> -CJen
> --- Jim Barrows <[EMAIL PROTECTED]> wrote:
> 
> > 
> > 
> > > -Original Message-
> > > From: Caroline Jen [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, September 08, 2004 10:34 AM
> > > To: Struts Users Mailing List
> > > Subject: RE: Action Mapping From a JSP to Another
> > JSP (How to 
> > > Do Global
> > > Forward)
> > > 
> > > 
> > > Thanks for your reply and help.
> > > 
> > > if I have 
> > > Register
> > > 
> > > In my struts.config.xml file, I should have action
> > > mapping like this:
> > >  
> > >   > >  path="/Register"
> > >  parameter=".frame.Enrollment"
> > >  
> > type="org.apache.struts.actions.ForwardAction"/>
> > > 
> > > What if I do a global forward:
> > > 
> > >  > forward="/Register">Register
> > > 
> > > what kind of mapping should I specify in the
> > > struts-config.xml file?
> > 
> > 
> > 
> > 
> >  > 
> >
> path="/whatever/link/you/want/the/forward/to/be/replaced/with"/>
> > blah
> >  > 
> > > 
> > > --- Caroline Jen <[EMAIL PROTECTED]> wrote:
> > > 
> > > > Thanks for your reply and help.
> > > > 
> > > > if I have 
> > > >  > action="/Register">Register
> > > > 
> > > > In my struts.config.xml file, I should have
> > action
> > > > mapping like this:
> > > >  
> > > >   > > >  path="/Register"
> > > >  parameter=".frame.Enrollment"
> > > >  
> > > > type="org.apache.struts.actions.ForwardAction"/>
> > > > 
> > > > What if I do a global forward:
> > > > 
> > > >  > forward="/Register">Register
> > > > 
> > > > what kind of mapping should I specify in the
> > > > struts-config.xml file?
> > > > 
> > > > --- Jim Barrows <[EMAIL PROTECTED]> wrote:
> > > > 
> > > > > 
> > > > > 
> > > > > > -Original Message-
> > > > > > From: Caroline Jen
> > [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Tuesday, September 07, 2004 2:25 PM
> > > > > > To: Struts Users Mailing List
> > > > > > Subject: RE: Action Mapping From a JSP to
> > > > Another
> > > > > JSP (Now, the
> > > > > > Hyperlink Is Not Working)
> > > > > > 
> > > > > > 
> > > > > > Now, I do not even get the hyperlink
> > working.
> > > > > > 
> > > > > > In my JSP 1, which is home.jsp, I have this
> > > > > hyperlink
> > > > > > (something is wrong with it):
> > > > > > 
> > > > > >  > > > > forward="/Register">Register
> > > > > 
> > > > >  > action="/Register">Register
> > > > > 
> > > > > However, upon further reflction...
> > > > > If what you really want is
> > > > > Register 
> > > > > generated, then you could do it with an action
> > > > > forward too.  Which is what you tried to do
> > above,
> > > > > you just need a global forward call /Register,
> > or
> > > > > rather Register.
> > > > > 
> > > > > The difference between the two?  Not much in
> > terms
> > > > > of basic functionality.  Lots in terms of
> > re=use.
> > > > > I tend to like the start of my use cases as
> > global
> > > > > action forwards, that way I can change how to
> &g

RE: Action Mapping From a JSP to Another JSP (How to Do Global Forward)

2004-09-08 Thread Caroline Jen
Thanks a lot for being around and helping us.

-CJen
--- Jim Barrows <[EMAIL PROTECTED]> wrote:

> 
> 
> > -Original Message-
> > From: Caroline Jen [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, September 08, 2004 10:34 AM
> > To: Struts Users Mailing List
> > Subject: RE: Action Mapping From a JSP to Another
> JSP (How to 
> > Do Global
> > Forward)
> > 
> > 
> > Thanks for your reply and help.
> > 
> > if I have 
> > Register
> > 
> > In my struts.config.xml file, I should have action
> > mapping like this:
> >  
> >   >  path="/Register"
> >  parameter=".frame.Enrollment"
> >  
> type="org.apache.struts.actions.ForwardAction"/>
> > 
> > What if I do a global forward:
> > 
> >  forward="/Register">Register
> > 
> > what kind of mapping should I specify in the
> > struts-config.xml file?
> 
> 
>   
>   
>  
>
path="/whatever/link/you/want/the/forward/to/be/replaced/with"/>
>   blah
>  
> > 
> > --- Caroline Jen <[EMAIL PROTECTED]> wrote:
> > 
> > > Thanks for your reply and help.
> > > 
> > > if I have 
> > >  action="/Register">Register
> > > 
> > > In my struts.config.xml file, I should have
> action
> > > mapping like this:
> > >  
> > >   > >  path="/Register"
> > >  parameter=".frame.Enrollment"
> > >  
> > > type="org.apache.struts.actions.ForwardAction"/>
> > > 
> > > What if I do a global forward:
> > > 
> > >  forward="/Register">Register
> > > 
> > > what kind of mapping should I specify in the
> > > struts-config.xml file?
> > > 
> > > --- Jim Barrows <[EMAIL PROTECTED]> wrote:
> > > 
> > > > 
> > > > 
> > > > > -Original Message-
> > > > > From: Caroline Jen
> [mailto:[EMAIL PROTECTED]
> > > > > Sent: Tuesday, September 07, 2004 2:25 PM
> > > > > To: Struts Users Mailing List
> > > > > Subject: RE: Action Mapping From a JSP to
> > > Another
> > > > JSP (Now, the
> > > > > Hyperlink Is Not Working)
> > > > > 
> > > > > 
> > > > > Now, I do not even get the hyperlink
> working.
> > > > > 
> > > > > In my JSP 1, which is home.jsp, I have this
> > > > hyperlink
> > > > > (something is wrong with it):
> > > > > 
> > > > >  > > > forward="/Register">Register
> > > > 
> > > >  action="/Register">Register
> > > > 
> > > > However, upon further reflction...
> > > > If what you really want is
> > > > Register 
> > > > generated, then you could do it with an action
> > > > forward too.  Which is what you tried to do
> above,
> > > > you just need a global forward call /Register,
> or
> > > > rather Register.
> > > > 
> > > > The difference between the two?  Not much in
> terms
> > > > of basic functionality.  Lots in terms of
> re=use.
> > > > I tend to like the start of my use cases as
> global
> > > > action forwards, that way I can change how to
> get
> > > > into them action wise.
> > > > 
> > > > > 
> > > > > In my struts.config.xml file, I have this
> action
> > > > > mapping:
> > > > > 
> > > > >  > > > > path="/Register"
> > > > > parameter=".frame.Enrollment"
> > > > >   
> > > > >
> type="org.apache.struts.actions.ForwardAction"/>
> > > > > 
> > > > > where the .frame.Enrollment is a piece tile.
> > > > > 
> > > > > I got the following message in the browser: 
> > > > > [ServletException
> in:/frame/content/home.jsp]
> > > > Cannot
> > > > > create rewrite URL:
> > > > java.net.MalformedURLException:
> > > > > Cannot retrieve ActionForward named
> /Register'
> > > > > 
> > > > > What is wrong with my code?
> > > > > --- Jim 

RE: Action Mapping From a JSP to Another JSP (How to Do Global Forward)

2004-09-08 Thread Jim Barrows


> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 08, 2004 10:34 AM
> To: Struts Users Mailing List
> Subject: RE: Action Mapping From a JSP to Another JSP (How to 
> Do Global
> Forward)
> 
> 
> Thanks for your reply and help.
> 
> if I have 
> Register
> 
> In my struts.config.xml file, I should have action
> mapping like this:
>  
>path="/Register"
>  parameter=".frame.Enrollment"
>   type="org.apache.struts.actions.ForwardAction"/>
> 
> What if I do a global forward:
> 
> Register
> 
> what kind of mapping should I specify in the
> struts-config.xml file?





blah
 
> --- Caroline Jen <[EMAIL PROTECTED]> wrote:
> 
> > Thanks for your reply and help.
> > 
> > if I have 
> > Register
> > 
> > In my struts.config.xml file, I should have action
> > mapping like this:
> >  
> >   >  path="/Register"
> >  parameter=".frame.Enrollment"
> >  
> > type="org.apache.struts.actions.ForwardAction"/>
> > 
> > What if I do a global forward:
> > 
> > Register
> > 
> > what kind of mapping should I specify in the
> > struts-config.xml file?
> > 
> > --- Jim Barrows <[EMAIL PROTECTED]> wrote:
> > 
> > > 
> > > 
> > > > -Original Message-
> > > > From: Caroline Jen [mailto:[EMAIL PROTECTED]
> > > > Sent: Tuesday, September 07, 2004 2:25 PM
> > > > To: Struts Users Mailing List
> > > > Subject: RE: Action Mapping From a JSP to
> > Another
> > > JSP (Now, the
> > > > Hyperlink Is Not Working)
> > > > 
> > > > 
> > > > Now, I do not even get the hyperlink working.
> > > > 
> > > > In my JSP 1, which is home.jsp, I have this
> > > hyperlink
> > > > (something is wrong with it):
> > > > 
> > > >  > > forward="/Register">Register
> > > 
> > > Register
> > > 
> > > However, upon further reflction...
> > > If what you really want is
> > > Register 
> > > generated, then you could do it with an action
> > > forward too.  Which is what you tried to do above,
> > > you just need a global forward call /Register, or
> > > rather Register.
> > > 
> > > The difference between the two?  Not much in terms
> > > of basic functionality.  Lots in terms of re=use.
> > > I tend to like the start of my use cases as global
> > > action forwards, that way I can change how to get
> > > into them action wise.
> > > 
> > > > 
> > > > In my struts.config.xml file, I have this action
> > > > mapping:
> > > > 
> > > >  > > > path="/Register"
> > > > parameter=".frame.Enrollment"
> > > >   
> > > > type="org.apache.struts.actions.ForwardAction"/>
> > > > 
> > > > where the .frame.Enrollment is a piece tile.
> > > > 
> > > > I got the following message in the browser: 
> > > > [ServletException in:/frame/content/home.jsp]
> > > Cannot
> > > > create rewrite URL:
> > > java.net.MalformedURLException:
> > > > Cannot retrieve ActionForward named /Register'
> > > > 
> > > > What is wrong with my code?
> > > > --- Jim Barrows <[EMAIL PROTECTED]> wrote:
> > > > 
> > > > > 
> > > > > 
> > > > > > -Original Message-
> > > > > > From: Caroline Jen
> > > [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Tuesday, September 07, 2004 1:03 PM
> > > > > > To: Struts Users Mailing List
> > > > > > Subject: RE: Action Mapping From a JSP to
> > > Another
> > > > > JSP
> > > > > > 
> > > > > > 
> > > > > > What is the answer?
> > > > > > 
> > > > > > Do you mean
> > > > > > 
> > > > > >  > > > > >   forward=".frame.Enrollment"
> > > > > >  
> > > > >
> > type="org.apache.struts.actions.ForwardAction"/>
> > > > > > 
> >

RE: Action Mapping From a JSP to Another JSP (How to Do Global Forward)

2004-09-08 Thread Caroline Jen
Thanks for your reply and help.

if I have 
Register

In my struts.config.xml file, I should have action
mapping like this:
 
 

What if I do a global forward:

Register

what kind of mapping should I specify in the
struts-config.xml file?

--- Caroline Jen <[EMAIL PROTECTED]> wrote:

> Thanks for your reply and help.
> 
> if I have 
> Register
> 
> In my struts.config.xml file, I should have action
> mapping like this:
>  
>path="/Register"
>  parameter=".frame.Enrollment"
>  
> type="org.apache.struts.actions.ForwardAction"/>
> 
> What if I do a global forward:
> 
> Register
> 
> what kind of mapping should I specify in the
> struts-config.xml file?
> 
> --- Jim Barrows <[EMAIL PROTECTED]> wrote:
> 
> > 
> > 
> > > -Original Message-
> > > From: Caroline Jen [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, September 07, 2004 2:25 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: Action Mapping From a JSP to
> Another
> > JSP (Now, the
> > > Hyperlink Is Not Working)
> > > 
> > > 
> > > Now, I do not even get the hyperlink working.
> > > 
> > > In my JSP 1, which is home.jsp, I have this
> > hyperlink
> > > (something is wrong with it):
> > > 
> > >  > forward="/Register">Register
> > 
> > Register
> > 
> > However, upon further reflction...
> > If what you really want is
> > Register 
> > generated, then you could do it with an action
> > forward too.  Which is what you tried to do above,
> > you just need a global forward call /Register, or
> > rather Register.
> > 
> > The difference between the two?  Not much in terms
> > of basic functionality.  Lots in terms of re=use.
> > I tend to like the start of my use cases as global
> > action forwards, that way I can change how to get
> > into them action wise.
> > 
> > > 
> > > In my struts.config.xml file, I have this action
> > > mapping:
> > > 
> > >  > > path="/Register"
> > > parameter=".frame.Enrollment"
> > >   
> > > type="org.apache.struts.actions.ForwardAction"/>
> > > 
> > > where the .frame.Enrollment is a piece tile.
> > > 
> > > I got the following message in the browser: 
> > > [ServletException in:/frame/content/home.jsp]
> > Cannot
> > > create rewrite URL:
> > java.net.MalformedURLException:
> > > Cannot retrieve ActionForward named /Register'
> > > 
> > > What is wrong with my code?
> > > --- Jim Barrows <[EMAIL PROTECTED]> wrote:
> > > 
> > > > 
> > > > 
> > > > > -Original Message-
> > > > > From: Caroline Jen
> > [mailto:[EMAIL PROTECTED]
> > > > > Sent: Tuesday, September 07, 2004 1:03 PM
> > > > > To: Struts Users Mailing List
> > > > > Subject: RE: Action Mapping From a JSP to
> > Another
> > > > JSP
> > > > > 
> > > > > 
> > > > > What is the answer?
> > > > > 
> > > > > Do you mean
> > > > > 
> > > > >  > > > >   forward=".frame.Enrollment"
> > > > >  
> > > >
> type="org.apache.struts.actions.ForwardAction"/>
> > > > > 
> > > > > where .frame.Enrollment is the tile that
> > contains
> > > > my
> > > > > JSP 2.
> > > > 
> > > >   > > > type="org.apache.struts.actions.ForwardAction"
> > > > name="yourForm" scope="request"
> > > > input="/subscription.jsp"
> > parameter="/path/to/jsp"/>
> > > > 
> > > > or 
> > > > 
> > > >   > > > type="org.apache.struts.actions.ForwardAction"
> > > > name="yourForm" scope="request"
> > > > input="/subscription.jsp"
> parameter="tilename"/>
> > > > 
> > > > The name, scope and input of course being
> > optional.
> > > > 
> > > > > 
> > > > > --- Jim Barrows <[EMAIL PROTECTED]> wrote:
> > > > > 
> > > > > > 
> > > > > > 
> > > > > > > -Original Message-
> > > > > > > From: Hubert Rabago
> > [mailto:[EMAIL PROTECTED]
> > > > > > > Sent: Tuesday, September 07, 2004 12:52
> PM
> > > > > > > To: Struts Users Mailing List
> > > > > > > Subject: Re: Action Mapping From a JSP
> to
> > > > Another
> > > > > > JSP
> > > > > > > 
> > > > > > > 
> > > > > > > I think Jim meant to say
> "ForwardAction".
> > > > > > > 
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
http://struts.apache.org/api/org/apache/struts/actions/Forward
> > > > > > > Action.html
> > > > > > 
> > > > > > I did say that :) The fingers on the other
> > > > > > hand.. :)
> > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > On Tue, 7 Sep 2004 12:49:49 -0700, Jim
> > Barrows
> > > > 
> > > > > > > <[EMAIL PROTECTED]> wrote:
> > > > > > > > 
> > > > > > > > 
> > > > > > > > > -Original Message-
> > > > > > > > > From: Caroline Jen
> > > > > > [mailto:[EMAIL PROTECTED]
> > > > > > > > > Sent: Tuesday, September 07, 2004
> > 12:46 PM
> > > > > > > > > To: [EMAIL PROTECTED]
> > > > > > > > > Subject: Action Mapping From a JSP
> to
> > > > Another
> > > > > > JSP
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > I have two JSPs: JSP 1 and JSP 2
> > > > > > > > >
> > > > > > > > > JSP 1 has a hyperlink (register). 
> > Once
> > > > users
> > > > > > click on
> > > > > > > > > the 'register' hyperlink, the users
> > are
> > >