I was able to create and test a jsppage. It wors fine. I want to create and run a sample servlet and I don't know how to do that. In my directory where the sample JSP page is, I right clicked and craeted a new .java file. Here's what I have in that file:
out.println("<html><head><title>" + "Hello World!</title></head>"); out.println("<body><h1>Hello World Servlet!</h1></body></html>"); } }
If I follow the same steps like I did for the jsppage and I say Run As -> Run on Server.. I get teh following error:
Error 404--Not Found From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1: 10.4.5 404 Not Found The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
What am I doing wrong? Without having to compile the .java program and place it in a certain directory etc, I just want to know if I can create a java file like I did and deploy it and test it in the Eclipse IDE?