facebook

Deploy on Tomcat 5.5 without stopping it? [Closed]

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #227159 Reply

    yunkipaik
    Member

    Eclipse 3.1M4
    MyEclipse Version: 3.8.3
    Build id: 200412061200-3.8.3
    Tomcat 5.5

    How can I deploy an exploded webapp without stopping Tomcat?
    The deployment setting in preference is set to default.
    Following some minor changes in a JSP file, I find myself having to stop
    Tomcat first, deploy, then restart. It is time-cosuming.
    Deploying without stopping the server always fails, complaining locked jars like struts.jar or jstl.jar.

    Your advice will be very much appreciated.
    Thank you.
    Yunki

    #227174 Reply

    Riyad Kalla
    Member

    Eclipse 3.1M4
    MyEclipse Version: 3.8.3
    Build id: 200412061200-3.8.3
    Tomcat 5.5

    These versions are not compatible with eachother. If you need to use Eclipse 3.1M4 then you need to download MyEclipse 3.8.4 BETA.

    #227194 Reply

    @yunkipaik wrote:

    How can I deploy an exploded webapp without stopping Tomcat?
    Deploying without stopping the server always fails, complaining locked jars like struts.jar or jstl.jar.

    I get this problem as well running Tomcat on Windows XP.
    Using Tomcat on Linux I don’t have this problem.

    guus

    #227206 Reply

    Riyad Kalla
    Member

    Guus,
    That is a problem with the OS and file locks. This is not a bug, it is just the difference between how Windows’s filesystem and Linux’s filesytem(s) work. In windows if any readers exist on a file, then it cannot be deleted (Written), on Linux the operations are queued until a later time, so you can have multiple readers and then erase a file, and it will be erased after all readers close the file, that is why you don’t see the file lock problem on Linux.

    Please note, that Hot sync capabilities exist to get around the need for this on any platform. Just use an exploded deployment and AS you change the files in your project and save them (as long as you have Automatic building turned on) the changed files will be copied out to your app server for you, no need to open up the deployment tool and hit deploy each time.

    #227217 Reply

    I had the same problem.

    What I did is to stop the web-app from the tomcat Manager. Re-deploy the web-app and then start again the web-app. All this without stoping tomcat.

    If you want a 1-click solution for this; you can create a couple of shortcuts/bookmarks that point to the full URL of the start and stop of the web-app.

    For example:
    [to stop] http://127.0.0.1:8080/manager/html/stop?path=/<you-web-app&gt;
    [to start] http://127.0.0.1:8080/manager/html/start?path=/<you-web-app&gt;

    The Tomcat Manager was Introduced in Tomcat 5; Im Using 5.0 then 5.5 should have it.

    Saludos

    #227293 Reply

    yunkipaik
    Member

    @support-rkalla wrote:

    Guus,
    Please note, that Hot sync capabilities exist to get around the need for this on any platform. Just use an exploded deployment and AS you change the files in your project and save them (as long as you have Automatic building turned on) the changed files will be copied out to your app server for you, no need to open up the deployment tool and hit deploy each time.

    I am using Tomcat 5.5 on Windows XP, and my project’s workspace is
    not the same as the Tomcat’s deployment directory.

    To take advantage of the Hot sync feature, is there another way other than:

    1. Use the Tomcat’s deployment area for hosting the web project, or
    2. Write an ant script to copy the files to the deployment area?

    Thank you.

    Yunki

    #227294 Reply

    Riyad Kalla
    Member

    and my project’s workspace is
    not the same as the Tomcat’s deployment directory.

    It shouldn’t be, did you think I was suggesting it should be?

    To take advantage of the Hot sync feature, is there another way other than:

    1. Use the Tomcat’s deployment area for hosting the web project, or
    2. Write an ant script to copy the files to the deployment area?

    Yunki, to take advantage of the Hot sync feature you do exactly what I said above, which is definately not #1 or #2. I will restate it:

    1) You must be running your app server in debug mode, double check your connector settings under Windows > Preferences > MyEclipse > Application Servers > Tomcat 5 > Launch
    2) You must be using an exploded deployment: Open the deployment tool and make sure you are using an Exploded, NOT a packaged, deployment.
    3) You must have automatic building turned on under the Project menu

    As long as you have the three things above, you implicitly get hot syncing of changed files. Just work on your project and as you save the files, they are immediately copied out to your app server.

    #227305 Reply

    yunkipaik
    Member

    Riyad,

    Thanks for the detailed explanation.
    It works as you say.

    Yunki

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Deploy on Tomcat 5.5 without stopping it? [Closed]

You must be logged in to post in the forum log in