Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tomcat war deployment problem - services is not found

Status
Not open for further replies.

vadrozen

Programmer
Oct 18, 2005
1
0
0
US
Hi,
I created my first test Jersey 2 web service project.
I converted it in .war installed on /webapps/RentAPI.war and changed /WEB-INF/web.xml
Code:
<servlet>
        <servlet-name>RentAPI</servlet-name>
        <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
        
         <init-param>
            <param-name>jersey.config.server.provider.packages</param-name>
            <param-value>com.rentwsapi.reservation.services</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>RentAPI</servlet-name>
        <url-pattern>/rent/*</url-pattern>
    </servlet-mapping>

when I run - it shows me welcome page, but when I try to get info
[pre][pre]
I got HTTP Status 404 – Not Found.
The project itself work on Eclipse, but cannot be deployed on standalone TOMCAT.
I tried to replace current init-param with
Code:
        <init-param>
            <param-name>javax.ws.rs.Application</param-name>
            <param-value>com.rentwsapi.reservation.app.RentReservationApplication</param-value>
        </init-param
The RentReservationApplication worked,but same 404 - Not found error displayed
Look like it could not found [pre]com.rentwsapi.reservation.services[/pre] package
What I do wrong? Please help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top