Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSP impot class cannot be resolved to a type

843840Oct 28 2008 — edited Oct 30 2008
This has got to be an easy problem but we cannot seem to figure it out.

I am using Tomcat 6.0.18 and JRE 1.5.09

This is my class:
package hello;
public class hello{
public void run(){
	System.out.println("Hello World");
}}
This is my JSP:
<%@ page language="java" import="java.util.* , java.io.* , java.text.*" errorPage="error.jsp"%>
<%@ page import="hello.*" %>
<%
hello h = new hello();
h.run();
%>
and this is the error:

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

An error occurred at line: 7 in the jsp file: /test.jsp
hello cannot be resolved to a type
4:
5: <%
6:
7: hello h = new hello();
8: h.run();
9:
10: %>


I have the "hello.class" in

C:\Tomcat6\webapps\ROOT\WEB-INF\classes\hello
C:\Tomcat6\webapps\ROOT\WEB-INF\classes
C:\Tomcat6\webapps\ROOT\WEB-INF
C:\Tomcat6\webapps\manager\WEB-INF\classes\hello
C:\Tomcat6\webapps\manager\WEB-INF\classes
C:\Tomcat6\webapps\manager\WEB-INF
C:\Tomcat6\webapps\host-manager\WEB-INF\classes\hello
C:\Tomcat6\webapps\host-manager\WEB-INF\classes
C:\Tomcat6\webapps\host-manager\WEB-INF



Can someone pelase offer a suggestion and please tell me where the CLASS file should actually reside? Please?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 27 2008
Added on Oct 28 2008
2 comments
830 views