This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 235714 - - PageFlow of the faces-config.xml doesn't work for files placed in META-INF - no web-fragment.xml wizard - JSF managed bean wizard doesn't find faces-config.xml placed in META-INF
Summary: - PageFlow of the faces-config.xml doesn't work for files placed in META-INF ...
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF (show other bugs)
Version: 7.3.1
Hardware: All All
: P3 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-09 16:57 UTC by davemcr
Modified: 2016-07-07 08:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description davemcr 2013-09-09 16:57:34 UTC
According to http://docs.oracle.com/javaee/6/api/javax/faces/webapp/FacesServlet.html it is permitted to place faces-config.xml under META-INF/ in a Java EE 6 web fragment project (JAR containing META-INF/web-fragment.xml)

However, none of the JSF new component wizards e.g. "New JSF configuration" or "New JSF Controller" can generate or find faces-config.xml at this location so I have to create and edit these types of components manually

Also the faces-config editor cannot see resources in src/main/resources/META-INF/resources (which is where they should be for a web fragment).

Nor is there a wizard to create a new web fragment JAR project. I have to start with a web project (e.g. New Project, Maven, Web Application) and then change the packaging to JAR and rename src/main/webapp/WEB-INF as src/main/resources/META-INF then create web-fragment.xml manually (as there is no new web fragment XML wizard either)

All in all, unless I am missing something fundamental, support for this type of project seems poor in NetBeans compared with Eclipse although I am giving NetBeans serious consideration because Maven seems to integrate better with it than the m2e Eclipse plugin that has many practical issues.
Comment 1 davemcr 2013-09-09 17:02:06 UTC
correction "JSF managed bean" not "JSF controller"
Comment 2 Martin Fousek 2013-09-10 06:25:33 UTC
(In reply to davemcr from comment #0)

Thanks for your report.
 
> However, none of the JSF new component wizards e.g. "New JSF configuration"
> or "New JSF Controller" can generate or find faces-config.xml at this
> location so I have to create and edit these types of components manually

Definitelly issue, I'll take a look on it.

> Also the faces-config editor cannot see resources in
> src/main/resources/META-INF/resources (which is where they should be for a
> web fragment).

What do you mean by "cannot see" expression? Which kind of support doesn't work within the faces-config.xml file?

> Nor is there a wizard to create a new web fragment JAR project. I have to
> start with a web project (e.g. New Project, Maven, Web Application) and then
> change the packaging to JAR and rename src/main/webapp/WEB-INF as
> src/main/resources/META-INF then create web-fragment.xml manually (as there
> is no new web fragment XML wizard either)

Actually the NB's way should be to create Maven Java project or Java Class Library and place the web-framgment.xml into the META-INF folder. But you are right, that we are missing web-fragment.xml wizard now, it must be added.

Thanks for your description. We will try to fix all your issue into the nb8 since it's too late for such big changes into nb74.
Comment 3 davemcr 2013-09-10 08:36:31 UTC
Martin,

Thanks for the reply
 
> 
> > Also the faces-config editor cannot see resources in
> > src/main/resources/META-INF/resources (which is where they should be for a
> > web fragment).
> 
> What do you mean by "cannot see" expression? Which kind of support doesn't
> work within the faces-config.xml file?
> 

Pageflow. If faces-config.xml is placed in META-INF it isn't recognized as such

> Actually the NB's way should be to create Maven Java project or Java Class
> Library and place the web-framgment.xml into the META-INF folder. 

OK thanks I see what you mean
Comment 4 Martin Fousek 2013-09-10 14:35:01 UTC
(In reply to davemcr from comment #3)
> Pageflow. If faces-config.xml is placed in META-INF it isn't recognized as
> such

Thanks for additional information here.

The summary should be:
- PageFlow of the faces-config.xml doesn't work for files placed in META-INF
- no web-fragment.xml wizard
- JSF managed bean wizard doesn't find faces-config.xml placed in META-INF
Comment 5 Martin Balin 2016-07-07 08:54:14 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss