-2

I am new to java web-service programming and setup. my requirement is just need to host a simple rest web-server and that can be called by post or get method and also that can capture the json response from post method to string variable.

there i have created basic dynamic project this simple code giving me 404 error on where i should get the xml respond.

can anyone tell me what should be the code and setup to meet my desire requirement.

browser on http://localhost:9090/WSdemo/book URL

project

book.java

web.xml

Paul Samsotha
  • 205,037
  • 37
  • 486
  • 720
  • Why `$package`. That value should be the name of the package you want Jersey to scan to find all your `@Path` classes and register them. – Paul Samsotha Jun 25 '18 at 06:48

1 Answers1

1

I just found a link that i used when i was working with jersey. Comphrensive jersey guide

But..

If you want to host a simple rest service you should really take a look at spring-boot.

https://spring.io/ https://spring.io/guides/gs/rest-service/

i just started working with spring myself and it is an ease!

MatiasN
  • 145
  • 1
  • 3
  • 13