I am trying to add a new class to a pre-existing web application in Tomcat6.
The class is:
public class Hello {
public static void main(String [] args) {
System.out.println("HELLLLLLOOOOOOO");
}
}
- I compiled it and put the class file in:
<WEBAPP>/WEB-INF/classes
- Restart tomcat
I called it from the jsp which works with other classes in folders in the classes directory:
<%@ page import="Hello" %>
It fails saying:
org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 16 in the generated java file The import Hello cannot be resolved
What am I missing?
I have also tried adding it to the catalina common/lib directory, put it external to tomcat and edited the shared.loader property in catalina.properties.