Note that there are some explanatory texts on larger screens.

plurals
  1. POservlet error The requested resource () is not available
    primarykey
    data
    text
    <p>I am new to servlets .I am using eclipse juno for this.I am having a trouble in running my program..My code is </p> <pre><code>package sTraining; import java.io.*; import javax.servlet.*; public class Servlet1 implements Servlet{ ServletConfig config=null; public void init(ServletConfig config){ this.config=config; System.out.println("servlet is initialized"); } public void service(ServletRequest req,ServletResponse res) throws IOException,ServletException{ res.setContentType("text/html"); PrintWriter out=res.getWriter(); out.print("&lt;html&gt;&lt;body&gt;"); out.print("&lt;b&gt;hello simple servlet&lt;/b&gt;"); out.print("&lt;/body&gt;&lt;/html&gt;"); } public void destroy(){System.out.println("servlet is destroyed");} public ServletConfig getServletConfig(){return config;} public String getServletInfo(){return "copyright 2007-1010";} } </code></pre> <p>I am getting this error[http://localhost:8080/Test/WEB-INF/classes/sTraining/Servlet1.java][1] although i have this thing in my web .xml file</p> <pre class="lang-xml prettyprint-override"><code>&lt;servlet&gt; &lt;description&gt;&lt;/description&gt; &lt;display-name&gt;Servlet1&lt;/display-name&gt; &lt;servlet-name&gt;Servlet1&lt;/servlet-name&gt; &lt;servlet-class&gt;servlet.Servlet1&lt;/servlet-class&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;Servlet1&lt;/servlet-name&gt; &lt;url-pattern&gt;/Servlet1&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; </code></pre> <p>why this is not running? My code is fine. First time when I run this page it run, but running this program after my second program it did not run and that second program also not run.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload