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 > > <html:link action="/Register">Register</html:link> > > > > In my struts.config.xml file, I should have action > > mapping like this: > > > > <action > > path="/Register" > > parameter=".frame.Enrollment" > > > type="org.apache.struts.actions.ForwardAction"/> > > > > What if I do a global forward: > > > > <html:link > forward="/Register">Register</html:link> > > > > what kind of mapping should I specify in the > > struts-config.xml file? > > <global-forwards> > <!-- Default forward to "Welcome" action --> > <!-- Demonstrates using index.jsp to forward --> > <forward name="Register" > > path="/whatever/link/you/want/the/forward/to/be/replaced/with"/> > blah > </global-forwards > > > > > --- Caroline Jen <[EMAIL PROTECTED]> wrote: > > > > > Thanks for your reply and help. > > > > > > if I have > > > <html:link > action="/Register">Register</html:link> > > > > > > In my struts.config.xml file, I should have > action > > > mapping like this: > > > > > > <action > > > path="/Register" > > > parameter=".frame.Enrollment" > > > > > > type="org.apache.struts.actions.ForwardAction"/> > > > > > > What if I do a global forward: > > > > > > <html:link > forward="/Register">Register</html:link> > > > > > > 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): > > > > > > > > > > <html:link > > > > forward="/Register">Register</html:link> > > > > > > > > <html:link > action="/Register">Register</html:link> > > > > > > > > However, upon further reflction... > > > > If what you really want is > > > > <a href="/Register.do">Register</a> > > > > 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: > > > > > > > > > > <action > > > > > 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 > > > > > > > > > > > > > > <action > > > > > > > forward=".frame.Enrollment" > > > > > > > > > > > > > > > > type="org.apache.struts.actions.ForwardAction"/> > > > > > > > > > > > > > > where .frame.Enrollment is the tile that > > > > contains > > > > > > my > > > > > > > JSP 2. > > > > > > > > > > > > <action path="/saveSubscription" > > > > > > > type="org.apache.struts.actions.ForwardAction" > > > > > > name="yourForm" scope="request" > > > > > > input="/subscription.jsp" > > > > parameter="/path/to/jsp"/> > > > > > > > > > > > > or > > > > > > > > > > > > <action path="/saveSubscription" > > > > > > > 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] > === message truncated === _______________________________ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]