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 245182 - After renaming servlet using "run file" continues to use old name
Summary: After renaming servlet using "run file" continues to use old name
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.0
Hardware: Macintosh Mac OS X
: P2 normal (vote)
Assignee: Martin Janicek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-22 23:28 UTC by jscnet
Modified: 2014-07-09 02:47 UTC (History)
1 user (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 jscnet 2014-06-22 23:28:26 UTC
I've created a Web project and a servlet named "AServlet".  This is a Maven based project.  I can run the servlet by right-clicking on it under Projects and selecting "run file", all works wonderfully. However, if I rename (by refactoring) the servlet to "BServlet" and then right click on it and select "run file", the browser comes up with /AServer in the address and (of course) I get the expected 404 error.  If I simply change the name in the browsers URL field to BServlet, it works, but naturally this doesn't address the underlining issue, which is, refactoring a servlet name doesn't update some setting in the editor which it needs to correctly execute a "run file".  In other words, the new name isn't registered with the editor or at the very least, with the "run file" functionality within the editor.

* Performing a clean rebuild doesn't fix the issue.
* Closing and reopening the IDE also doesn't fix the issue.

Jason
Comment 1 jscnet 2014-06-22 23:38:03 UTC
Set Servlet Execution URI does note that "You can change the execution URI later via Tools > Set Servlet Execution URI".

However, "Set Servlet Execution URI" is nowhere to be found under TOOLS.

So, there are now 2 bugs.
Comment 2 Martin Janicek 2014-07-08 13:19:30 UTC
Reproducible, I'm on it
Comment 3 Martin Janicek 2014-07-08 14:22:27 UTC
Changed to work the same way as the Ant project does (it's not caching anything using FileObject attributes).

Now the runner should ask you every time when you will use Run File on servlet file.

Change-set: web-main #3dd2c2205ca2
Comment 4 Quality Engineering 2014-07-09 02:47:36 UTC
Integrated into 'main-silver', will be available in build *201407090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/3dd2c2205ca2
User: Martin Janicek <mjanicek@netbeans.org>
Log: #245182 - After renaming servlet using run file continues to use old name