aspose file tools*
The moose likes JSP and the fly likes jasper compiler problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "jasper compiler problem" Watch "jasper compiler problem" New topic
Author

jasper compiler problem

Chris Davies
Ranch Hand

Joined: Feb 26, 2003
Posts: 110
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


One day all greenhorns will run free ...
Greg T Robertson
Ranch Hand

Joined: Nov 18, 2003
Posts: 91
<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

Joined: Feb 26, 2003
Posts: 110
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
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
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

Joined: Dec 10, 2001
Posts: 7023
Moving this to the JSP forum...


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61648
    
  67

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".


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
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)


42
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jasper compiler problem