Results 1 to 2 of 2

Thread: servlets or jsp

  1. #1
    krishnapal is offline Member
    Join Date
    Dec 2007
    Posts
    1
    Rep Power
    0

    Default servlets or jsp

    I wanna know whether I should use servlets or jsp in my application,I wanna know what is widely accepted,

    is I have to follow MVC architecture,

  2. #2
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    757
    Rep Power
    8

    Default

    Both technology is use for creating a web application. The have different purpose. For instance the servlet is better use for controller because it will be hard to maintain the look of you web page if you create it using servlet. For instance if you need to change the layout of your page you have the edit your servlet then you need to compile it again.

    While JSP is use for displaying data, or the content of you pages. All logic to retrieve the data, etc should be delegated to the servlet. Your web design will be all in the JSP page, this also means that a web designer who might don't know what servlet is will easily alter the look of your page.

    So again you can use both technology. Just be sure they are in the place where they work best. Here is an example of a simple how to write a web application in MCV [JavaRanch FAQ : Code Barn Simple Mvc]
    Last edited by wsaryada; 12-13-2007 at 02:33 PM.

Similar Threads

  1. Java Servlets
    By kondalrao in forum Java Servlet
    Replies: 0
    Last Post: 04-14-2008, 11:12 AM
  2. 1 form 2 servlets
    By sandor in forum Java Servlet
    Replies: 2
    Last Post: 01-22-2008, 10:47 AM
  3. Deploying Servlets
    By gapper in forum New To Java
    Replies: 2
    Last Post: 01-17-2008, 12:43 PM
  4. Servlets
    By nagaroopanandha in forum Advanced Java
    Replies: 1
    Last Post: 08-07-2007, 02:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •