I am having problems running a JSP with a java class file on a Tomcat server.
My files are located at:
tomcat/webapps/ROOT/temp.jsp
tomcat/webapps/ROOT/WEB-INF/classes/tempbeans/TempBean.class

The contents of my JSP file:

<%@ page import="tempbeans.*" %> 

<% TempBean bean = new TempBean(); %>

The contents of my class file.
package tempbeans;

package tempbeans;
public class TempBean
{

    public TempBean()
    {
    }
}

When I attempt to go to temp.jsp I get the following Exception:

exception

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 3 in the jsp file: /temp.jsp
TempBean cannot be resolved to a type
1: <%@ page import="tempbeans.*" %>
2:
3: <% TempBean bean = new TempBean(); %>


An error occurred at line: 3 in the jsp file: /temp.jsp
TempBean cannot be resolved to a type
1: <%@ page import="tempbeans.*" %>
2:
3: <% TempBean bean = new TempBean(); %>


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:374)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:339)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:601)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

The code runs on my local Eclipse set-up? Is there something wrong with my remote set-up?
Any help is greatly appreciated!!

Is this:
tomcat/webapps/ROOT/WEB-INF/classes
In the classpath?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.