Like I said. Don't link to any JSPs from a JSP. So you need to look into
things a little more or you will have problems in the long run. If you
really don't need to do any type of preparation for the display of a JSP
(i.e. nothing put in the request,session,etc. for the JSP to pull out) then
use:
<action path="/home"
parameter="doc.welcome"
type="org.apache.struts.action.ForwardAction"
scope="request">
</action>
Most of the time you will want to go to a real action and do something.
Especially a check for login (already authenticated). You shouldn't do it
in every JSP (that's what it sounds like you are doing). I suggest to
subclass the ActionServlet to do a login check.
I hope this helps but you really should learn more before doing your
implementation of struts.
I feel I have the basics of struts decently but learn something all the time
on this forum.
-----Original Message-----
From: Davidson, Glenn [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 2:45 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie Question: Tiles and html:link how to make it work.
Thanks for the quick response!!!!!
Lets say I have a "menu item" that I want to use to call another jsp page.
This new jsp page is defined as a new tile.
More detail:
Lets say I have a welcome page (which is defined in tiles-defs.xml). In the
header.jsp I look to see if the user is logged in. If they are logged in I
display a greeting in the header. If they are not logged in I print "Please
logon" in the menu.jsp and I when they click on that I would like to jump to
the logon page which is defined in the tiles-defs.xml. The logon page has a
different menu.jsp and body.jsp defined.
Thanks
Glenn
-----Original Message-----
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 2:25 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie Question: Tiles and html:link how to make it work.
Your forward path can be a Tiles Def in the struts-config. You don't want to
ever link directly to a Def (or JSP) so it sounds like you are fine. Need
more detail otherwise.
-----Original Message-----
From: Davidson, Glenn [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 2:22 PM
To: 'Struts Users Mailing List'
Subject: Newbie Question: Tiles and html:link how to make it work.
I am new to Struts and Tiles and am trying to make it work. I have written a
simple web site that uses the <html:link forward="some forward name" ... and
this works well. The "some forward name" is currently defined in the
<global forwards> section of the struts-config.xml I have looked at the
documentation on line and it is a little shy on this. I also have Ted
Husted's book which is really great but I am still having a problem. Can
anyone get me some guidance here?
Thanks
Glenn Davidson
---------------------------------------------------------------------
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]