[GLASSFISH-13543] Automatic registration of FacesServlet with no JSF annotations Created: 18/Sep/10  Updated: 13/Nov/12  Resolved: 13/Nov/12

Status: Closed
Project: glassfish
Component/s: jsf
Affects Version/s: 3.1
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: arungupta Assignee: Ed Burns
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Related
is related to JAVASERVERFACES-2603 Automatic registration of FacesServle... Closed
Issuezilla Id: 13,543

 Description   

Currently JSF runtime is automatically registered for a Java EE 6 WAR if any JSF-known annotation is
available on a class in the WAR. This makes explicit registration of FacesServlet in web.xml redundant
and thus fulfills the promise of no-web.xml in Java EE 6 very well.

However as CDI is the recommended way for JSF backing beans, this means that FacesServlet need to be
explicitly registered if only @Named is used for backing beans. Thus web.xml need to be present in the
WAR file.

FIling this as P2 as this is going to be a common use case in Java EE 6. Registering FacesServlet when
@Named is present on a class in the WAR file is not the right thing cause a non-JSF framework may be
used for the front-end. Maybe presence of one or more .XHTML files can trigger registration of
FacesServlet.



 Comments   
Comment by Ryan Lubke [ 18/Sep/10 ]

Passing to Ed.

Comment by arungupta [ 19/Sep/10 ]

Another suggestion is to take ApplicationConfig-like approach taken by JAX-RS. This class can then
register implementation specific Servlet and still keep the application portable.

Comment by Ed Burns [ 25/Oct/10 ]

Move to 3.2

Comment by Ed Burns [ 08/Apr/11 ]

This was fixed in JSF 2.1

Comment by Ed Burns [ 11/Apr/11 ]

Ahh, Arun, I see you are correct. I will re-open this bug.

Comment by Ed Burns [ 13/Nov/12 ]

I have requested a meeting with Shing Wai to give me some help on this issue.

Comment by Ed Burns [ 13/Nov/12 ]

Downgrading from Critical to Major.

Comment by Manfred Riem [ 13/Nov/12 ]

Closing as duplicate. See associated issue for resolution.

Generated at Thu Feb 11 18:02:19 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.