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.
Create simple Web project with a Servlet, disable CoS and start debugging servlet. You can change servlet code and "Apply Changes". Now enable CoS (and/or DoS) and notice that Apply Changes will be disabled.
Created attachment 117441 [details] sample project for testing
Issue 207149 which triggered this report was P2 and voted by 7 users. If fix would be easy we should consider getting it into 7.1.2 patch.
I've reproduced the problem with the attached project. It's similar to issue #199643, but the "Apply Code Changes" is really disabled even after changes are saved. Maybe the problem is, that it does not cooperate with web projects correctly. This needs to be fixed, but I still think, that the preferred way to propagate changes in Web projects is to use Deploy on Save. It's also more reliable than Apply Code Changes, which is limited in functionality (e.g. it is not able to add fields and methods). Scheduling for 7.2.
(In reply to comment #3) > I've reproduced the problem with the attached project. > It's similar to issue #199643, but the "Apply Code Changes" is really disabled > even after changes are saved. Yes, it looks like the same issue. Feel free to close one as duplicate but please keep this at P2 - 7 votes is a strong feedback. > This needs to be fixed, but I still think, that the preferred way to propagate > changes in Web projects is to use Deploy on Save. It's also more reliable than > Apply Code Changes, which is limited in functionality (e.g. it is not able to > add fields and methods). One case when Deploy on Save might not work for users is if DoS should result into web container's session being dropped. For example imagine user is debugging an application and they logged in in the browser and there is an active session and user is debugging something and want to apply a change in the code. If that should cause session being dropped and user being forced to login again and start whole workflow from the beginning then that would be very annoying. Even limited Apply Code Changes would be preferred in this case. On the other hand whether session gets dropped or not differs per server - in GlassFish case it should not be an issue and Apply Code Changes might rely fully on Deploy on Save. I'm not sure about other servers like Tomcat.
My suspicion is, that this is broken by issue #211005. I'll check this, after the rescanning is fixed.
issue 211005 is for 7.2 but this one was filed for 7.1
Fixed by changeset: 223319:81458f8f85cd http://hg.netbeans.org/main/rev/81458f8f85cd
Integrated into 'main-golden', will be available in build *201206060001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/81458f8f85cd User: mentlicher@netbeans.org Log: #210331: Fix of Apply Code Changes in Web projects.
Thanks Martin. Could this also be a problem with other kinds of EE projects (EJB, AppClient, EAR, Maven) and does the fix also need to be done for these project types? Cc'ing also Jirka - Jirko do you know what's the situation for the other project types?
In EJB and EAR projects, this works, since they have "debug.fix" action enabled in COS mode, unlike Web project. As I do not think, that "debug.fix" should be enabled in COS mode, I've applied the changes to EJB and EAR projects as well, for the case, that "debug.fix" gets disabled: changeset: 224110:d7750941ccb2 http://hg.netbeans.org/main/rev/d7750941ccb2 There is no COS mode in AppClient project. In Maven, Apply Code Changes works fine for me.
Integrated into 'main-golden', will be available in build *201206110001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/d7750941ccb2 User: mentlicher@netbeans.org Log: #210331: Apply code changes in COS mode.
Verified web, ejb, ear projects (both ant and maven).