19 Sept 2005

Not as easy as it seems

I've been struggling with tomcat 5.5 under eclipse webtools for almost 1 or 2 hours:
  • moving jsp around
  • resarting tomcat
  • deleting parts of my workspace
  • deleting the whole workspace
  • recreating projects
and I'm fed up!

Things are not as easy at it seems.

It's like tomcat or eclipse keeps a cache of my jsp somewhere when I move them around!
Suppose I have /welcome.jsp, I move it to /pages/welcome.jsp ... http://.../welcome.jsp is still here ?!

It seems adding a parameter to [workspace]/Servers/Tomcat 5.5 Server @ localhost config/web.xml does the trick:
  • keepgenerated = false
But I not sure and I don't understand why...

6 comments:

Thomas Nicholls said...

Hey mate,

You might want to switch to the resource perspective and check what's in your .deployables directory. It doesn't always get cleaned correctly. It's often a good idea to do a "clean" on the project since that should re-generate the .deployables directory.

a+

Benjamin Francisoud said...

I think I did a clean (amongst other things...) I even deleted the .deployables directly from the file system! Those f...ing pages keeped coming up!!

Thomas Nicholls said...

If you want to do a complete clean there's more to do :) A complete clean involves deleting the contents of the .deployables and the cache of your tomcat server. If you're using the tomcat test environment in eclipse you have to find the tomcat under plugins. Go to the server configuration and find the url for the tomcat directory it uses. When in there, delete the contents of the "work" directory.

Having done that there is no way that anything can be cached. Good luck.

Benjamin Francisoud said...

You must be talking of
workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost
;)
I found this one too! I deleted it...
I deleted .metadata and at the end I even deleted the whole workspace and recreated all my projects!

Anyway now it seems to work :) (actually I don't move jsp around too much now)

Thomas Nicholls said...

Well if you have deleted the tomcat cache and the .deployables directory and it still doesn't register your changes, then the problem must be caused by aliens.

Anonymous said...

You should try NetBeans IDE 4.1 or the 5.0 early access release. Tomcat is integrated with IDE.

Here's a couple URLs for tutorials and you can also check out Help | Java BluePrints Solutions Catalog in the IDE too. The Java BluePrints Solutions Catalog is also integrated.

Here's some URLs for tutorials:
http://www.netbeans.org/kb/41/quickstart-webapps.html
http://www.netbeans.org/kb/41/tutorial-midnight.html

And, directly from the NetBeans IDE Field Guide book, a draft chapter on developing web apps with NetBeans IDE and Tomcat: http://www.netbeans.org/files/documents/40/70/Chapter6-WebApps-Tomcat.pdf