Quantcast
Channel: Active questions tagged servlets - Stack Overflow
Viewing all articles
Browse latest Browse all 675

The requested resource is not available using HelloWorld servlet [duplicate]

$
0
0

I am writing a Java Servlet, and I am struggling to get a simple HelloWorld example to work properly.

Error 404: The requested resource is not available using HelloWorld servlet

The HelloWorld.java class is:

package crunch;import java.io.*;import javax.servlet.*;import javax.servlet.http.*;public class HelloWorld extends HttpServlet {  public void doGet(HttpServletRequest request,                    HttpServletResponse response)      throws ServletException, IOException {    PrintWriter out = response.getWriter();    out.println("Hello World");  }}

I am running Tomcat v7.0, and I have already read similar questions with responses referring to changing the servlet-mapping section in web.xml. This section actually doesn't exist in mine, and when I added it the same problem still occurred.


Viewing all articles
Browse latest Browse all 675

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>