aspose file tools*
The moose likes Struts and the fly likes struts forward link? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts forward link?" Watch "struts forward link?" New topic
Author

struts forward link?

Pat Peg
Ranch Hand

Joined: Feb 04, 2005
Posts: 194
Hi,

I have tried finding an answer but I cna't seem to locate a simple code example of how to do what should be a simple thing (Still learning struts)

I want to do this

Do you still just do links the same way or is there a 'struts way' of doing this? If so, how?

Thanks
Pat Peg
Ranch Hand

Joined: Feb 04, 2005
Posts: 194
I found an example here...
http://publib.boulder.ibm.com/infocenter/rtnlhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.struts.doc/topics/cstrdoc006.html

and I am trying to implemet. What is the difference between a local and global forward? When would I use what?

In this part of the example....

what is the "bean:message key="mainMenu.logoff"/" part doing?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
One of the differences between a global forward and a local forward is that you can't use a local forward in an <html:link> tag. You must use a global forward. The main difference, though, is that a global forward can be used in an Action class, whereas a local forward can be used only in the Action class for which the forward is defined.

As for the <bean:message> tag: here is a link to the documentation for the <bean> tags.


Merrill
Consultant, Sima Solutions
Pat Peg
Ranch Hand

Joined: Feb 04, 2005
Posts: 194
Thanks for the link. I am trying to digest it but I think I am only confusing myself.

I learn best from examples, is there a simple code example somewhere that does just this one function? It seams like in the entire crawl-walk-run learning cycle struts has a few crawl, more run but almost no walk. It is very frustrating.
Pat Peg
Ranch Hand

Joined: Feb 04, 2005
Posts: 194
Here is the code I have so far but it isn't working...

I am not sure what I am doing wrong. I did not put a bean in because I am not sure that I need one-I don't know if that is allowed

Also, on my pageforward class, I couldn't think of a fail case so I am not sure if what I did there was correct or not.

Any insight would be appreciated.

Thanks
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Pat,

I'm going to suggest a change in approach here. Rather than struggling through creating your own application without any guidelines, I'd suggest you lay this project aside for a while, and do one of the many good Struts tutorials that are out there. These will walk you step-by-step through the process of creating and testing a Struts application. Once you have done one or two of these, I think you'll be much more ready to tackle your own application.

Here are some links to a few good Struts tutorials:

http://javaboutique.internet.com/tutorials/Struts/

http://wiki.apache.org/struts/StrutsTutorials
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts forward link?
 
Similar Threads
JSTL vs struts tag
Tiles advice
sorting the result
help on taglib and properties file in struts?
Trouble with struts validator