[thelist] JSP help please [more]
Tom Dell'Aringa
pixelmech at yahoo.com
Wed Jan 14 10:52:52 CST 2004
--- Marcus Andersson <marcan at home.se> wrote:
> <!-- You can put common alternatives here... -->
>
> <ul id="nav">
> <li id="nav-index"><a href="/index.jsp">Home</a></li>
> [etc, etc]
> </ul>
>
> <!-- Then our conditional navigation stuff enters ... -->
> <%
> String path = request.getServletPath();
>
> if(path.equals("/report/report.html")) {
> %>
> <ul id="subnav-plan">
> <li id="nav-index"><a href="/index.jsp">plan</a></li>
> [etc, etc]
> </ul>
> <%
> }
> else if(path== "/plan/plan.jsp") {
> %>
> <ul id="subnav-plan">
> <li id="nav-index"><a href="/index.jsp">report</a></li>
> [etc, etc]
> </ul>
> <%
> }
> // more else if clauses...
> %>
Ok, this is working fine but I've realized it might not be what I
need. Reason being - take the "plan" section for example. Not only do
I need the "subnav-plan" subnav to show up when plan.jsp loads, but
also EVERY OTHER page in that section must have it as well.
Right now this includes 6 pages, but could be more. Isn't there some
way I can set some kind of variable based on the section that could
be read instead of the page?
Tom
=====
http://www.pixelmech.com/ :: Web Development Services
http://www.DMXzone.com/ :: JavaScript Author / Every Friday!
http://www.thywordistruth.net/ :: Eternal Life
[Those who say that I am finished, and am through, will have to run over my dead body to beat me...]
More information about the thelist
mailing list