How to shutdown Tomcat completely?

I am having a problem in shutting down Tomcat completely.
My OS is Windows 2000. I am installed Tomcat 4.0 and JDK 1.3.1.
I thought I shutted down Tomcat (because Tomcat window dissapeared after I typed "shutdown"), but the next time I started it, I got the following message:
Catalina.start: LifecycleException: Error creating server socket: java.net.Bin
dException: Address in use: JVM_Bind
LifecycleException: Error creating server socket: java.net.BindException: Address in use: JVM_Bind
at org.apache.catalina.connector.warp.WarpConnector.initialize(WarpConnector.java:482)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:454)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:552)
at org.apache.catalina.startup.Catalina.start(Catalina.java:775)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)
----- Root Cause -----
java.net.BindException: Address in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:405)
at java.net.ServerSocket.<init>(ServerSocket.java:170)
at java.net.ServerSocket.<init>(ServerSocket.java:121)
at org.apache.catalina.net.DefaultServerSocketFactory.createSocket(Defau
ltServerSocketFactory.java:118)
at org.apache.catalina.connector.warp.WarpConnector.initialize(WarpConnector.java:476)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:454)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:552)
at org.apache.catalina.startup.Catalina.start(Catalina.java:775)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)
Because of this, I can only run a servlet for once. If I make any changes to the servlet and try to run the changed one, I always get the old results.
I checked the Program/Processes, tomcat.exe is still in the process list after I "shutdown" Tomcat, and I couldn't end this process.
Can anyone tell me what I did wrong or what I can do to fix the problem? Thanks a lot.

Firstly you are probably running Tomcat as a service. From the Start menu, select run and then type service.msc. In the list you will see Apache Tomcat, and an option to stop and start it. When it is started as a service, the batch script wont shut it down.
If you then use the startup script to start it, the shutdown will work. Or you can just keep starting and stopping it as a service.
Secondly, you shouldn't have to restart the server just because you updated a class file. I have noticed (and I don't know why) that sometimes when I update the classfile and then refresh the button in the browser, I do not see the changes. What I do (depending on the situation) is...
Change the value of the paramter passed to the servlet (if any)
or
Close and restart internet explorer
or
execute another servlet and then reexecute the one you have changed.
Hope that helps
Andrew

