I have problem with my Java Jersey app. I'm writing an app with this tutorial: http://ift.tt/1s8oTV2 My app is almost the same as in this example expect fact that I'm using Maven to import .jar files. I also have some changes in db. I run this db on wamp server and I'm using phpMyAdmin. My app structure is as in this pic:
Always when I run my app on Tomcat or GlassFish server I get 404 error. I checked everything, I corrected web.xml file, cause I had problem with Servlet. I solved several problems with GlassFish and nothing helps. I'm trying to run this: http://localhost:8080/silownia_java/login/dologin and I get 404 error, but when I run http://localhost:8080/silownia_java/hello.jsp it works, so it's probably not a problem with servers. I also try to make some changes in my db, by execute commands in Chrome Advanced Rest Client, it also doesn't work, I only get those errors: I don't knot where the problem could be. I know that it's hard to guess where I have some mistakes in my code, but I need ask you for help. If necessary I can post my whole project in GitHub or just some classes or files here, just tell me what should I post.
EDIT: (web.xml from Github)
<?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/1eWqHMP" id="WebApp_ID" version="3.0">
<display-name>silownia_java</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<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>silownia_java</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Jersey REST Service</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
</web-app>
Aucun commentaire:
Enregistrer un commentaire