• Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt in RESTful web service in Java  RSS feed

 
thilsen kumar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am new to web services. I want to create RESTful Web Service in java. So i decided to use Jersey.
and i worked with sample (Hello world application) in RESTful calls.

my doubt is , when i use GET operation, it returns whatever i returned. that's fine.
But when i use PUT, the sample code puts my details in webresource.
Where the WebResource is stored?
Don't i need to use Databases to store any data? (ie is it enough putting in WebResource?)

But these data(via PUT) only available until the server restarts. so do i need to put it in persistent starage?

If that is the case (Need to store in DB), What is the main use of Web Service?

becausei want to create a application with user management(Do i need to store in DB) if then its looks like a normal web application know?

Please advise me.

Thanks & Regards,
thilsen
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is up to you to write that code. Jersey just provides the framework for locating appropriate methods to respond to a PUT, GET, etc.

Obviously there are many ways to store data on the server side, you cant expect Jersey to do your work for you.

Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!