facebook

Reloading JSP pages on Tomcat 5.18 with RC3.7

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #202428 Reply

    Lasse
    Member

    I am sure this is trivial. It worked for me before.

    Suddenly when I deploy code to tomcat my JSP page is not reloaded after I change it. (trivial changes like adding a char).

    Reloading in the manager app doesn’t work either.

    Reploy while tomcat is running doesn’t solve it. Neither does a stop+start of tomcat.

    The only thing that cures it is Stop, Redeploy, Start.
    That gets kinda tedious in the long run 🙂

    I just installed 5.18 in a new directory and deployed into that, but same problem.

    What to do ?

    #202429 Reply

    Lasse
    Member

    Ok, to just tested again. Redeploy from eclipse works.

    I can see that the deployed jsp in tomcat does not sync with the one i have in eclipse (size doesn’t change).

    #202431 Reply

    Lasse
    Member

    More things are strange .. my classes are not always compiled when i hit ctrl+s.
    I’ll try to reinstall eclipse and see what that does for me.

    #202432 Reply

    Lasse
    Member

    Whatever it was reinstalling eclipse and myeclipse fixed it.

    #202433 Reply

    Riyad Kalla
    Member

    Lasse,
    As far as the not recompiling, I had this turn off on me once and couldn’t figure out what it was, it is here if it happens again:
    Windows->Preferences->Workbench->Perform build automatically on resource modification

    Also load up the administrator Tomcat application, login and make sure your webapp has “Reloadable” turned on. The sync time is around 15 seconds, but I have seen on plenty occasions that Tomcat won’t notice or reload my newer files. If you want to avoid deployment all together and this is all on a dev machine, you can edit the web app’s context (From the administrator) and set the docbase to the “webroot” of your project that is in eclipse… so something like “C:\Projects\Java\MyApp\webroot”. This will have tomcat launch directly from your dev folder, so no deploy necessary. The usefulness of this really depends on what kind of developer you are, but this works for me.

    #202434 Reply

    Ivar Vasara
    Member

    @support-rkalla wrote:

    Lasse,
    If you want to avoid deployment all together and this is all on a dev machine, you can edit the web app’s context (From the administrator) and set the docbase to the “webroot” of your project that is in eclipse… so something like “C:\Projects\Java\MyApp\webroot”. This will have tomcat launch directly from your dev folder, so no deploy necessary. The usefulness of this really depends on what kind of developer you are, but this works for me.

    This sounds cool, but begs a few questions..
    1) do you explicitly state that your compiled classes go to WebRoot/WEB-INF/classes ?
    2) can you still use myeclipse to start/stop tomcat ?
    3) Remote debugging still functions as usual ?

    #202442 Reply

    Riyad Kalla
    Member

    If you are asking me these questions abuot this setup, yes all of it works and you leave/dev your app like its an exploded war. So basicaly the only thing you are skipping is the deployment step, just launch the app server.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Reloading JSP pages on Tomcat 5.18 with RC3.7

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