I am trying to follow a simple example to get a basic servlet to run using a desktop install of Tomcat.
Using the browser, I receive this when trying to load the class:
"The requested resource (/HelloServlet) is not available."
If I go to the command prompt and compile the HelloServlet.java file, I receive no errors and a HelloServlet.class file is created. However, if I try to run the HelloServlet.class file from the command prompt like:
java HelloServlet
I receive:
"Exception in thread "main" java.lang.NoSuchMethodError: main"
As far as I can tell, my CLASSPATH seems to be set correctly. What else could cause this?
Using the browser, I receive this when trying to load the class:
"The requested resource (/HelloServlet) is not available."
If I go to the command prompt and compile the HelloServlet.java file, I receive no errors and a HelloServlet.class file is created. However, if I try to run the HelloServlet.class file from the command prompt like:
java HelloServlet
I receive:
"Exception in thread "main" java.lang.NoSuchMethodError: main"
As far as I can tell, my CLASSPATH seems to be set correctly. What else could cause this?