Skip to main content
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Required fields*

What is the difference between JSF, Servlet and JSP?

I have some questions. These are :

  1. How are JSP and Servlet related to each other?
  2. Is JSP some kind of Servlet?
  3. How are JSP and JSF related to each other?
  4. Is JSF some kind of Pre-Build UI based JSP like ASP.NET-MVC?

Answer*

Cancel
12
  • @BalusC : I have seen this type of code used in jsp instead of java code - <c:forEach items="${items}"> <jsp:attribute name="var"> <mytag:doesSomething/> </jsp:attribute> What is this?
    Ashwin
    –  Ashwin
    2012-04-23 06:40:52 +00:00
    Commented Apr 23, 2012 at 6:40
  • 8
    @Shashank: Not entirely. Only the <c:forEach> tag is from JSTL. See also stackoverflow.com/tags/jstl/info
    BalusC
    –  BalusC
    2012-09-29 11:22:48 +00:00
    Commented Sep 29, 2012 at 11:22
  • 1
    Yes. <mytag:doesSomething/> looks like a custom tag and <jsp:attribute>, a jsp tag.
    Shashank Kadne
    –  Shashank Kadne
    2012-09-29 11:43:19 +00:00
    Commented Sep 29, 2012 at 11:43
  • 4
    Since this is a hugely popular answer, I want to add a very important bit which is JSP tag files which allows for custom tag creation for page composition and layout without writing Java code. This feature is extremly useful and has been part of the standard for many years yet remains underutilized.
    jiggy
    –  jiggy
    2014-09-01 20:41:42 +00:00
    Commented Sep 1, 2014 at 20:41
  • 1
    @johnny Facelets has been the preferred view technology since Java EE 6 was released in 2009 (docs.oracle.com/javaee/6/tutorial/doc/giepx.html). The minimum set of technologies to develop Java web apps isn't higher than most other languages, but there are many more options and competitors, which is confusing to newcomers. Web development in Ruby? The first choice is obvious.
    user201891
    –  user201891
    2014-09-10 00:11:43 +00:00
    Commented Sep 10, 2014 at 0:11

Morty Proxy This is a proxified and sanitized view of the page, visit original site.