How can i avoid restarting tomcat server when servlet is modified?

please advice me that how can i avoid restarting the tomcat server, whenever a servlet file is modified in my application. is their any way ?

No probs. Here's how I do things...
1. Install tomcat as normal (e.g. I install to C:\Apps\jakarta-tomcat-5.5.4)
2. Create a webapps directory in your eclipse project with the following directory structure
MyEclipseProject
   - src
   - conf
   - webapps
      - MyApplication
         - META-INF
         - WEB-INF
            - classes
            - lib
            - pages3. Set the project's output folder (e.g. bin folder) to webapps/MyApplication/WEB-INF/classes
4. Put all your jar files in the lib directory
5. Put JSPs / HTML in the pages directory (you may also want to create additional directories for TLDs, config files etc)
6. Ensure your web.xml is in the WEB-INF directory
7. Although it isn't essential I create a context.xml file and store it in META-INF, e.g.
<Context reloadable="true">
    <!-- Default set of monitored resources -->
     <WatchedResource>WEB-INF/web.xml</WatchedResource>
     <WatchedResource>WEB-INF/conf/struts/struts-config.xml</WatchedResource>
     <WatchedResource>WEB-INF/conf/struts/tiles-defs.xml</WatchedResource>
     <WatchedResource>WEB-INF/conf/struts/validation.xml</WatchedResource>     
</Context>I use this to set monitored resources that will trigger an automatic appliation reload and to configure JAAS (not shown). See the Tomcat documentation for additional information.
8. In the 'conf' directory I create a server.xml file used to configure Tomcat (you can copy the one from your <TOMCAT_HOME>/conf/server.xml).
After copying the file change appBase attribute in the host element to be the full path to the webapps directory. You can also change the HTTP and HTTPS ports if you wish
9. Download and install the Tomcat Launcher plugin from Sysdeo.
10. In Eclipse's Preferences menu you will see a new entry for Tomcat. Click this then
a. Set your Tomcat Version
b. Set your Tomcat Home
c. Set "Context declaration mode" to server.xml
d. Set the configuration file to the full path to your server.xml file created in step 8
On the "Advanced " sub page select all relevant projects to add to the Tomcat classpath
On the "JVM Settings" page add all the jars in your WEB-INF lib directory to the class path
On the "Source Path" page select all relevant projects
Now if you start Tomcat using the Tomcat icon, you will be able to remote debug your application. If you change web.xml (or any other file in your context.xml watched resources) it will automatically reload. Any changes to JSPs will automatically be picked up (providing your tell your browser not to use the page in cache - e.g. CTRL+F5 in IE)
There are some limitations that I'm still working on however. Primarily that I haven't included the Tomcat Manager application in my webapps directory, so Sysdeo cannot perform a reload. This means that if I change a source file, and eclipse auotmatically rebuilds, Tomcat doesn't pick up the change unless I either change a watched resource file (e.g. web.xml) or stop and restart Tomcat.
There's no reason why this can't be fixed, I just haven't got round to it yet.
I'm sure there are lots of other (probably better) ways of achieving the same thing. This was the first method I tried and it worked, so I stuck with it. I'm not a Tomcat config guru and I'm sure other forum users could provide some improvements should they wish.
Post if you get into trouble, however I won't be able to respond until next week.
Cheers,
Steve

Similar Messages

  • How can I avoid re starting weblogic when servlets change

    Hello all,
    I always re start weblogic server 6.1 upon any changes to class files or servlets. does any one know of any configuration settings to avoid a re start when ever my servlets or class files change ? I deployed the application in exploded format and not in .war file format.
    thanks much
    Srik.

    Hi,
    if your question is: how can I update changes in my WebApp without having to restart my Weblogic server, then I have a hint:
    Maybe your server is running in productive mode. Try setting it to developement mode (edit the 'startWeblogic.cmd', find the line 'set STARTMODE=true' and change it to 'set STARTMODE=false').
    After this change the server needn't be restarted to make changes take effect.
    Hope this helps.
    Thomas.

  • How can I avoid a full scan when ...

    Hello
    How can I avoid a full scan with I apply the aggregate function "MIN"
    SQL> select min(c1) from hh;
       MIN(C1)
             1
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE
       1    0   SORT (AGGREGATE)
       2    1     TABLE ACCESS (FULL) OF 'HH'Regards
    James King

    The table 'hh' does not have statistics. Assuming that there is an index on the column c1, statistics are computed on the table and its indexes, you may see a
    INDEX (FULL SCAN (MIN/MAX)) of the index on column 'c1'.

  • How can I avoid music playback stopping when starting an App

    Whenever I listen to music on my iPAD3 and switch from the build in original musicplayer to any App, the music stops to play.
    I need to go to the taskbar and go to the very left to press the play button again.
    That helps me to use the App choosen before and listen to the music.
    If I open another App or switch there with "sideswapping", music stops again.
    How can I avoid this ?

    Revit must be using the discrete graphics and possibly a fair amount of cpu as well.  This has nothing to do with memory or memory allocation (which you can't do on a mac since it doesn't use shared memory like some low-end PCs do.  Getting hot is not a problem as long as the fans speed up to increase the cooling.  If the system is overheating, it will shut down on its own.

  • How can I debug a tomcat server from JSC (ea2)

    I am attempting to use JSC (ea2) for my development but cannot get the enviroment right in SunAppServer8 for some "custom JNDI resources". Is there anyway I can get JSC to connect to a (running) tomcat server for debugging?

    Hi,
    Please post messages related to Creator 2 EA at the feedbacks programs portal. The URL is:
    https://feedbackprograms.sun.com/login.html
    Thanks,
    RK.

  • How can I avoid video quality loss when burning Canon FS100 footage to DVD?

    When I put the footage onto iMovie it looked great, and then I sent it to iDVD to burn onto a disc. After I burned it to a DVD and watched it on my DVD player, I noticed that I lost a lot of the video quality (or at least it seemed). It looks a little fuzzy and seems like it could be much better considering how great it looks in iMovie. Is it just me or does sending it to iDVD make me lose video quality? What is another alternative so I don't lose the quality? I've heard that Wondershare is a good option and that you won't lose any quality burning it from there, is that true? What is my best alternative? A relatively expensive DVD burner? Thanks, any help is appreciated.

    A good suggestion was made before me, but I have another twist on the matter.
    From Wikipedia on DVD: "Although many resolutions and formats are supported, most consumer DVD Video discs use either 4:3 or anamorphic 16:9 aspect ratio MPEG-2 video, stored at a resolution of 720×480 (NTSC) or 720×576 (PAL) at 29.97, 25, or 23.976 FPS."
    Notice that the resolution for a DVD is roughly 700x500, which when multiplied gives you 350,000 pixels per frame. Now compare that with the video resolution of the FS100, which I see on web pages (eg, on dabs.com) is 710,000 pixels per frame.
    This means your camera records more quality than can fit on a DVD. Approximately twice as much information. This means half the information is lost during the conversion. That's why you notice a drop in quality. If you burned to a BluRay disk, you'd probably lose nothing, since they store more information per frame. So your alternative is to buy a BluRay burner and play it back on a BluRay drive.
    Another alternative is to burn it to a DVD but not in a form that's playable by a DVD, just in a form thats readable and playable by a computer. You will lose no information that way, but it will be playable only in a computer.

  • How can I avoid the blank mainFrame when frameset first opens

    I am making up framesets to accomodate over 130 pages. When the frameset first opens, the right hand side, the mainFrame, is blank until you click the image on the left frame. Is there any way to avoid this and have content show in the mainFrame when the frameset starts up. Url is:
    http://nvvam.org/ourartists/left_right_frameset.html

    Why on Earth are you using FRAMES???!  You don't need them.  They only complicate your site by making it almost impossible for people to bookmark and print pages.  HTML 5.0 no longer supports Framesets and here are a dozen other reasons to avoid FRAMES.
    http://apptools.com/rants/framesevil.php
    Alternatives to FRAMED sites:
    Guidance  on when to use DW Templates, Library Items and SSIs -
    http://www.adobe.com/devnet/dreamweaver/articles/ssi_lbi_template.html
    More  on DWTemplates and SSIs:
    http://www.smartwebby.com/web_site_design/dreamweaver_template.asp
    http://www.smartwebby.com/web_site_design/server_side_includes.asp
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • How can I avoid a pop-up when I'm going from an email to the email list?

    I use Mozilla firefox to go online. When I've opened an email I've received and then want to return from that email to the email list, I click "backspace." Half the time, it gets me back to the email list. The other half the time, a window pops up, saying:
    "To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier" and I have to choose to cancel or resend. I always click resend. I don't want this window to pop-up. When I read an email and then hit the backspace key, I just want to get back to the email list.
    Can you help? Thanks, Alvin Glazerman

    Don't use backspace to go back to that page. Either open the link in a new tab with a middle-click and close that tab to go back or click a link to go back to the inbox if there is such a link on that page.

  • How can i avoid printing full pages?

    How can I avoid printing full pages when printing a photo from my iphone to my hp envy?

    Hi,
    While pritning with Apple Airprint, the image will print as is..
    You may find some more customization steps by using the HP Print Home & Biz app which allow some more customization of the printout:
    Follow the steps below to find how to get the app:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02775166&cc=us&dlc=en&lc=en&product=3692888&tmp...
    Below you may find some more customization options of the app:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01930282&cc=us&dlc=en&lc=en&product=3692888&tmp...
    Regards,
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • How can I avoid bit stuff?

    ---- card=pci-can/2---
    how can I avoid bit stuff?
    when i am using ncgetattr.vi,the return value of series2 error/arb captue is 10100010.
    Then how can i resolve the problem!
    thanks.
    Work hard and enjoy life.
    Love CVI and Labview!
    Certified Labview Developer

    Hi 侠客
    The Series2 error/arb capture register indicates where the last error happened. In this case, the bit stuffing rules (not more then five consecutive bits of the same state) where violated. Typical causes are:
    Baudrate mismatch (most likely no commmunication at all possible)
    Improper termination (please see chapter 4 of the NI-CAN Hardware and Software Manual for more information)
    Wirering schema not compliant with the CAN specification (ISO 11898), e.g. stub/drop length too long, star-type setup instead of a chained setup 
    -B2k

  • How can i avoide outside sound and noise recording video

    how can i avoide recording outside sound when recording video through adobe screen capture

    Hello and welcome to the forum,
    Try to use a good microphon, and if possible place it in a 'sound booth', that you can buy or find work flows to create one yourself.
    Lilybiri

  • When I create an email signature, the text I type is repeated twice in the actual email sent (above and below a line).  How can I avoid this?

    When I create an email signature, the text I type is repeated twice in the actual email sent (above and below a line).  How can I avoid this?

    Try validating your installed fonts and fixing any errors that show up. To do this see this article: http://reviews.cnet.com/8301-13727_7-20085570-263/safari-in-os-x-lion-replacing- text-with-block-a-characters/

  • How can I avoid running rmiregistry when launch an RMI based application

    Hi,
    How can I avoid running rmiregistry when launch an RMI based application?
    Will invocation of LocalRegistry.createRegistry() do?
    Thanks a lot!
    Regards,
    Justine

    yes it will do...better try it out
    good luck

  • How can I avoid browser timeout when starting a Plsql procedure from Apex?

    I start a procedure when pressing a button in my Application Express form.
    This procedure take a while to run (about 10 min.)
    How can I avoid the browser to timeout with Error Code 1460: Timeout ?
    Is it possible to return to a page and let the procedure finish in the background. Or is it possible to get the Apex application sendig a message once in a while to keep the browser active?
    Thanks in advance.
    Evelyn

    In HTML DB 1.6, you could create page processes that would run as background jobs.
    Since 2.0, you can't directly select that option, but there's a work-around that may still work:
    Re: PLSQL DBMS JOB - Process Type

  • How can I specify SMTP Email Server userID and password when using Email VIs?

    How can I specify SMTP Email Server userID and password when using Email VIs included in Internet Toolkit?

    Hi,
    A similar question was posted on Discussion Forums soem time back. Please see the link below.
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000C7B00000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
    You would find the last post in the above thread quite useful where it has a link to OpenG code. I am also copying that link for your reference.
    http://www.openg.org/tiki/tiki-index.php?page=OpenG+Internet+Connectivity+Tools
    Please feel free to respond to this post with any questions/comments you may have.
    Regards,
    Ankita A.
    National Instruments

Maybe you are looking for