Similar Messages

  • How to connect Tomcat

    Hello everybody
    I make an JSP based application. Is it possible to run Tomcat and deploy the war when I load the principal page? If yes, how? and shutdown tomcat when i leave?
    thank you very much

    Hello everybody
    I make an JSP based application. Is it possible to run Tomcat and deploy the war when I load the principal page? If yes, how? and shutdown tomcat when i leave?
    thank you very much

  • Error when shutdown tomcat

    hi,
    i get the below error when i try to shutdown tomcat 5.5.27
    initially before i install tomcat and sun DS 6.3 on solaris 10,when i was trying to restart the system,i see tomcat not started so i tried to restart i get the below error
    #./shutdown.sh
    Using CATALINA_BASE: /export/sasi/tomcat/apache-tomcat-5.5.27
    Using CATALINA_HOME: /export/sasi/tomcat/apache-tomcat-5.5.27
    Using CATALINA_TMPDIR: /export/sasi/tomcat/apache-tomcat-5.5.27/temp
    Using JRE_HOME: /usr/jdk/instances/jdk1.5.0
    Jul 14, 2009 1:45:39 PM org.apache.catalina.startup.Catalina stopServer
    SEVERE: Catalina.stop:
    java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:520)
    at java.net.Socket.connect(Socket.java:470)
    at java.net.Socket.<init>(Socket.java:367)
    at java.net.Socket.<init>(Socket.java:180)
    at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435)

    yes specified http://localhost:8080 and tried a few other ports by changing server.xml.
    I've placed .gifs in a directory and tried to view them by typing out the url but still nothing.
    got a feeling it's something with the classpath.. how can i check when it seems to be running ok on it's own?
    I have IIS but i've stopped it running. and also i've got another web app called Zope but that's also not running.
    cheers

  • How to shutdown db throgh dos prompt

    Dear All
    Please tell me complete process of how to shutdown database oracle9i through dos prompt
    With Regards
    Husnain

    Microsoft Windows 2000 [Version 5.00.2195]
    (C) Copyright 1985-2000 Microsoft Corp.
    C:\Documents and Settings\raja.baskar>sqlplus
    SQL*Plus: Release 9.2.0.8.0 - Production on Wed Jun 25 15:10:28 2008
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Enter user-name: sys@test as sysdba
    Enter password:
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.8.0 - Production
    SQL> shut immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL>
    Regards
    RajaBaskar

  • How to set delivery complete in scheduling agreement automatically

    Hi. I would like to request for help on how to flag delivery complete in an scheduling agreement?
    When creating a goods receipt against a scheduling agreement, do we need a user-exit  or how is it configured in order to check the quantity receivedthe quantity in the goods receipt and compare it with the quantity in the scheduling agreement (/- de tolerance) and, in case the full ordered quantity has been received, set the flag Delivery completed in the scheduling agreement.
    Thanks.

    Hi,
    We regret that the functionality  setting of "delivery completed"       
    indicator automatically for a scheduling agreement is not included in   
    the SAP standard system.                                                
    For scheduling agreements, you must maintain the final delivery              
    indicator only in the scheduling agreement item.                             
    A maintenance from the goods receipt is useless for scheduling               
    agreements since the current schedule line situation is generally not        
    final. Even if all schedule lines are supplied, this does not mean that      
    no new schedule line might be added. Therefore, for scheduling               
    agreements,maintenance of final delivery indicator is planned only from      
    the document item.                                                                               
    Regards,
    Edit

  • How to delete the complete contents of database table ? should be empty !!

    Hi Guys,
    I have requirement where i have delete the contents of database table..i have make it empty (no records at all) and then i have to fill it with the records from the excel sheet.
    I can upload data from the excel sheet.
    Please tell me how to delete the complete contents of the database table ??
    Regards
    Rahul

    hi ,
    just write like this,
    delete from <database table>.
    commit work.
    sample code, here edpar is database table.
    delete from edpar." FROM TABLE g_tab_delete.
      call function 'DB_COMMIT'.
      loop at g_tab_edpar into g_wa_edpar.
        insert into edpar values g_wa_edpar.
        if sy-subrc  eq 0.
          move-corresponding g_wa_edpar to g_wa_edpar1.
          append g_wa_edpar1 to g_tab_edpar1.
        else.
          move-corresponding g_wa_edpar to g_wa_edpar2.
          append g_wa_edpar2 to g_tab_edpar2.
        endif.
      endloop.
    that's all it works.
    reward points if helpful.
    regards,
    seshu.

  • How to read the complete path in file upload UI

    Hi,
    I want to know how to read the complete path in file upload UI in java web dynpro.
    I have created 1 file upload UI and than when i do browse and select some file say small.jpg from my local PC, desktop , its path is coming in file upload UI like E:\small.jpg,
    I want to know how to get this path in java webdynpro code.
    please let me know..

    Hi Satyam,
    In webdynpro java, first file stores in server location then it reads from server.
    Create a button with upload and write this code OnAction
    Resource is the attribute name in context of type com.sap.ide.webdynpro.uielementdefinitions.Resource, this attribute is for Resource property for Upload UI Element.
    Then in OnAction of button
    InputStream text = null;
           int temp=0;
           try{
                File file = new File(wdContext.currentContextElement().getResource().getResourceName().toString());
               String path = file.getAbsolutePath();
                wdComponentAPI.getMessageManager().reportSuccess(path);
           }catch(Exception e){
                e.printStackTrace();
        //@@end
    Regards,
    Pradeep
    Edited by: pradeep_546 on May 11, 2011 12:22 PM

  • How to Embbed Tomcat in Java Application

    Hi
    At the moment i have the basic setup of applicatoin like this
    first i run the file "Tomcat.bat" that start the tomcat server, in a specific directory and also the webservice is enabled.
    Secondly then i run the Program.java that uses the web service started in the first step.
    However, now i want to start the webservice (Apache Tomcat) from with in the Java Application. So that whenever, i need to i can start it. I also need the control over ports, so as to which port should the tomcat run on...
    So at the end of the my simple question is how to run tomcat from with in a java application. At the moment i can not use the Runtime.exec() since this is a real time application and using Runtime.exec() causes some problems over the locking of threads...
    Any Help would be greatly appreciated.
    Thanks for looking.

    i looked at the my catalina.sh script file and see that java runs "org.apache.catalina.startup.Bootstrap" class first so that i think by instaitating that class and preparing the parameters that needed will start the tomcats "org.apache.catalina.startup.Bootstrap" class and that class will load all the needed parts and start serving request.
    and how to change starting port ? i thought that you can generate the server.xml on fly and after creating that file you can start tomcat.
    these are my opinion but i think these are true,i have no time to try this if i can i will write here.or if somebody can try write here.

  • Adobe Acrobat 8 how to delete it completely?

    I have to deactviate Adobe CS3 from my old computer to reinstal into my new computer. Now I have a problem downloading Adobe Reader on my old computer as Adobe Acrobat is still there after I delete the Adobe CS3. Can someone show me how to remove Acrobat completely so I can install Reader?

    Download and run the Microsoft installer cleanup utility and get rid of the old program then install the new one.

  • How do i read complete line from a text file in j2me?????

    how do i read complete line from a text file in j2me????? I wanna read file line by line not char by char..Even i tried with readUTF of datainputstream to read word by word but i got UTFDataFormatException.. Please solve my problem.. Thanks in advance..

    That is not my problem . i already read it char by char.. i am getting complete line..But this process is taking to much time..So thats why i directly wanna read complete line or word to save time..

  • How to make a completely transparent button in Flash Builder

    I am making a mobile application, and I am wondering how to make a completely transparent button. I've tried using
    <s:Button x="-5" y="0" width="410" height="1504"
                                    skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Sun)"/>
    But it still has one line on the side. I need a way to make it completely transparent.
    Thanks,
         8th grade student

    Try this alpha="0.001"
    Also add useHandCursor="true" and buttonMode="true" if you wish to have the hand cursor appear on hover.
    example  x="10" y="10" width="169" height="54" label="Button" alpha="0.001" useHandCursor="true" buttonMode="true" 
    HTH

  • How could force tomcat to stop and start on every build on Ide?

    How could force tomcat to stop and start on every build on Ide?

    Hello,
    See this help article:
    *[https://support.mozilla.org/en-US/kb/How%20to%20set%20the%20home%20page How to set the home page]
    Or try go to about:config page, search for "browser.startup.homepage" change its value to "about:home"(default) or "about:blank"(blank page)
    *[http://kb.mozillazine.org/About:config about:config]

  • How to shutdown and start agent in ODI 11g in Linux Environment

    Hi Experts,
    Pls any one can help me on "How to shutdown and start agent in ODI 11g in Linux Environment" and where can I find Agent.sh and Agentshutdown.sh files location in ODI 11g and parallely how can I find Odiparameter.sh file location
    Thanks in Advance
    Regards
    Phani

    Phani ,
    Go to your <ODI_11g_HOME>/oracledi/agent/bin
    and you will find agent.sh , agent_<standalone_agent>.sh and odiparams.sh and other agent files.
    Step 1. Update your odiparams.sh
    Step 2. Create the Physical and Logical Agent int your Topology using the same port_number and name provide while creating the Stand alone agent during installation ( or) create accordingly the agent in Topology with name and port number as required and make the modification in agent_<stand_alone>.sh file
    Step 3. After doing so start your agent_<stand_alone>.sh
    Step 4. Repeat the process 2-3 for any number of stand alone agent created on different ports and steps 1 to 3 for different Work repository
    Thanks
    Dev

  • How to delete a completed workitem logically or completely

    Hi buddys,
    Any one kindly help me how to delete a completed leave request work item completely or logically.
    For example: An employee has allpied for leave and that has been apoproved by his/her manager and the same has been updated in the backend.  Now the workitem status is completed. Now I need to delete the completed workitem either completely or logically.
    I went to SWia and gave the workitem number and followed the procudere, but it is not happening.
    Any one tell me how to delete this workitem
    Regards
    Siri

    Try through T.code SBWP.

  • Anyone figured out how to run iCal completely invisible?

    Has anyone figured out how to run iCal completely invisible on Snow Leopard -- not just minimized on the dock, but completely hidden.  The goal is to be able to press Comamnd+Tab and NOT see iCal.

    I too have a KRZR K1M that I received two days ago as a "gift' from Verizon in exchange for renewing my contract for 2 years. I had a RAZR that I had been able to sync with iCal after I edited the metaclass.plist file for that phone. I would then have to delete and re-add the RAZR each time I resynched in order to select the option I wanted from the iSync dialog window. If I "merge[d] data," the calendars on both my mac and my phone would fill quickly with duplicate entries. As for the KRZR, i have tried several times to add and sync this phone to the mac. It worked only once, and I was able to get the mac to write a years worth of events into the phone, but no matter what i do, i have not been able to repeat the process for my ical events. I use the VZW backup assistant for my contacts, just to be safe. I would like very much for Verizon and Apple to get together on the iSync issue. Verizon tech support told me only moments ago that the only phone they offer that will sunc with iCal is either a Treo or a Blackberry. And they aren't handing out either of them for free any time soon.

Maybe you are looking for

  • How to delete the articles from MVKE table.

    hi all, i want to remove articles from MVKE table. but at that time artciles articles are not removal from other table. how to set deletion flag on sales organisation level. we want to set deletion flag on sales organisation level. but at that time i

  • Sales tax Diferential adjustments in credit/debit memo instead of F-02

    Dear All While creating Sales order we have maintained sales tax percentage instead of 4% we haved maintained 12%. and delivery and billin also been done. after all FI posting to AR we came to know that we have maintained sales tax % wrongly, Now we

  • Problem in creating selection screen from screen painter

    hi ,       i am working with screens i have created a screen and in that wehn i click report button it has to ask for select options for dates.from there i will write a select quesry based on selection dates ...how to call a selection screen from scr

  • Code Check To Swap Customer Numbers

    Hi All This is the code i have to swap a customer number to another here it is,   IF COMM_STRUCTURE-CUSTOMER CO '0012345'.     CONCATENATE '0067891'   COMM_STRUCTURE-CUSTOMER INTO RESULT.   ELSE.   RESULT = COMM_STRUCTURE-CUSTOMER.   ENDIF.   RETURNC

  • Order by clause performance

    I have two tables table A (with 26 columns most of them varchar2) with 1.2 million records and table 2 with 30 records. I am doing a join and then ordering the result set. I have two set of queries one takes 164 seconds and the other 1.2 seconds. I a