Health!
- What's wrong on this JSP piece?:
...
...
<% if (condition)
{ %>
<jsp:forward page="<%= request.getAttribute("variableName") %>"
/>
<%}
else
{ %>
Say something....
<%} %>
...
...
It's generating this exception:
org.apache.jasper.compiler.ParseException: /Test.jsp(28,66) Attribute
variableName has no value
at
org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:453)
at org.apache.jasper.compiler.JspReader.parseTagAttributes(Compiled
Code)
at org.apache.jasper.compiler.Parser$Forward.accept(Compiled Code)
at org.apache.jasper.compiler.Parser.parse(Compiled Code)
at org.apache.jasper.compiler.Parser.parse(Parser.java:959)
at org.apache.jasper.compiler.Parser.parse(Parser.java:955)
at org.apache.jasper.compiler.Compiler.compile(Compiled Code)
...
...
In the tomcat's work directory the .java file appears to be zero
sized. Obviously, it's an error in the compiler but I don't understand why
the web server tries to get the attribute's value at compile time. What I
want to do is to forward to a page when a condition is true at run time
(service method), then "variableName" will contain a value.
I can make a static method in my own classes to do a
pageContext.forward, but I think it's not a good solution, only a bypass.
- I have several beans and classes to help my JSPs. When I change a JSP
page, the classloader recompiles it and load it into JVM, but when I change
the classes at WEB-INF the classloader ignores this update. This forces me
to restart the web server each time I recompile the classes.
I'm using SUN JDK 1.1.7 and Tomcat 3.0.
I have searched for this question in FAQs but I have found none.
Sorry my english.
Thank you.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html