E ai pessoal bom dia!
É o seguinte:
Eu tenho uma servlet no meu projeto que está mapeada no meu web.xml que segue a seguir:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.jsp</param-value>
</context-param>
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>ajax4jsf</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>Servlet</servlet-name>
<servlet-class>controller.Service.Servlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Servlet</servlet-name>
<url-pattern>/Servlet</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/view/principal/index.jsp</welcome-file>
</welcome-file-list>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
</web-app>
Em uma página eu tento chamar a servlet através do comando:
$.post("Servlet?action=cadastrar&bean=Administradora", function(data){
alert("teste");
});
O problema é que ele não dá o alert que está dentro do post. E na própria servlet eu dei um out.println e ele também não mostrou…ou seja ele não esta encontrando a servlet…o caminho que está configurado no web.xml está certo…eu ja vi varias vezes e é esse mesmo…
Quando eu dou start no tomcat ele manda essas mensagens:
22/12/2010 04:52:58 org.apache.tomcat.util.digester.SetPropertiesRule begin
AVISO: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source’ to ‘org.eclipse.jst.jee.server:CondominioLocal’ did not find a matching property.
22/12/2010 04:52:58 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_22\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Java\jdk1.6.0_22\jre\bin;C:\Program Files\Java\jdk1.6.0_22\bin;C:\Program Files\Java\jdk1.6.0_22\lib;C:\CondominioLocal\apache-tomcat-6.0.16\apache-tomcat-6.0.16\bin;C:\CondominioLocal\apache-tomcat-6.0.16\apache-tomcat-6.0.16\lib
22/12/2010 04:52:58 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8078
22/12/2010 04:52:58 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1024 ms
22/12/2010 04:52:59 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
22/12/2010 04:52:59 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
22/12/2010 04:52:59 org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\CondominioLocal\projeto.metadata.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\CondominioLocal\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
22/12/2010 04:52:59 org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener “com.sun.faces.config.ConfigureListener” is already configured for this context. The duplicate definition has been ignored.
22/12/2010 04:52:59 org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener “com.sun.faces.config.ConfigureListener” is already configured for this context. The duplicate definition has been ignored.
22/12/2010 04:53:00 com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Sun’s JavaServer Faces implementation (1.2_04-b20-p03) for context ‘/CondominioLocal’
22/12/2010 04:53:01 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8078
22/12/2010 04:53:01 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8007
22/12/2010 04:53:01 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/46 config=null
22/12/2010 04:53:01 org.apache.catalina.startup.Catalina start
INFO: Server startup in 2396 ms
22/12/2010 04:53:01 com.opensymphony.oscache.web.ServletCacheAdministrator getInstance
INFO: Created new instance of ServletCacheAdministrator
22/12/2010 04:53:01 com.opensymphony.oscache.web.ServletCacheAdministrator getAppScopeCache
INFO: Created new application-scoped cache at key: __oscache_cache
alguém sabe o que pode estar acontecendo???
Desde já agradeço!