Results 1 to 6 of 6

Thread: why we shift Servlet to JSP ?

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

    why we shift Servlet to JSP ?

    What is the main reason to shift Servlet to JSP ?

    I found one reason, that is "Easy to edit the coding in JSP not Servet".

    At present developers mostly used servlet of jsp.....plz clarify this one.

    ----------------
    suresh


  2. #2
    Contributing Member
    Join Date
    Jun 2006
    Answers
    95

    Re: why we shift Servlet to JSP ?

    JSP doesn't give you anything that you couldn't in principle do with a servlet. But it is more convenient to write (and to modify!) regular HTML than to have a zillion println statements that generate the HTML. Plus, by separating the look from the content you can put different people on different tasks: your Web page design experts can build the HTML, leaving places for your servlet programmers to insert the dynamic content.

    read some notes here ..

    Servlets and JSP: An Overview


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

    Re: why we shift Servlet to JSP ?

    Thanks buddy.....its really helpful to me...

    ----------------
    suresh


  4. #4
    Junior Member
    Join Date
    Apr 2008
    Answers
    5

    Re: why we shift Servlet to JSP ?

    The primary goal of JSP is to replace Servlets because of few reasons:
    > to reduce development cost, and also burden of the jsp developer to write most common statements like package declaration, import statement,
    class declaration and life cycle methods etc..
    > in jsp no need to implement the life cycle functions like init(), service() and destroy() method.
    > jsp presents dynamically retrieved data from the different layers of java web application development.


  5. #5
    Junior Member
    Join Date
    Jun 2008
    Answers
    2

    Re: why we shift Servlet to JSP ?

    See the basic difference is that:

    In Servlet
    ----------
    You have to code whole HTML into ur java....

    In JSP
    -------
    You are to code Java inside HTML

    Well everybody knows that the latter is much easier than former.


  6. #6
    Junior Member
    Join Date
    Apr 2008
    Answers
    1

    Re: why we shift Servlet to JSP ?

    Quote Originally Posted by psuresh1982 View Post
    What is the main reason to shift Servlet to JSP ?

    I found one reason, that is "Easy to edit the coding in JSP not Servet".

    At present developers mostly used servlet of jsp.....plz clarify this one.

    ----------------
    suresh
    well jsp is good for presentation ..while servlets is good for content generation ...a good web application consists both only jsp only servlet application are ugly and rare nowadays


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