This question already has an answer here:
I am Beginner to java web projects .. trying to create a web service following a tutorial using jersey. no errors in the code but the webpage cannot be found while trying to run in eclipse.
the console trace is
May 10, 2015 5:42:38 AM 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\jre1.8.0_45\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_45/bin/server;C:/Program Files/Java/jre1.8.0_45/bin;C:/Program Files/Java/jre1.8.0_45/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\eclipse;;.
May 10, 2015 5:42:39 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:useraccount' did not find a matching property.
May 10, 2015 5:42:39 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 10, 2015 5:42:39 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 829 ms
May 10, 2015 5:42:39 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 10, 2015 5:42:39 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.37
May 10, 2015 5:42:39 AM com.sun.jersey.api.core.PackagesResourceConfig init
INFO: Scanning for root resource and provider classes in the packages:
com.prgguru.jersey
May 10, 2015 5:42:40 AM com.sun.jersey.api.core.ScanningResourceConfig logClasses
INFO: Root resource classes found:
class com.prgguru.jersey.Login
class com.prgguru.jersey.Register
May 10, 2015 5:42:40 AM com.sun.jersey.api.core.ScanningResourceConfig init
INFO: No provider classes found.
May 10, 2015 5:42:40 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.19 02/11/2015 03:25 AM'
May 10, 2015 5:42:41 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 10, 2015 5:42:41 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 10, 2015 5:42:41 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/50 config=null
May 10, 2015 5:42:41 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2356 ms
and this is my web.xml page
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://ift.tt/ra1lAU" xmlns="http://ift.tt/nSRXKP" xsi:schemaLocation="http://ift.tt/nSRXKP http://ift.tt/LU8AHS" id="WebApp_ID" version="2.5">
<display-name>useraccount</display-name>
<servlet>
<servlet-name>Jersey REST Service</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>com.prgguru.jersey</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Jersey REST Service</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
error is not 404 it is
The webpage cannot be found
and i think that my problem is not with jersey as the project runs well with all the other followers with the same code .. i think it is all about my configurations as it is my first time to run java dynamic web project.
Aucun commentaire:
Enregistrer un commentaire