hi i'm working with an application called webtop and am getting the following error message from the proceeding code org.apache.jasper.compiler.ParseException: /WEB-INF/jsp/ws/bill2/user/web1/record.jsp(119,45) Attribute TIB has no value
it seems a simple synax error but i cant figure what it is ? is that the correct syntax to query if a string is null ? also is the syntax for ("TIB") correct ? the .getString method is defined in the api as java.lang.String ? cheers chris
I'm pretty sure this needs to be <webtop:if condition="<%= bean.getString("TIB") == null" %> note the ending quote and that null is lower cased
Chris Davies
Ranch Hand
Joined: Feb 26, 2003
Posts: 110
posted
0
thanks but i'm still getting the following error org.apache.jasper.compiler.ParseException: /WEB-INF/jsp/ws/bill2/user/web1/record.jsp(119,45) Attribute TIB has no value TIB is the name of the column field - could it be this ? for exmple if the field was journal would bean.getString("journal") be valid if it was java.lang.string ? cheers chris
Greg T Robertson
Ranch Hand
Joined: Nov 18, 2003
Posts: 91
posted
0
boy did i screw that up. it should be <webtop:if condition="<%= bean.getString("TIB") == null %>" > as far as the bean.getString i'm not sure of. but jasper only reports compilation errors not runtime which i would have to believe the error with TIB would be edited to remove extraneous quote [ April 22, 2004: Message edited by: Greg T Robertson ]
Chris Davies
Ranch Hand
Joined: Feb 26, 2003
Posts: 110
posted
0
it just isn't playing i'm still gettign the same error. a few lines aboove the i've got eh following bean declared. this doesn't havea a method named getString nor does it inherit it. its a method of a bean named column, but still can't see why this would give the error message.
I have no idea what 'webtop' is or does. But I do have two points: 1) Your best bet for diagnosing parse failures in a JSP is to take a look at the Java file for the servlet that the container generates on behalf of the JSP. For Tomcat, you'll find these in the folder tree under $CATALINE_HOME/work. 2) If the purpose of webtop is to provide conditional compilation in a JSP, you'd be better off switching to the standardized JSTL. Then you won't get responses like "I have no idea what 'webtop' is or does".
That line would likely never work as JSP attributes are determined at compile time and you're giving it a runtime value. You'd need to set the parameter you're passing into the pageContext as a named attribute and pass that name instead to the tag. Something like (mind, this may not work but should get you underway)