Estou com o seguinte problema:
tenho uma pagina jsp que chama um servlet pra validar usuario…ao chamar esse servlet ele simplesmente não o encontra.
Meu form chama: usuario/validacao
Meu web.xml está assim:
<!DOCTYPE web-app
PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN”
“http://java.sun.com/dtd/web-app_2_3.dtd”>
<web-app>
<servlet>
<servlet-name>validausuario</servlet-name>
<servlet-class>usuario.ValidaUsuarioController</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>validausuario</servlet-name>
<url-pattern>/usuario/validacao</url-pattern>
</servlet-mapping>
O erro que o browser me retorna é esse:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Error allocating a servlet instance
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688)
java.lang.Thread.run(Unknown Source)
root cause
java.lang.ClassFormatError: usuario/ValidaUsuario (Illegal Class name “projeto/WEB-INF/src/usuario/ValidaUsuario”)
java.lang.ClassLoader.defineClass0(Native Method)
java.lang.ClassLoader.defineClass(Unknown Source)
java.security.SecureClassLoader.defineClass(Unknown Source)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1677)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:900)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1350)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1230)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688)
java.lang.Thread.run(Unknown Source)
note The full stack trace of the root cause is available in the Tomcat logs.
Apache Tomcat/5.0.19