• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlets vs Web Services

 
John Gregory
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure which group to post this to, so I'll start
here. I'm working on my SCWCD, so I've been learning
servlets & jsp. I'm hoping to use this technology at
work. However, the project I'm on uses web services.

Can anyone tell me the advantage of either...why would
I want to code a web service vice a servlet &/or a jsp?
Are there any good web readings that discuss these topics?

Thanks,

John Gregory
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Web services are often built using servlets so the subject of this thread doesn't make a lot of sense.

A web service (as opposed to a regular web page) is designed to be called by other programs.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Web services have been a hot topic for serveral years with so much going on it is hard to keep up or to know where to start.

You might start at this Sun page explaining the state of Sun's Java tools for web services.

Bill
 
saurav sarkar
Ranch Hand
Posts: 180
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have not worked on web services.......but i think
its not right to compare these two.......as web services can
use servlets.....
 
Kaydell Leavitt
Ranch Hand
Posts: 689
Eclipse IDE Firefox Browser Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't it true that web services are for websites to talk to each other in a linga franca and that the underlying technology may or may not be a servlet and may not even be Java-based but with web services.

Couldn't you have a servlet that is talking to .Net or to another servlet and that the point of web services is that you can communicate with other software that implements web services and not have to know what the other side is implemented with?

Kaydell
[ July 27, 2007: Message edited by: Kaydell Leavitt ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kaydell Leavitt:
Isn't it true that web services are for websites to talk to each other in a linga franca and that the underlying technology may or may not be a servlet and may not even be Java-based but with web services.

Couldn't you have a servlet that is talking to .Net or to another servlet and that the point of web services is that you can communicate with other software that implements web services and not have to know what the other side is implemented with?

Kaydell

[ July 27, 2007: Message edited by: Kaydell Leavitt ]


All true.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Like Saurav Sarkar, I too feel that these topics are not very closely related.

Web Services are one of the xml based standards for making reusable services.The main transport was HTTP protocol so the word 'Web' has been associated with it , though now it supports many other transports.

Servlets are mainly for delegating the flow further for services invocation while the actual service would be somewhere , but not as part of the servlet code.That may be a web service , EJB or something else.
Another work of the servlet would be to direct the flow to the view with all the required data for generation of the final HTML response.
[ July 29, 2007: Message edited by: Rahul Bhattacharjee ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't it true that web services are for websites to talk to each other in a linga franca


That is a rather limited view. There is no reason that client-side software - on your desktop, cellphone or whatever - can't talk to web services, and plenty do.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic