Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

diif b/w servlets and jsp

This is a discussion on diif b/w servlets and jsp within the Java forums, part of the Software Development category; Although i know jsp and servlets up to some extent, but i have some confusion i know the advantages of jsp over servlets!but the problem is that can any one ...

Go Back   Geeks Talk > Software Development > Java
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

Java Java related Issues and Problems

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-05-2007
Expert Member
 
Join Date: Oct 2005
Location: india,cochi,bangalore
Posts: 395
Thanks: 2
Thanked 9 Times in 8 Posts
vmshenoy is on a distinguished road
Question diif b/w servlets and jsp

Although i know jsp and servlets up to some extent, but i have some confusion i know the advantages of jsp over servlets!but the problem is that can any one tell me what are the advantages of servlets over jsp. I think servlets may b quick but please reply. Bye
__________________
:)
NEVER SAY DIE.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-05-2007
Contributing Member
 
Join Date: Sep 2006
Location: bangalore, india
Posts: 1,016
Thanks: 0
Thanked 91 Times in 72 Posts
psuresh1982 will become famous soon enough
Re: diif b/w servlets and jsp

We already discuss about this....Goto the following URL....It may be helpful to you...

http://www.geekinterview.com/talk/17...rvlet-jsp.html

------------------
suresh
Reply With Quote
  #3 (permalink)  
Old 01-05-2007
Expert Member
 
Join Date: Oct 2005
Location: india,cochi,bangalore
Posts: 395
Thanks: 2
Thanked 9 Times in 8 Posts
vmshenoy is on a distinguished road
Question Re: diif b/w servlets and jsp

hi suresh

I think so u have got it wrongl,but my question was

ADVANTAGES of SERVLETS over JSP ?(and not vice versa)
the link provided by you tells the advantages of JSP ,but not to my question

During an interview,the interviewer asked me to tell advantaes of SERVLETS over JSP?


Bye
__________________
:)
NEVER SAY DIE.
Reply With Quote
  #4 (permalink)  
Old 01-05-2007
Contributing Member
 
Join Date: Sep 2006
Location: bangalore, india
Posts: 1,016
Thanks: 0
Thanked 91 Times in 72 Posts
psuresh1982 will become famous soon enough
Re: diif b/w servlets and jsp

I think in JSP, they acheive all the goals of servlet.....

According to my knowledge i hava only one difference.

"Servlets are faster than jsp". (Sorry for the wrong post)

------------------
suresh
Reply With Quote
  #5 (permalink)  
Old 01-05-2007
Expert Member
 
Join Date: Oct 2005
Location: india,cochi,bangalore
Posts: 395
Thanks: 2
Thanked 9 Times in 8 Posts
vmshenoy is on a distinguished road
Re: diif b/w servlets and jsp

hi suresh
its fine! no need to be sorry.
but plz see my first post, where i have written the same thing which u have written now i.e "servlets are faster than jsp".
(I have written in my post that "servlets are quick".)

I told the interviewer the same thing i.e when we save JSP program then v save it as .jsp .So i told him that JSP take more time since .jsp is converted to .java.
But then interviewer told me (and rightly so)that this will happen only ONCE, i.e once .class file is formed then this is not a problem. Then i didnot knew any other differences.

Anyway if u get one ,then plz do tell me

bye
__________________
:)
NEVER SAY DIE.
Reply With Quote
  #6 (permalink)  
Old 01-16-2007
Expert Member
 
Join Date: Oct 2005
Location: india,cochi,bangalore
Posts: 395
Thanks: 2
Thanked 9 Times in 8 Posts
vmshenoy is on a distinguished road
Re: diif b/w servlets and jsp

hi kalayama

(please read the previous posts too)
I think you can explain this topic more!So asking you. I asked from many
but iam not sure what exact answer.One told that in servlets we dont have unnecessary coding! is it correct?

Also if you know some other points, then please tell me!


bye
__________________
:)
NEVER SAY DIE.
Reply With Quote
  #7 (permalink)  
Old 01-16-2007
Expert Member
 
Join Date: Sep 2006
Location: Bengalooru (Formerly called Bangalore), India
Posts: 486
Thanks: 2
Thanked 29 Times in 28 Posts
kalayama is on a distinguished road
Re: diif b/w servlets and jsp

Quote:
java server pages (jsp) is basically sun's answer to microsoft's active server pages (asp). They work in very similar ways. Asp allows for vbscript, jscript, or perlscript code to be placed in between sections of html. Jsp does the exact same thing only using java as the language of choice. Both asp and jsp combine the design (html) and the code (asp or jsp) in the same file.

Java servlets are a java equivalent of a cgi script. Like cgi it can generate html, but it does not allow for html to live in "raw" form within the program. Servlets can be used to process a set of instructions and then return the values that were created by the servlet.

Jsp also supports "tag libraries" these are simple tags that you embed in your jsp, which execute java code that is stored in a separate class. This allows you to keep your keep complex page logic encapsulated in separate classes, while keeping your jsp pages "clean", and free of java code. By doing this, you keep the page design in the jsp, and the page logic elsewhere. This makes it easier to develop and maintain your pages. In addition to writing your own tag libraries, you can also obtain free open-source tag libraries to perform various functions.
FAQTs - Knowledge Base - View Entry - What is are the differences between Java Server Pages and Java Servlets? cheers! kalayama
__________________
[COLOR="Blue"][SIZE="2"]"If you are not living on the edge of your life, you are wasting space"[/SIZE][/COLOR]

Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"
Reply With Quote
  #8 (permalink)  
Old 09-09-2007
Junior Member
 
Join Date: Sep 2007
Location: Banglore
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
chary04 is on a distinguished road
Re: diif b/w servlets and jsp

the main differerence is in servlets we must use java code completely.where as in JSP ni need ti use java code.without knowing about java we can devolop JSP's.And also we use JSP's kto kdesign user interface screens where as servlets we write internal logic of the application......bye chary.
Reply With Quote
  #9 (permalink)  
Old 01-31-2008
Junior Member
 
Join Date: Jan 2008
Location: hyderabad
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
malli1mca07 is on a distinguished road
Re: diif b/w servlets and jsp

even though jsp is converted into servlet only once, the time require to dovelepe a jsp takes very less time than doveloping a servlet, but performance wise servlets are first over jsp
but majority of doveloperd preferedf jsps because of two reasons
1.time required to dovelope jsp is takes less time than servlet
2.so, overall dovelopement time and cost can be redused
3.in majority of cases the performance level expected by clients can achived by jsps
Reply With Quote
  #10 (permalink)  
Old 03-25-2008
Junior Member
 
Join Date: Mar 2008
Location: chennai
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
snknaga is on a distinguished road
Re: diif b/w servlets and jsp

One of the main difference between Jsp and Servlets is content separation. ie. static content and dynamic content can be separated in Jsp not as servlet
Reply With Quote
Reply

  Geeks Talk > Software Development > Java

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Real time examples for EJB, JSP servlets JobHelper JSP 2 07-24-2007 02:27 PM
number of servlets in a web container JobHelper Java 3 03-06-2007 09:18 AM
Testing for Applets and Servlets JobHelper Testing Issues 0 12-17-2006 02:45 AM


All times are GMT -4. The time now is 04:41 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved