Ok, so I'm trying to figure out all of this servlet stuff. Here is what I did:
First, using one of the WORKING examples from apache tomcat 6, I took this:
copied it and changed the class name to blabla, so now the line that said:
says this:
and yes, I did name the file blabla.java and i didn't get compiler err.
I compiled the program and moved the blabla.class file to the same folder that the HelloWorldExample.class file was located. I then added the following lines of code to the web.xml file located in the webapps/examples/WEB-INF folder:
When I go to the URL
http://localhost:8080/examples/servlets/servlet/HelloWorldExample it works fine, but when I go to
http://localhost:8080/examples/servlets/servlet/blabla I get the message:
HTTP method GET is not supported by this URL
And the description:
The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL).
I have read up, and it seems this is a common error which usually occurs because people don't override the super class doGet method provided by the HttpServlet class, but if you look at my code, I obviously do that.
So to recap, I copied WORKING HelloWorldExample servlet and renamed HelloWorldExample to blabla in the java file. I then compiled it and moved blabla.class to the same location as HelloWorldExample.class. I then added to web.xml to configure url mapping.
Was there something else that I missed? Is there something obvious that my frustration is blinding me from? Thanks in advance for the help.