missing is "extends HttpServlet"





Rui Pereira <[EMAIL PROTECTED]> on 08/24/2001 03:11:21 PM

Please respond to "A mailing list for discussion about Sun Microsystem's Java
      Servlet API Technology." <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Dilip Kumar-HSPW/HSS)

Subject:  tomcat exception
      (ServletWrapper.loadServlet(ServletWrapper.java:268)




        Helo there,

        I got this error on my browser when i try to run a servlet named
"java2"


java.lang.ClassCastException: java2
        at
org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:26
8)
        at
org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289)
        at org.apache.tomcat.core.Handler.service(Handler.java:254)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav
a:797)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H
ttpConnectionHandler.java:210)
        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:49
8)
        at java.lang.Thread.run(Thread.java:484)


This is the source code (is a example):

 import java.io.*;
 import java.text.*;
 import java.util.*;
 import javax.servlet.*;
 import javax.servlet.http.*;

public class java2{

 public void doGet(HttpServletRequest pedido,HttpServletResponse
resposta) throw
s IOException {
       PrintWriter saida=resposta.getWriter();
       saida.println("<html>");
       saida.println("<head>");
       saida.println("<title>");
       saida.println("titulo 2");
       saida.println("</title>");
       saida.println("</head>");
       saida.println("<body>");
       saida.println("Metodo utilizado:"+ pedido.getMethod());
       saida.println("URI Pedida:" + pedido.getRequestURI());
       saida.println("Protocolo:" + pedido.getProtocol());
       saida.println("Path Info:" + pedido.getPathInfo());
       saida.println("Endereco Remoto:" + pedido.getRemoteAddr());
       saida.println("</body>");
       saida.println("</html>");
      }
 }



Does any one knows something, that can help me.



thanks in advance


Um Abra

�o
-----------------------------------------------------------------------
Rui Manuel de Oliveira Pereira
Leirisic - Sistemas de Informa��o e Comunica��o, S.A.
AP. 555 - 2401-976 Leiria Codex
Portugal
Telef. +351 244 850 450      Fax +351 244 834 334
Email <[EMAIL PROTECTED]> Web <www.leirisic.pt>

Novas Instala��es
Rua Professor Narciso Costa n.� 25 R/C esq. e dto
2400 - 195 Leiria
-----------------------------------------------------------------------

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html





Reply via email to