How to know whether tomcat server is up or not..?

I have developed a java webstart application.In that,I need to include a component in a frame that shows whether the appplication is connected to the server(tomcat) or not.If it is connected to server,then a green light is up,if not red light is up.It should show the connection status althrough the application.I browsed through the apache documentation of Catalina class, http://tomcat.apache.org/tomcat-4.1-oc/catalina/docs/api/org/apache/catalina/startup/Catalina.html ,thinking that it could help me out.But I couldn't find it useful.So,I need a way to know whether the application is connected to server or not.Is there anyway to do it?Thanks in advance..!

hell2heaven wrote:
Yes I need both first and second case,there exists some server listening on a particular port and he can send some request and get some response from it.Well, the second implies the first, so unless you're interested in "The port is active, but the server isn't running properly," testing the second is sufficient--the first won't provide any additional information.
Here my server is apache tomcat and it is running on port 8085.Actually,what happens in the application is when user inputs data via text field,a connection is opened to the appropriate servlet and object is passed to the servlet through that established connection.then servlet returns another object reporting the result,what happened on the server side.I want user to feel sure that he can send data to the servlet running on tomcat successfully.Am I clear enough now..?
Not really.
And if you're saying, "I want to see if the server is running before the user sends a request," that's pointless. Just send the request. If it succeeds, the server is running. If it fails, the server is not running or is unreachable or had some error. If you test first and it comes back good, the server can still go down between your test and the "real" request.

