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 233748 - JS Debugger does not work in JSF application with "/faces" servlet configuration
Summary: JS Debugger does not work in JSF application with "/faces" servlet configuration
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-01 06:16 UTC by David Konecny
Modified: 2016-07-07 08:55 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test project (18.93 KB, application/x-sdlc)
2013-08-01 06:16 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2013-08-01 06:16:37 UTC
Created attachment 138100 [details]
test project

There is a following problem: when JSF page references a JavaScript file and JSF servlet is configured in web.xml with URL pattern "/faces" then any breakpoint set in JS file is marked as inactive/unreachable. The cause is that JS file is loaded from the JSF page via URL containing JSF servlet prefix "/faces" which breaks ServerURLMappingImplementation mapping between project source and browser URL.

Attached is a test project which demonstrates the problem from few different angles. There are three pages:

* http://localhost:8080/JsfTestCase/faces/page1.xhtml - which demonstrates the problem; just set breakpoint in js/app1.js and reload the page; breakpoint will be never hit

* http://localhost:8080/JsfTestCase/faces/page2.xhtml - shows a possible workaround; set breakpoint in js/app2.js and breakpoint is always hit because absolute URL is used for JS file

* http://localhost:8080/JsfTestCase/faces/page3.html - is not a JSF page and shows that in plain HTML file the breakpoint (js/app3.js) is hit correctly

At this stage I'm not sure how severe this problem is. Workaround is to configure JSF servlet with "*.faces" URL pattern or use page2.xhtml workaround. page3.html also illustrates that single JS file can endup being accessed via two different URLs. That means that one case will always fail and this issues does not have a straightforward solution.
Comment 1 David Konecny 2013-08-01 06:20:13 UTC
One tweak to match code with description from this issue.
f78c6d5694d4
Comment 2 Quality Engineering 2013-08-02 02:33:28 UTC
Integrated into 'main-silver', will be available in build *201308012300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f78c6d5694d4
User: David Konecny <dkonecny@netbeans.org>
Log: #233748 - JS Debugger does not work in JSF application with "/faces" servlet configuration
Comment 3 Martin Balin 2016-07-07 08:55:08 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