Community
Participate
Working Groups
Build Identifier: 20100917-0705 On a / context project, when WTP published a jsp whole tomcat workd directory is removed. It does not happen when project context root is other than "/". (I think) Because of this, sometimes tomcat classloader cannot load JSP generated class. I use tomcat 6.0.30. WTP 3.2.2.v201008170019-377AB8s73533J5H335L Reproducible: Always Steps to Reproduce: 1. create Dynamic Web project 2. set Web context root as "/" 3. edit a jsp file and save. 4. check tomcat work directory. the .metadata/.plugins/org.eclipse.wst.server.core/tmp1/work/Catalina/localhost/_ directory is removed. 5. request jsp page on a web browser. 6. .metadata/.plugins/org.eclipse.wst.server.core/tmp1/work/Catalina/localhost/_ directory is regenerated. This phenomenon does not happen when a context root is other than "/".
I can confirm this issue on a Mac with Eclipse Indigo Service Release 2 and apache-tomcat-6.0.33
Created attachment 248841 [details] normalize "/" to "" inside WebModule module to match behavior elsewhere This problem has been plaguing me for years so I finally decided to look into it. I must say I'm very impressed at how easy it was to pull the latest webtools.servertools.git and debug this project. Looks like the root of the problem is around line 669 of TomcatVersionHelper.java where it normalizes "/" to "". This causes getRemovedKeptCatalinaContexts to treat the module deployed to "/" as a brand new module because its comparing "/" from the eclipse configuration to "" from the deployed and transformed (see line 669) configuration. I'm not familiar enough with the code to know the right thing to do, so I tried to keep my change isolated to the problem. I could of used a ternary but I'm not sure what the sentiment around those are.
NOTE: I am in compliance with the Eclipse Foundation Contributor’s Certificate of Origin
Is there anything I need to do to get my patch reviewed and integrated?
Hi Brian, I have limited time available for WTP, but will have some time over the holidays. I will try to have this addressed during that time, if not sooner.
Comment on attachment 248841 [details] normalize "/" to "" inside WebModule module to match behavior elsewhere Updating iplog flag.
The patch has been applied to WTP 3.6.x and 3.7.x builds and will appear in WTP 3.6.3 and 3.7.0. Thanks for the patch.
New Gerrit change created: https://git.eclipse.org/r/109256