S
sdavids
Hey everyone I am trying to learn JSP although keep running into a
brick wall. I set up Tomcat 5.5 which is running fine, but I am trying
to import a Java class into a JSP page and it doesnt seem to work, this
is what my class looks like:
package steve;
public class TestMe {
public TestMe(){
System.out.println("INSIDE CONSTRUCTOR");
}
public int getNumber(){
return 10;
}
}
I saved the class as TestMe, and saved it in "\WEB-INF\classes\steve"
Now my JSP code is as follows:
<html>
<%@ page import="steve.TestMe.*" %>
<body>
<%
TestMe temp = new TestMe();
out.print("NUM=" + temp.getNumber());
%>
</body>
</html>
The error which I recieve when I run the jsp file is: TestMe cannot be
resolved to a type.
Any help would be phenominal.
brick wall. I set up Tomcat 5.5 which is running fine, but I am trying
to import a Java class into a JSP page and it doesnt seem to work, this
is what my class looks like:
package steve;
public class TestMe {
public TestMe(){
System.out.println("INSIDE CONSTRUCTOR");
}
public int getNumber(){
return 10;
}
}
I saved the class as TestMe, and saved it in "\WEB-INF\classes\steve"
Now my JSP code is as follows:
<html>
<%@ page import="steve.TestMe.*" %>
<body>
<%
TestMe temp = new TestMe();
out.print("NUM=" + temp.getNumber());
%>
</body>
</html>
The error which I recieve when I run the jsp file is: TestMe cannot be
resolved to a type.
Any help would be phenominal.