NetBeans giving error at dataTable tag. Missing JAR?

J

jsguru72

I had been working on a JSF web site using NetBeans. Generally
everything was fine, but I never trust that the IDE is not doing
things it does not tell me about. Just to make sure I had a firm
grasp on everything, I decided to just create a free-form web project
and import all the JARs myself.

As would probably be expected, I am missing something. The web page I
list below is exactly the same as what I had in the NetBeans web
project, but in my free-form project NetBeans gives the error listed
below at the <h:dataTable> line.

Absolutely nothing has changed on this page so I have to think I am
missing a jar file in my classpath or something. I just cannot figure
out what it might be.

Error Message
---------------------
According to the TLD, deferred-value is specified for the attribute
var of the tag handler com.sun.faces.taglib.html_basic.DataTableTag,
but the argument for the setter method is not a
javax.el.ValueExpression


Code In Question
-------------------------
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<f:view>
<html>
<body>
<h:form>
<h:dataTable value="#{recordBean.recordList}"
var="thisRecord">

</h:dataTable>
</h:form>
</body>
</html>
</f:view>


Current Classpath JARs
-----------------------------------
jstl.jar
standard.jar
jsp-api.jar
servlet-api.jar
jsf-api.jar
jsf-impl.jar
commons-beanutils.jar
commons-collections-3.2.1.jar
commons-digester-1.8.jar
commons-logging-1.1.1.jar




Any help would be appreciated.

Thanks,
John
 
J

jsguru72

It would appear this is simply more evidence of why I eschew IDEs like
NetBeans and Eclipse.

I changed
<h:dataTable value="#{recordBean.recordList}"
var="thisRecord">

to
<h:dataTable value="#{recordBean.recordList}" var="thisRecord">

and the error went away.


I then changed it back to
<h:dataTable value="#{recordBean.recordList}"
var="thisRecord">


and the error did not re-appear.


In the course of troubleshooting this, Netbeans also started giving me
an error on this line.
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>

It said that something to the effect that it could not find the TLD
with this path.

I added a space before the taglib keyword and the error went away. I
removed the space and the error did not return.


Nothing is more frustrating that spending hours trying to figure out
what you are doing wrong only to discover that the IDE is working
against you.

I'm going back to jEdit.

Thanks.
 
A

Arved Sandstrom

[ SNIP ]
Nothing is more frustrating that spending hours trying to figure out
what you are doing wrong only to discover that the IDE is working
against you.

I'm going back to jEdit.

Thanks.

You can have similar problems with jEdit or any other program. In fact I
have had problems with jEdit specifically that were only solved with tricks
like the above or just a restart of the application.

Let's face it - an IDE is a program like any other - it's buggy. Sooner or
later you'll run into one of its defects. You cannot expect an IDE or any
other program not to have any. You just hope they don't have too many.

What'll you do when it comes time to deploy a webapp and you discover a bug
in the server? Turf it and buy another, or work with the vendor to arrive at
a solution?

AHS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top