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.
To reproduce: 1) Mount a web module that was developed in NB 3.5 in 3.6 2) Execute the web module in the IDE. 3) Modify the deployment descriptor to Servlet 2.4 by changing the document declaration, ensuring that the resulting deployment descriptor is valid (i.e. rewrite any taglib element). 4) Add a tag file consisting of template text and tags from e.g. JSTL core. Use the tag in one of the JSPs. 5) Execute the JSP. You may not see any/all of the template texts, though the tags work. This appears to be a problem with the Tomcat server not cleaing out the work directories properly. You can fix it by exiting the IDE, and deleting the "work" directory (which is under "jakarta..." in the .nbuser/nb3.6 directory). I tried to delete the work directory while I had the IDE running - it didn't work for me, but then I had unhidden the file system and tried to delete it from the UI. This should be filed with Tomcat.
I will include this information in a Migration Guide and submit an entry for the release notes.
Waiver approved.
Chris, I'm assuming this is one of the ones you'd said you'd write a relnote for?
Suggested relnote text: Tomcat Bug Requires Workaround When Upgrading Deployment Descriptor (web.xml) to 2.4 Before you replace the 2.3 DTD declaration with the 2.4 DTD declaration in the web.xml file, you must perform the following steps. These steps are necessary because the Tomcat server is not clearing out old work files adequately, and gets into a state where it will not output template text. To upgrade a 2.3 web module to 2.4: 1. Locate the base directory. This directory is typically in your NetBeans user directory. You can find the path to this directory by opening the Runtime window, expanding Server Registry, expanding Tomcat 5 Servers, right-clicking the server instance and choosing Properties from the contextual menu. The Base Directory property shows the path to the base directory. 2. Exit the IDE. 3. Find and delete the web module's work directory under <base-directory>\work\Catalina\localhost. 4. Restart the IDE and upgrade the web.xml file by replacing the 2.3 DTD declaration with the 2.4 declaration. Do not deploy or execute the web module until after you save the change.
Chris, what will happen if the user doesn't perform the workaround?
It's hard to be specific about this, because we haven't had time to test it extensively. One of the things I noticed was that template text in tag files was ignored, but I wouldn't want to say it in so many words. Perhaps you can say that "some resources, especially tag files, may not execute properly". Ana
It's not necessary to exit the IDE and remove the work directory *unless* you have executed the application with the 2.3 deployment descriptor. But it's possible that the code completion does not work properly (?), so you may need to exit the IDE for that reason. This is just speculation that this was the reason I saw why custom tags weren't completely when I first upgraded the module.
Updated text Suggested relnote text: Tomcat Bug Requires Workaround When Upgrading Deployment Descriptor (web.xml) to 2.4 Before you replace the 2.3 DTD declaration with the 2.4 DTD declaration in the web.xml file, you must perform the following steps. These steps are necessary because the Tomcat server is not clearing out old work files adequately, and some resources, especially tag files, may not execute properly. Note that you do not need to do this workaround if you have never executed the 2.3 version. To upgrade a 2.3 web module to 2.4: 1. Locate the base directory. This directory is typically in your NetBeans user directory. You can find the path to this directory by opening the Runtime window, expanding Server Registry, expanding Tomcat 5 Servers, right-clicking the server instance and choosing Properties from the contextual menu. The Base Directory property shows the path to the base directory. 2. Exit the IDE. 3. Find and delete the web module's work directory under <base-directory>\work\Catalina\localhost. 4. Restart the IDE and upgrade the web.xml file by replacing the 2.3 DTD declaration with the 2.4 declaration. Do not deploy or execute the web module until after you save the change.
They should do step 4 *before* they exit the IDE to be absolutely sure. It's safer that way, in case the parser remembers anything from the DD.
Another Attempt Based on Email Feedback: Description: When you upgrade your applications deployment descriptor (web.xml) from version 2.3 to 2.4, the Tomcat server might not clear out old work files adequately, and some resources, especially tag files, might not execute properly. Workaround: After you replace the 2.3 DTD declaration with the 2.4 DTD declaration in the web.xml file, you must perform the steps below before you deploy or execute the application. 1. Locate the base directory. This directory is typically in your NetBeans user directory. You can find the path to this directory by opening the Runtime window, expanding Server Registry, expanding Tomcat 5 Servers, right-clicking the server instance and choosing Properties from the contextual menu. The Base Directory property shows the path to the base directory. 2. Exit the IDE. 3. Find and delete the web module's work directory under <base-directory>\work\Catalina\localhost. 4. Restart the IDE.
Ana, can you summarize what exactly you expect to see fixed in netbeans? How could netbeans best (or at least adequately) help to solve this tomcat issue? Have you filed the issue against tomcat?
I have tested the described scenario and it seems to work.