[thelist] JSP question
Tom Dell'Aringa
pixelmech at yahoo.com
Tue Oct 21 08:07:07 CDT 2003
Hi folks,
Haven't seen much JSP stuff fly around here but I'll give it a go. I
have a fairly simple situation. I have an include that includes some
DIVs that are conditional. I want to show one DIV based on some set
variable.
In php I would probably set some variable on the page I wanted the
DIV to show at the top like so:
$showDiv = 1; // turn the div on
then I would check for it in my include:
if(isset($showDiv))...etc
I can't do this type of thing in JSP though, because it's compiled. I
end up getting a cannot resolve symbol error. Here is what I had
tried in JSP:
<% String orderInfo = "1"; %>
// below is the page with the conditional DIV indside..
<jsp:include page="includes/dashboards.jsp"/>
inside the "dashboards.jsp" page I tried this:
<% if(orderInfo.equals("1"))...show DIV %> (psuedo)
Which does not work. Can anyone shed light on the correct way to
handle this? I'm a bit of a JSP neo - I only know the basics.
Thanks
Tom
=====
http://www.pixelmech.com/ :: Web Development Services
http://www.DMXzone.com/ :: Premium Content Author / JavaScript / Every Friday!
http://www.thywordistruth.net/ :: Eternal Life
"That's not art, that's just annoying." -- Squidward
More information about the thelist
mailing list