Similar Messages

  • How to know whether the javascript is disabled or not while loading the jsp

    Hi,
    My query is like how to know whether the javascript is disabled or not while loading the Application main JSP in Mozilla browser.
    I want some Java code or JavaScript code.

    To the point, just let JS fire a specific HTTP request inside the same session.
    This can be done in several ways. 1) Create a hidden <img> element and set the `src` attribute so that it will request a (fake) image from the server. The server just have to intercept on this specific request. 2) Fire an ajaxical request and let the server intercept on it. You can use a Filter for this which sets a token in the session scope to inform that the client has JS enabled.

  • How to know whether the phone is replaced or not?

    Dear All,
    Please help in how to know whether Iphone 5 is replaced or not? I came to know that on replacement, imei number gets changed. please make me aware.

    Nobody here can make you aware.  You need to contact Apple directly.

  • How to know whether my phone is unlocked or not

    how to know whether my iphone is unlocked or not.

    You don't know if you bought an unlocked iphone or not?
    What did you ask for?
    What does your reciept say?

  • How to know whether a file is opened  or not ?

    Hi all,
    How to know whether a file is opened by its editor or not ? File may be any of the type.

    There are platform-dependent commands that tell whether a file (or directory, port etc.) is used by which processes.
    [oracle@izsak ~]$ fuser .
    .:                    9299c
    [oracle@izsak ~]$ ps -p  9299 -f
    UID        PID  PPID  C STIME TTY          TIME CMD
    oracle    9299  9298  0 Apr25 pts/0    00:00:00 -bash
    [oracle@izsak ~]$ ls -l $fn
    -rw-r-----  1 oracle oinstall 111215876 Apr 25 19:05 /opt/oracle/product/AS/10g/R2/opmn/logs/OC4J~ebank~default_island~1
    [oracle@izsak ~]$ fuser $fn
    /opt/oracle/product/AS/10g/R2/opmn/logs/OC4J~ebank~default_island~1:  3746  3747  3748  3749  3750  3751  3752  3753  3754  3755  3756  3758  3761  3762  3765  3767  3769  3770  3771 18638 21605 21743 21744 21745 22140 22143
    [oracle@izsak ~]$ ps -p 3746 -f
    UID        PID  PPID  C STIME TTY          TIME CMD
    oracle    3746 26427  0 Apr23 ?        00:00:01 /opt/oracle/product/AS/10g/R2/jdk/bin/java -server -Djava.security.policy=/opt...

  • How to know whether file is document file or not and page count

    How can i know whether the file is document file
    Eg: File file = new File("test.text"); 
            File file = new File("test.doc"); 
            File file = new File("test.pdf");   etc should return true
    File file = new File("test.exe"); 
           File file = new File("test.dat");  etc should return false
    and if it is true i should get the page count for example if pdf or doc file is containinf 100 pages
    i should get the value 100 is there any way to acheive this in java pls give some idea or example code
    Regards

    To get the number of pages you would need to write or find an existing Java API that can parse the proprietary formats of each type. And some formats do not really have pages. For instance, the number of pages of a .txt (often opened by Notepad by default) file would depend on your page length which is not generally stored in the file it is set by the tool you use to read the file.

  • How to know whether the file is opened or not

    Hi All,
    In the file handling,
    Before writing OPEN DATA SET, I want to know the file is already opened or not.
    Please help me out in this regard.
    Thanks and regards,
    Mallareddy

    Hi,
    Please try GET DATASET statement.
    Syntax:
    GET DATASET dsn.
    Extras:
    1. ... POSITION pos
    2. ... ATTRIBUTES attr
    In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs. For details, see File Interface.
    Effect
    Used to get the properties of a file already open.
    You can use this statement without additions to determine whether the file is open.
    If the file is not open, an exception of the type CX_SY_FILE_OPEN_MODE is triggered.
    Regards,
    Ferry Lianto

  • How to know whether Caps Lock Is On or Not

    Hi
    My application is in Foms 6i and oracle 9i. In logon screen , i want show toltip
    if caps lock is on stating that 'Caps lock is on.'. It should occur at the start of the logon form without entering any data( or after filling Userid an also do)
    How do I implement this.
    Regards,
    Subhash

    Also see
    Find whether the caps lock is on or off

  • How to know whether all Idocs sent perfectly or not to target System

    Hi All,
    We are sending the Material Master Idocs via XI and to WMS File system ( Idoc-XIFile)
    How can a business user confirm that all the sent Idocs are reached to WMS by End of the day.
    Is there any way to match or any report kind of thing for this please
    Regards
    Vamsi

    HI vamsi,
    Following  is the solution that we are using >
    1. There is a separate interface ( file to idoc )that runs at the end of the business day..
    This interface will pick up a file ( from say ur WMS system) and post an idoc STATUS.SYSTAT01
    the file in this case will have the idoc number of the material idoc and the status( say 11 for OK ) and the same will be mapped to idoc.
    This idoc in turn will change the status of the material idoc from 03 to 11 . Then a filter can be made on this to find out which idocs did not reach status 11..
    however here there are chances that this ack interface can go in error as well
    2.  Or u can have a separate interface ( file to Proxy ) ..here the difference would be that single file will have all the idoc numbers that were received during that day and then in the proxy u can write abap code to change the status of those idocs to say status OK
    Edited by: Tarang Shah on Feb 6, 2010 8:05 PM
    Edited by: Tarang Shah on Feb 6, 2010 8:06 PM
    Edited by: Tarang Shah on Feb 6, 2010 8:14 PM

  • How to know whether a connection leak occured in weblogic8.1

    How to Know whether Conenction Leak has Occured or Not ??..Where does the WeblogicServer8.1 print the STACK TRACE if connection Leak has occured ? or does it maintain a LOG FILE , where any entries can be seen................

    To turn on Debug flags add these to the startup scripts.
    -Dweblogic.Debug=weblogic.JDBCConn="true",weblogic.JTAJDBC="true"
    Essentially, you will need to edit the config.xml file (when the server is down) and add the proprty to the ConnectionPool definition:
    http://e-docs.bea.com/wls/docs61/config_xml/mbeans.html
    ConnLeakProfilingEnabled="true"
    Thanks and regards,
    Pazhanikanthan. P

  • How to know whether my system is J2EE compliant or not?

    How to know whether my system is J2EE compliant or not?
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\Administrator>java -version
    java version "1.6.0_16"
    Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
    Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)Is my box J2EE compliant?

    Trust me - I've been developing on an XP box for years and Java 1.6 for a good amount of time. This has been using Tomcat, JBoss, and Glassfish (and I try hard to forget about Oracle OC4J). These are application servers that implement part (Tomcat) or all (the rest) of the J2EE specification.
    Having said that, you'll want at least 2GB of RAM and a hundred or so megabytes of disk space. Less RAM will work but slowly. A reasonable processor (I'd say at least 1.5GHz or above) will speed development.

  • How to know whether balance carry forward has happened or not

    How to know , whether balance carry forward has happened or not for a perticular GL account or for the company code as a whole?

    If the account is a balance sheet account, you can merely look at the beginning balance for the same balance sheet account for the beginning of the next fiscal year FS10N. The beginning balance will equal the previous year's ending balance. Since this does not happen automatically, you will know that carry forward has not been done if a balance sheet account has no beginning balance in the following fiscal year.
    If you are talking about For P&L GL accounts, you can check the acvitity in the retained earnings accounts to make sure that they have been updated for the P&L activity. You can identify the retained earnings account by looking at the master data for the account in the section "P&L statmt acct type" and pulling up the menu to see the actual retained earnings account number.
    You can perform carry foward (GVTR) as many times as you want but normally once it has been ran, any postings to a  previous fiscal year are automatically carried forward to the current year after that initial run.

  • How to know whether my Windows Phone 8.1 App is Associated with the store or not?

    How to know whether my Windows Phone 8.1 App is Associated with the store or not? 
    I have an Windows Phone 8 app already in the store , Now i upgraded it to 8.1 it got upgraded to Windows Phone Silverlight 8.1.
    Now iam trying to use Single Sign on feature on this app but it is showing the error message like
    the App is not Configured correctly i followed the process from  Signing users in to OneDrive
    please guide me how to do this?
    Mohan Rajesh Komatlapalli

    You should post to publish forum.

  • How to know whether a method is thread-safe through the java-doc?

    In some book, it says that SAXParserFactory.newSAXParser() is thread-safe,but in the java-doc,it doesn't say that.
    newSAXParser
    public abstract SAXParser newSAXParser()
    throws ParserConfigurationException,
    SAXExceptionCreates a new instance of a SAXParser using the currently configured factory parameters.
    Returns:
    A new instance of a SAXParser.
    Throws:
    ParserConfigurationException - if a parser cannot be created which satisfies the requested configuration.
    SAXException - for SAX errors.
    I want to know, how to know whether a method is thread-safe?

    System.out is a PrintStream object. None of the methods there use the synchronized modifier, but if you look in the source code, you will find out it is thread-safe, because it will use synchronized blocks whenever it writes some text.
    The source code is in the src.jar file which you can extract.
    I didn't find any comments about that PrintStream is thread-safe in the API.

  • How to know whether the Content Type at Library level is Inheriting Parent Content type or not Using Powershell?

    Hi,
    How to know whether the Content Type at Library level is Inheriting Parent Content type or not using Powershell?
    Is there any property for that? Or Do I need to compare the Content type Id's at Site collection level and Library level?
    Any help would be greatly appreciated.
    Thank you,
    AA.

    Hi Ashok,
    For a content type, there is an attribute called Inherits, the value of this attribute determines whether the content type inherits fields from its parent content type when it is created.
    If Inherits is TRUE, the child content type inherits all fields that are in the parent, including fields that users have added.
    If Inherits is FALSE or absent and the parent content type is a built-in type, the child content type inherits only the fields that were in the parent content type when SharePoint Foundation was
    installed. The child content type does not have any fields that users have added to the parent content type.
    More information, please refer to the link:
    https://msdn.microsoft.com/en-us/library/office/aa544268.aspx?f=255&MSPPError=-2147217396
    Best Regards,
    Wendy
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

Maybe you are looking for

  • Error on Checking/Unchecking "Show"

    I an a designer getting ready to train my client in Contribute CS3. I have considerable experience with optional editable areas in DW templates and training clients in how to make items visible and not visible. However, in my current website I receiv

  • How to stop the running infospoke

    Hi Experts, there is a infospoke is still running so long time, it's incorrect, i'll cancel it as kick off the dependenies, i have no idea to how to stop the running infospoke. Anybody could tell me how to do it. thanks in advance.

  • EA6500 internal DNS

    Hi All, I  upgraded from a WET610N to the newer EA6500 recently.  I have a problem with connecting using my public DNS name to the local network.  It works when I am not on the internal network, but not on the internal network itself.  I do see using

  • Sxmb_moni error - some http ..XI SERVER ERROR

    HI all <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!--  Call Adapter   --> - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">   <SAP:Category>XIServe

  • Obtain Param Array using SELECT SQL statement

    Hi, I was trying to use array processing to fetch an array of data from a database. Here is the problem I am facing (I am new to this, so I am sorry if I am doing something silly): I am using the following statements in C++: OParamArray idParam; OPar