T
tfrawley
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?
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?