Tom Holmes Jr. wrote the following on 9/11/2004 7:02 PM:
So, I guess the only question I have is:
Is there a problem with a web-site that contains a bunch of links to various '.do' pages as opposed to '.jsp' pages? Are there any security concerns? Do I really want to have direct links to '.do' pages?
Remember when you are setting up a global forward and going, as you say, directly to a page from a .do link you are really still using a default FowardAction provided by Struts. You DEFINTELY want to do this (as you have) vs going directly to a jsp page. If you decided later you need to do something before you forwarded to your jsp you could easily set you same .do link as a mapping to go to one of your own custom actions. If you had bypassed this step by providing just a basic link to the jsp you would end up having to change your link. Bottom line is you always want to go through a controller (an Action class) even if it's just the simple ForwardAction.
If you had to call a page that needed to display data immediately, is this how you would do it?
What do you mean by display data immediately? You still always want to have your links use a struts mapping (.do or whatever you are using).
Oh, and I was think the ApplicationResources to put in the links to my navigation menu ... now that I see global forwards. Could I use this to define my list of main pages for various parts of my web-site?
I usually don't put the actual links(ie. /employeeAction.do) in the ApplicationResources file, but I will put their names in there sometimes (ie link.update.employee=Update Employee). For your navigation you *should* only have to maintain one page for these links so maintenance is easy so I don't see much reason to put the links in the App resources file. (If you are having to copy your navigation links on to different pages consider using Sitemesh or Tiles. Your navigation should just be one page).
-- Rick
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]