Win a copy of Fixing your Scrum this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Restful webservice deployment in tomcat

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have a WAR file generated from Jdeveloper 12c, it contains jersy restful webservices, I compiled it in tomcat, but whenever I try to run the webservise (using postman), it is giving not found (code: 404).

Note that under jdeveloper integrated weblogic AS it works fine and I'm getting the JSON output.

web.xml
----------------------------
<?xml version = '1.0' encoding = 'windows-1256'?>
<web-app 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"
        version="3.0">
         <display-name>rest</display-name>
      <servlet>
       <servlet-name>Jersey REST Service</servlet-name>
       <servlet-class>project1.AppModuleImpl</servlet-class>
       <init-param>
       <param-name>jersey.config.server.provider.packages</param-name>
       <param-value>project1</param-value>
   </init-param>
   <init-param>
   <param-name>
      jersey.config.server.provider.scanning.recursive
   </param-name>
   <param-value> false</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>
---------------------------

Anyone faced the same, please advise.

Thank you!
 
Saloon Keeper
Posts: 7062
164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Which URL are you accessing? Are there any error messages in any of the log files?
 
Ahmad Ahc
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply!

http://localhost:9999/webapp3/rest/get_cust_details

no error message shown, even when I start tomcat v9, all compiled and deployed successfully.

 
World domination requires a hollowed out volcano with good submarine access. Tiny ads are optional.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic