I hope someone who knows struts better than me can help. I have a jsp and it is doing various jsp includes. one of the included jsps is a form in its own right. The form is included on various different jsp's. What I wanted to find out is whether I can find out from either the ActionForm object or from the Action servlet what the originating page was. Does anyone know where I can find this out from? All replies are much appreciated. George
I'm not sure if that approach will work so here's my $0.02. If you get stuck approaching a problem one way, I find it's often useful to try the opposite direction. In your case, instead of the included JSP trying to find out what included it, I would turn the tables around and have every JSP that used the common one identify itself. E.g. <jsp:include page="common.jsp"> <jsp:param name="caller" value="this.jsp" /> </jsp:include> It all depends on whether you're actually using dynamic or static includes though, or if you are using something like Tiles. [ April 01, 2003: Message edited by: Junilu Lacar ]
Originally posted by George Brown: the use of <jsp:include> tags rather than <%@include> messed up the presentation of the page, so I abandoned it.
Not sure how this could be. What was happening? maybe there's something that can be done about it.
Joined: Sep 26, 2000
I think it may have worked if I was using frames, but as it is I am using tables (no frames) and in that context, with the struts tags, there is an essential difference between the way the include directive processes included files and the way the jsp:include processes included pages. That jsp:include difference messes up the tables by not compiling the logic tags correctly (I don't know why)... Here is an example... (if you substitute jsp:include where you see login.jsp included you will see the difference) alhome.jsp
Joined: Sep 26, 2000
by the way, you may need to remove the header and footer includes to see what i mean (i've not included those files, or the .css, so the page might look a bit odd, but you should see what i mean). You will probably also need to hardcode some of the bean tags... [ April 03, 2003: Message edited by: George Brown ]