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 173046 - Wrong page is displayed when run web app with JSF
Summary: Wrong page is displayed when run web app with JSF
Status: RESOLVED WONTFIX
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-24 16:38 UTC by Jaroslav Pospisil
Modified: 2009-11-03 05:06 UTC (History)
2 users (show)

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 Jaroslav Pospisil 2009-09-24 16:38:10 UTC
Build 200909220201, Win Vista, JDK 1.6.0_16

Create new JavaEE6 Maven Web Application and add JSF Framework/facelets. Everything is created properly,but when you run
it,there will be index.jsp page displayed in web browser,even if there's correct faces/index.xhtml page set in web.xml .
Comment 1 Milos Kleint 2009-10-16 14:30:17 UTC
reassigning to web/jsf. please advice how to make it work in maven projects. is the jsf support doing something to make
the new welcome page opened instead of the default one?
Comment 2 Alexey Butenko 2009-10-30 12:44:20 UTC
It seems that it is server side issue, reassigning, please evaluate.
Comment 3 Vince Kraemer 2009-10-31 22:25:36 UTC
remove the index.jsp from the app and it will behave as you expect.

Comment 4 Vince Kraemer 2009-11-02 23:34:58 UTC
The server is acting 'as expected'

The long version:

the server's default-web.xml file is merged with the web.xml

the welcome-file-list gets searched for actual files that match, first
if there are not files that match, then urls are constructed from the welcome-file-list elements and those are searched...

So the search order looks like this when index.jsp is present:

faces/index.xhtml... no file found
index.html... no file found
index.htm... no file found
index.jsp... file found. This is what gets rendered.


If index.jsp was not in the web app the search would look like this

face/index.xhtml... no file found
index.jsp... no file found
index.html... no file found
index.htm... no file found
index.jsp... no file found

redo search with servlet-mapping...

http://localhost:8080/context-root/face/index.xhtml.. resource found. this is what gets rendered

If you want the server to do something else, please open an issue in the GF issue tracker
Comment 5 Vince Kraemer 2009-11-03 05:06:43 UTC
actually... the web container folks did a bit more digging and the current behavior is not the correct behavior.

They are making a change in the server to resolve the issue...  I am going to leave this issue wontfix... since the code change is not in the server plugin code...