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 148904 - Copying JSP (.jsp) incorrectly creates a package statement in top of file as if it were a .java file
Summary: Copying JSP (.jsp) incorrectly creates a package statement in top of file as ...
Status: RESOLVED DUPLICATE of bug 153150
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@javaee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-01 23:51 UTC by _ wadechandler
Modified: 2008-11-20 06:08 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 _ wadechandler 2008-10-01 23:51:05 UTC
Every time I copy a JSP (.jsp) file from a folder to another one the IDE adds a package to the top of the file. I have a
project which has a set of defaults. If a file is copied into another folder of the same layout under a custom folder it
overrides the default file and may be changed without changing the original software, and this is why I'm copying .jsp
files a lot. Anyways, I simply:
1) click on a .jsp file in a sub-folder or the top folder (.) of the web view of a web project.
2) choose to copy the file
3) locate another sub-folder under the web view
4) right click on it
5) choose paste
6) open the file
7) notice a package statement, an error, in the JSP file

a quick way to reproduce is:

1) Create a new web project from the New->Project wizard and choose no frameworks
2) Right click on "Web Pages"
3) Create a new folder called "test"
4) Right click on index.jsp and copy it
5) Right click on "Web Pages"/"test" and choose paste
6) open "Web Pages"/"test"/index.jsp
7) notice the package

I wasn't 100% sure which subcomponent to place this in, so I chose code. My current environment is openSuSE 11, JDK
1.6_7, and a build of NB 6.5 main from this morning (081001). This has happened on Windows XP SP2 as well (same version
of the JDK).
Comment 1 Matthew Bohm 2008-11-20 06:08:43 UTC

*** This issue has been marked as a duplicate of 153150 ***