<jsp:useBean ... /> class attribute invalid
Hi. I get this error and i'm freaking out. I found a lot of threads of this error on this forum and on other forums and I tried every solution but I still get the error.
I use Tomcat 6.0 and jdk1.6.0.
Test.java
package dime;
import java.io.*;
publicclass Testimplements Serializable{
private String text ="";
public Test(){
}
publicvoid setText(String text){
this.text = text;
}
public String getText(){
return text;
}
}
index.jsp
<%@ page import="dime.Test" %>
<html>
<head>
<jsp:useBean id="tess" class="dime.Test" scope="session" />
<title>Basic HelloWorld JSP</title>
</head>
<body bgcolor="#909DB8">
<h1>
Hello world.
</h1>
</body>
</html>
and i get the following error:
org.apache.jasper.JasperException: /simple/index.jsp(5,3) The value for the useBean class attribute dime.Test is invalid.
...
The structure is:
{TOMCAT}\webapps\ROOT\simple\index.jsp
{TOMCAT}\webapps\ROOT\simple\WEB-INF\classes\dime\Test.class
and I typehttp://localhost/simple/ in the web browser.
The strange thing is when i use this code in a web application made in Netbeans 5, and the I run the app. with netbean's tomcat 5.5.17 server the application is OK.
Then I copied the build folder from netbeans' project to tomact6 webapps and I get the same error. From that I think the problem is in the server or in some variable like CLASSPATH.
PLEASE HELP!
Message was edited by:
dimitar

