This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes Servlets and Jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets and Jsp" Watch "Servlets and Jsp" New topic
Author

Servlets and Jsp

Vinod Chamoli
Greenhorn

Joined: Jun 09, 2003
Posts: 21
When should i go for servlets and when should i go for JSP.
I would be grateful if anyone of u could explain this.Plz give me with examples.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
First of all, in servlet u write html code inside java and in jsp u write ur java inside html. thus the presentation layer is seperated. Thus if u want to write lot of html things that has to come to browser again , then stick with JSP. only if u want something to work in the background go for servlet.
sakthi
Originally posted by vinod:
When should i go for servlets and when should i go for JSP.
I would be grateful if anyone of u could explain this.Plz give me with examples.

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I think JSP can d0 everything and even something more what servlets can do---then what is the need of servlets???
prakash muthu
Ranch Hand

Joined: Sep 06, 2000
Posts: 75
Hi
JSP used for presentation purpose. We can use Java code inside the JSP as well as we can invoke the servlet. let me know if you are looking more details
with regards
Prakash
prakash.m@db.com


Prakash.M<BR>Bangalore- India<BR>(prakashem@rediffmail.com)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlets and Jsp