This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

The value for the useBean class attribute is invalid.  RSS feed

 
Peter Mest
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I receive this error:
The value for the useBean class attribute com.pachet.connect is invalid.


Tomcat Log:

19.08.2009 11:33:19 org.apache.catalina.core.ApplicationContext log
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
....
19.08.2009 11:33:22 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
...

19.08.2009 11:33:23 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
.....

at java.lang.Thread.run(Thread.java:619)
19.08.2009 11:33:29 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /index.jsp(10,0) The value for the useBean class attribute com.packages.conectis invalid.
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
....



The Java file:


The JSP file:
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't use this tag the way it is supposed to.

Your connect class is not a classic JavaBean having getters and setters, it's just a plain Java object with a function. You can as well instantiate it in your scriptlet.
As for the error, maybe it's because you do not follow the naming convention. Class names always have the first letter uppercase!

Also, Java code does not belong into a JSP page, they are strictly for the view !
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It could also be choking on the extra space after the call name. Is your code really this sloppy?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!