java - How to make Rest API call to application when i deploy in Websphere server? -


i able deploy jax-rs jersey application websphere server when make sample rest rest api call , giving follow error .

url : http://:9080//hello/santhosh

web.xml

<servlet>     <servlet-name>jersey-serlvet</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.mkyong.rest</param-value>     </init-param>     <load-on-startup>1</load-on-startup> </servlet>  <servlet-mapping>     <servlet-name>jersey-serlvet</servlet-name>     <url-pattern>/rest/*</url-pattern> </servlet-mapping> 

error :

error 404: java.io.filenotfoundexception: srve0190e: file not found: /hello/santhosh. 

how can fix issue?

when deploy application on server have name (at least name of war file). let assume application deployed myapp on websphere. call should

http://hostname:9080/myapp/hello/santhosh 

if @path annotation on resource class points santhosh.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -