tags:

views:

127

answers:

4

Hi, Im new to Eclipse. I use Tomcat as my run time server, but every time I modified the jsp pages, Eclipse was still displaying the older one. Just wondering how to redeploy the application so the changes can be reflected.

Eclipse: Eclipse IDE for Java EE Developers 1.2.1.20090918-0703

Tomcat: Tomcat 6.0

Thanks

A: 

Eclipse should do that automatically for you. Otherwise, on the Servers view (Menu Window->Show View->Servers), you can right click on your Tomcat instance and hit "Publish" or "Restart"

Make sure you have the "JST Server Adapters" ("Web, XML and Java EE Development category") feature installed.

Alexandre Pauzies
A: 

Get the Tomcat plugin. It was nice because you can install Tomcat on your system and then associate your web app with that instance of Tomcat. The plugin will let you stop/start Tomcat and define a server such that when you do a build it knows how to deploy the changes. There may be some newer plugin but the Tomcat plugin worked for me and was fairly simple to install and use. Here is a page from IBM on using Eclipse and Tomcat. Inside that page it points you to the following: http://www.ibm.com/developerworks/opensource/library/os-eclipse-tomcat/

Kelly French
isn't it a bit obsolete?
Bozho
That's already builtin. He's using Eclipse for Java **EE**.
BalusC
Well, the tomcat plugin is something different from the Servers view. The tomcat plugin is another thing, which has some issues. But it's not built-in. You shouldn't have downvoted for this..
Bozho
It may be old but it was easy to install and worked well. I don't think the Tomcat plugin comes with Eclipse unless one of those bundles included it but that would be a recent development.
Kelly French
A: 

Doubleclick the server instance in question in the Servers view to open its configuration. Now, in the right top you should see a section called Publishing. Open it to verify and configure autopublishing settings.

BalusC
A: 

Eclipse's publishing functionality requries the project to be a "web project", and in some cases requires additional configurations.

  1. Go to Windows > Preferences > Server > Runtime environments and add your tomcat
  2. Either try using publishing, or (better I think) use the FileSync plugin. There you can tell which folders from your project should be copied (live) to what directory on your machine (the tomcat/webapps/yourapp). With a little more effort the filesync configuration can be made machine independent (only using one parameter as TOMCAT_ROOT), in case you want to check-in the project to a repository where others will use it.
Bozho