Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

do we need servlets as we are having jsps?

[b][red]This message was edited by anil pamidi at 2005-7-25 1:2:14[/red][/b][hr]
Do we really need servlets as we are having jsps.
Can we develop an application without using even a single servlet i.e.,
using pure jsps?
What is the main difference between jsp and servlet?


Comments

  • saigonsaigon Member Posts: 51
    : [b][red]This message was edited by anil pamidi at 2005-7-25 1:2:14[/red][/b][hr]
    : Do we really need servlets as we are having jsps.
    : Can we develop an application without using even a single servlet i.e.,
    : using pure jsps?
    : What is the main difference between jsp and servlet?
    :
    :
    :

    Yes, You can develop a web base application using JSP technology without using a single servlet. This method is also known as Model-1 design.
    You should not practice this! You should use Model-2 design which allows you to separate the presentation and the bussines logic. Check out the Struts, Webwork, or Tapestry frameworks. These frameworks do a good job of seperate the View, Controller, and Model

    As you know, your JSP files actually got translate into Serlelt behind the scene by the container. This is all transparent to you.

    The difference between the servlet and JSP is that the servlet works just like CGI programming model. You would see in the servlet code that it generates HTML output.

    JSP allows you to mix HTML with java code to to dynamically generate HTML result.

    Hope this help


Sign In or Register to comment.