Adam,
I agree with you.. I'm not a big fan of logic in jsps other than minimal
stuff, but in this circumstance we are retooling a jsp based forum and
eventually will port it to struts but at the moment time is scarce.

I was able to make it work using the <jsp:include page"blah"/> tag.  I found
some interesting stuff with it though.  The page url is relative to your
context.  So if my context was /salesweb, and i wanted the page at
/salesweb/forum/transition-.jsp  I would need to send it
/forum/transition-.jsp.  Also when I tried <jsp:include page"<%=
request.getContextPath() %>/forum/transition-.jsp"/> I would get a compile
error (this was before I figured out it was context relative), however
<jsp:include page"<%=  StringNameHere %>"/> would work.  Very odd.  I just
wish the original redirect would work, so my code doens't look all sloppy ;)
Thanks Adam,
David

----- Original Message ----- 
From: "Adam Hardy" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 1:30 PM
Subject: Re: Tiles Redirect Bug on a per Tile basis? Help!


> On 10/30/2003 07:01 PM David Erickson wrote:
> > Adam,
> > Essentially I just want to display a different content in that area of
my
> > layout.  And I considered using a jsp:include, but by the point the
logic
> > determines that a different page needs to be in that spot it has already
> > loaded a bunch of JSP variables and stuff into the page, by including
> > another page with variables potentially the same would it mess
everything
> > up?  Also for example was:
> >
> > if (x condition is met)
> > {
> > %>
> > <jsp:include "blah.jsp>
> > <%
> > return;
> > }
> >
> > %>
> >
> > Would that return successfully quit running any logic from my original
jsp?
>
> Regarding the variables getting messed up: there are 2 types of includes
> - I think the one you have used above would be OK. There is also the
> straight <@% include file="" %>. Again though JSP is not my forte.
>
> I'm not sure whether the return would end the JSP. A check in the
> compiled JSP file would show you. I never do too much logic in my JSPs
> so I'm not too hot on that.
>
> Perhaps you should make an else {} that encompasses the whole of the
> rest of the JSP. Horrible, but I take it you are modifying existing
> code, so it might be the easiest way.
>
> Adam
>
> -- 
> struts 1.1 + tomcat 5.0.12 + java 1.4.2
> Linux 2.4.20 RH9
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to