Hello. I needed to practice
servlet programs. I downloaded Eclipse Neon
Java EE and Apache
tomcat 7. Searched many sites and somehow I was able to configure tomcat in eclipse. While starting tomcat from eclipse server tab, it flashed error for "Ports 8005, 8080, 8009 are used by other services....". I tried changing the port numbers. After a lot try I managed to start tomcat. Well, the tomcat shows running in eclipse, but when I type "localhost:8080 or any other port numbers that I used it doesn't show me the apache homepage".
I wrote a sample program as mentioned below. I tried running it as Java Server, but it shows error as "http status 404 - the requested resource is not available".
Need a proper guidance in this regard, I am confused!!
My sample program is:
And the console window of eclipse shows following message:
Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:135)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:996)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:623)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)