• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jasper compiler problem

 
Chris Davies
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Greg T Robertson
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<webtop:if condition="<%= bean.getString("TIB") == Null %>

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
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

cheers
chris
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the JSP forum...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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".
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic