Win a copy of Head First Android this week in the Android 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

How to debug a REST service?

 
Ranch Hand
Posts: 460
6
Netbeans IDE Oracle Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I created using NetBeans 8.2 a REST service from database, database being Derby Db.

How to introduce my URL in Rest client web service in Chrome(is a plug-in)

http://127.0.0.1:8080/webresources/User I noticed a 404 error.



404, Not Found
Date: Fri, 28 Jul 2017 11:09:22 GMT
Server: GlassFish Server Open Source Edition 4.1.1
X-Powered-By: Servlet/3.1 JSP/2.3 (GlassFish Server Open Source Edition 4.1.1 Java/Oracle Corporation/1.8)
Content-Length: 1086
Content-Language:
Content-Type: text/html

Time taken (in milliseconds): 543

Click Response (Raw) to view the raw response.

My web xml is:


My POM.xml is:


When I build the project :

Deploying on GlassFish Server
   profile mode: false
   debug mode: false
   force redeploy: true
In-place deployment at D:\PrjJava\REST\RestDbMaven\target\RestDbMaven-0
GlassFish Server, deploy, null, false



Thanks in advance


 
Saloon Keeper
Posts: 7173
166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Assuming that "webresources" is indeed the name of the web app, the REST servlet is mapped to "/rest", so the URL should be something like http://127.0.0.1:8080/webresources/rest/User (assuming that there is a resource mapped to "/User").
 
Rancher
Posts: 4801
50
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where is this URL mapped?

http://127.0.0.1:8080/webresources/User

And that's not your POM, you seem to have pasted your web.xml twice, not that the POM will matter.

Also, how and where are you deploying this?
Are you sure your server has started up?
 
Dana Ucaed
Ranch Hand
Posts: 460
6
Netbeans IDE Oracle Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So, you have right, Dave.

I haven't deployed my project.

I noticed that my project doesn't appear in GlassFish Server.

I have another project (not Maven project) and this appear in GlassFish.

I have other question:

How to use the put method:





 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic