1

does JSF 2.1.7 (and 2.1.x in general) require Servlet 3.0 or just 2.5? If you look at pom http://repo1.maven.org/maven2/com/sun/faces/jsf-api/2.1.7/jsf-api-2.1.7.pom you'll find servlet 3, but it seems referred to JSF 2.2 (see also tag name: "Oracle's implementation of the JSF 2.2 specification API.")

I've found different answers to this question on the web. Can anyone help me? Some links:

Mojarra JSF 2.1.9 exception while loading a page which has got composite component Mojarra Java EE 5/6 compatibility https://forums.oracle.com/forums/thread.jspa?messageID=10140121

Thanks

Community
  • 1
  • 1
Teo
  • 69
  • 2
  • 8

2 Answers2

3

The Servlet 3.0 requirement in Mojarra 2.1 is merely for the "optional stuff", such as auto-registration of the FacesServlet on URL patterns *.jsf, *.faces and /faces/* without the need to write it down in webapp's own web.xml.

Mojarra 2.1 is however backwards compatible with Servlet 2.5, you'll only miss the "optional" stuff and among others need to register the FacesServlet in web.xml yourself (although I would personally recommend to do it anyway on an URL pattern of *.xhtml).

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
1

Take a look at specification. Preface (Related technologies) says that one of requirements is Servlet API version 2.5, so you don't need version 3.0. Also this page quotes Ed Burns who states that is dependent only on 2.5

Petr Mensik
  • 26,874
  • 17
  • 90
  • 115