Results 1 to 10 of 10

Thread: diif b/w servlets and jsp

  1. #1
    Expert Member
    Join Date
    Oct 2005
    Answers
    383

    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.

  2. #2
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    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


  3. #3
    Expert Member
    Join Date
    Oct 2005
    Answers
    383

    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.

  4. #4
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    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


  5. #5
    Expert Member
    Join Date
    Oct 2005
    Answers
    383

    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.

  6. #6
    Expert Member
    Join Date
    Oct 2005
    Answers
    383

    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.

  7. #7
    Expert Member
    Join Date
    Sep 2006
    Answers
    477

    Re: diif b/w servlets and jsp

    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!"

  8. #8
    Junior Member
    Join Date
    Sep 2007
    Answers
    3

    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.


  9. #9
    Junior Member
    Join Date
    Jan 2008
    Answers
    11

    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


  10. #10
    Junior Member
    Join Date
    Mar 2008
    Answers
    1

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact