problem compiling servlets by means of NetBeans IDE 3.6.
"net 1" <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.user-interface |
|---|---|
| Message-ID | <[email protected]> |
This is the servlet named Contatore.java
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Contatore extends HttpServlet
{
private int conta;
public void init(ServletConfig config) throws ServletException
{
conta = 0;
}
public void doGet(HttpServletRequest richiesta, HttpServletResponse
risposta)
throws IOException, ServletException
{
conta++;
risposta.setContentType("text/html");
PrintWriter out = risposta.getWriter();
out.println("<html>");
out.println("<head>");
out.println("<title>Pagina con contatore</title>");
out.println("</head>");
out.println("<body>");
out.println("Questa pagina e' stata visualizzata");
out.println("<h1>"+conta+ "</h1> volte.");
out.println("</body>");
out.println("</html>");
out.close();
}
}
Before using the compiler of NetBeans (that is after getting Contatore.class
by means of Bluej) when I use Execute I see in Internet Explorer 6.0 with
win Xp Pro at the
http://localhost:8084/esempi/Contatore
Questa pagina e' stata visualizzata
1
volte.
and Contatore.class is 1,58 KB
After using the compiler of NetBeans when I use Execute here the error from
Tomcat 5.0
I see in Internet Explorer 6.0 with win Xp Pro at the
http://localhost:8084/esempi/Contatore
HTTP Status 404 - Servlet Contatore is not available
--------------------------------------------------------------------------------
type Status report
message Servlet Contatore is not available
description The requested resource (Servlet Contatore is not available) is
not available.
--------------------------------------------------------------------------------
Apache Tomcat/5.0.19
and Contatore.class is 1,53 KB
Can anyone help me?
Thanks
Eugenia Mariani
_________________________________________________________________
Filtri antispamming e antivirus per la tua casella di posta
http://www.msn.it/msn/hotmail