Distinguishing between Tomcat and JBoss

I have a servlet that does a JNDI lookup, and I need that servlet to be able to figure out whether it's being served by Tomcat or JBoss (because the JNDI lookup is done differently depending on which servlet container it is). Using getServletContext().getServerInfo() doesn't help because it returns tomcat in both cases, since JBoss uses Tomcat as the servlet container. Does anyone know another way of determining whether it's Tomcat or JBoss?
Thanks!
--vlb1

http://dinoch.dyndns.org:7070/axis1.2/AboutArrays2.jsp

Similar Messages

  • Tomcat and JBoss

    Hello! I'm not that new to web programming in Java but there are some things that I think I need to fully understand. Can anyone here give me a comparison between Tomcat and JBoss? What are the similarities and key differences between the two? Tomcat is a servlet container while JBoss is an application container(?? not sure about that, still haven't read enough about it).
    Thanks in advance,
    Romaine

    Hi Romaine,
    Tomcat is not only a servelet container...its actually the webserver which is a servlet container and jsp engine as well.
    Where as JBOSS is one of the application servers where it provides the run time environment for the business components( the ejbs) in addition to the support environment for servlets and jsps.
    examples of application servers: JBOSS, WEBLOGIC, WEBSPHERE

  • Distinguishing between CSV and Excel file formats

    I am trying to distinguish between CSV and Excel files.   Most of the files I need to process are CSV, but some have been opened and re-saved in Excel format.  I know about the Excel toolbox available, but haven't used it yet. 
    I need to be able to open a spreadsheet file regardless of if it is in CSV or Excel format.  Any help would be greatly appreciated.
    Here are two example files, one CSV and one Excel.  Both have .XLS file extensions. 
    Attachments:
    20-4-XLS.xls ‏21 KB
    20-5-CSV.xls ‏8 KB

    Hi Paul,
    I think the matter is not the extention (xls or csv or whatever) but the format of the data written in your file.
    To see what I mean, open the xls file you posted with notepad... What does it look like ?
    You have tobe sure of the format of the file you want to read so that you can develop an appropriate VI... if you want to be able to read different type of data format, do a test before reading the file and then use an appropriate routine for each format.
    Hope this helps you...
    BTW, to read the one named CSV, a simple "read from spreadsheet file" VI will do the job
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • Distinguishing between topics and queues

              Hi,
              I have a generic piece of code that takes a javax.jms.Destination that does different
              things depending if the destination is a queue or a topic.
              The problem is that it seems that destinations in Weblogic implement both queue
              and topic:
              instanceof queue <new_JMSTopic_1>
              queue name: <new_JMSTopic_1>
              weblogic.jms.common.InvalidDestinationException: Destination must be a queue,
              ne
              w_JMSTopic_1
              at weblogic.jms.common.Destination.checkDestinationType(Destination.java
              :113)
              at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1516)
              at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1500)
              at Test.run(Test.java:100)
              at Test.main(Test.java:311)
              Is there anyway for me to programatically distinguish between queues and topics
              as there seems not to be any javadoc on weblogic.jms.common.Destination and instanceof
              does not work? I would prefer not to rely on exceptions.
              I'm using Weblogic 8.1 sp2.
              Thanks
              Riad
              

              Cool. Thanks for your help Tom.
              Riad
              Tom Barnes <[email protected]> wrote:
              >Hi Riad,
              >
              >This has come up before.
              >
              >For now, you may cast dest to weblogic.jms.common.DestinationImpl
              >and call "isQueue()". Normally, only the javadoc'd methods
              >in weblogic.jms.extensions are intended for public use,
              >but for this case we make an exception.
              >
              >In the next release, this method will be exposed through
              >a new public WL JMS API extension:
              >weblogic.jms.extensions.WLDestination,
              >and might not be available otherwise.
              >
              >Tom, BEA
              >
              >P.S. A java tip: The JDK's built-in "javap"
              >is useful for viewing an arbitrary class api.
              >As in "javap weblogic.jms.extensions.JMSHelper".
              >
              >Riad wrote:
              >> Hi,
              >>
              >> I have a generic piece of code that takes a javax.jms.Destination that
              >does different
              >> things depending if the destination is a queue or a topic.
              >>
              >> The problem is that it seems that destinations in Weblogic implement
              >both queue
              >> and topic:
              >> instanceof queue <new_JMSTopic_1>
              >> queue name: <new_JMSTopic_1>
              >> weblogic.jms.common.InvalidDestinationException: Destination must be
              >a queue,
              >> ne
              >> w_JMSTopic_1
              >> at weblogic.jms.common.Destination.checkDestinationType(Destination.java
              >> :113)
              >> at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1516)
              >> at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1500)
              >> at Test.run(Test.java:100)
              >> at Test.main(Test.java:311)
              >>
              >> Is there anyway for me to programatically distinguish between queues
              >and topics
              >> as there seems not to be any javadoc on weblogic.jms.common.Destination
              >and instanceof
              >> does not work? I would prefer not to rely on exceptions.
              >>
              >> I'm using Weblogic 8.1 sp2.
              >>
              >> Thanks
              >> Riad
              >
              

  • Distinguish between AW5 and 6 in script

    I'm trying to create an application in Automator to automate the conversion of AW to iWork. I'm using one of Yvan's scripts to convert AW6 to iWork successfully. The only step remaining is to convert to AW6 from 5, something that shouldn't be too hard since all it has to do is open and save. However, I can't find a good way to distinguish between AW5 and 6. In his script, I believe Yvan does this here:
    on AWtoAW6(leCheminOriginal_UniText) -- leCheminOriginal_UniText est Unicode text
              local leFichier, flag, nf, l, nouveauChemin
              set leFichier to leCheminOriginal_UniText as alias
              try
                        tell application "AppleWorks 6.2.9"
      activate
      open leFichier
                                  set nf to name of document 1
                                  if nf contains v6 then
                                            set AppleScript's text item delimiters to v6
                                            set l to text items of nf
                                            set AppleScript's text item delimiters to ""
                                            set nf to l as text
                                  end if
                                  if nf does not end with ".cwk" then set nf to nf & ".cwk"
                                  set nouveauChemin to cheminDeStockage & nf
                                  tell application "System Events"
                                            if exists (file nouveauChemin) then set name of file nouveauChemin to (text 1 thru -(2 + (length of "cwk")) of nf) & my horoDateur(modification date of file nouveauChemin) & ".cwk" (* name stamped *)
      make new file at end of folder cheminDeStockage with properties {name:nf, file creator:"BOBO", file type:fileType}
                                  end tell
                                  set leFichier to nouveauChemin as alias
      save document 1 in leFichier
      close document 1
                        end tell -- AppleWorks 6
              on error
                        set rapport to rapport & msg96 & nouveauChemin & return
              end try
    end AWtoAW6
    But I'm not sure. What I need is a script that opens, checks if it's an AW5 file, if it is opens and saves in AW6, and then proceeds to open my other script that can do the

    I'm not sure what you mean. The files have to be saved as AW6 for the iWork apps to be able to open them.
    Yvan has added all of his AppleWorks scripts to his Box.com account. He says the one you need is https://app.box.com/s/hqq9jwfi45nknjpf6d52

  • Cannot distinguish between left and right sounds IN EARPHONES. Please help!!

    when i connect my earphone, i cannot distinguish between left and right sounds (which gives a plesant effect); both left and right sounds are same. Earlier it use to work fine. I realised about this problem when an app-3D audio illusion was was not giving proper sounds, and my ipod songs were also sounding dull. i hav removed that app, but still my ipod songs sound monotonous. I have tried using different headphones, but problem still persists. I am not sure wheather this is a hardware or software issue..PLEASE HELP!!

    You're welcome. And thanks for marking question as solved.
    Happy listening
    Stedman

  • Distinguish between 0001 and 0006 Vendor in SRM?

    Hi,
    how can i distinguish between 0001 and 0006 vendors in SRM side after they have been replicated from R/3.
    Regards,
    Neha

    Hi Muthu,
    Thanks for your response.
    VENMAP contains both the vendors as both the vendors are replicated from ECC.
    I have found one solution:
    During the replication add a piece of code in both the methods of the  BADI BBP_TRANSDATA_PREP
    What will the code achieve:
                From the table CT_LFA1 identify the vendors with KTOKK = '0006'
                for those vendors set CT_LFA1-SPERM = 'X'.
                This will update the table field BUT000-XBLCK with 'X'.
                Hence, this can be used in the search help to distinguish between 0001 and 0006 vendors.
               XBLCK is used for blocking vendors from any purchasing activity .
    in my opinion this solution should work.
    What do u say?
    Regards,
    Neha Misra

  • How can I distinguish between iMessages and SMS messages in the iOS 7's "Messages" app?

    I often chat with the same contact using both services, but I just have a duplicate contact thread in the "Messages" app, which I cannot distinguish unless I go into the thread itself and check to see whether the conversation is blue or green. Is there a way to distinguish between the two services? If so, how?
    If not... Apple, get on it.

    Excuse me great powerful one. I will certainly deal with it and I'll try to survive. Sorry if I have troubled you, great Sir. I am not worthy of your answers.
    BTW: If you would have read the Q thoroughly you would not have posted an exact same answer.
    "...unless I go into the thread itself and check to see whether the conversation is blue or green. Is there a way to distinguish between the two services?"
    And I got your reply saying:
    "Yes, by going into the thread itself and check to see whether the conversation is blue or green."
    Wow, that was heplful.

  • Building the mod_jk between apche and jboss in solaris environment

    hi there,
    i have installed apache2 and running on one zone and jboss installed and running on another zone
    now when i connecting of them using the tomcat connector by building the mod_jk i am getting the error where i have followed the procedure in the following link:
    http://blogs.sun.com/shanti/entry/building_mod_jk
    from the above link i have downloaded the source and set the path and then when i am running the file which i have saved then i am getting the below error:
    ./configure --with-apxs=/usr/local/apache2/bin/apxs
    checking build system type... i386-pc-solaris2.10
    checking host system type... i386-pc-solaris2.10
    checking target system type... i386-pc-solaris2.10
    checking for a BSD-compatible install... scripts/build/unix/install-sh -c
    checking whether build environment is sane... yes
    checking for gawk... no
    checking for mawk... no
    checking for nawk... nawk
    checking whether make sets $(MAKE)... yes
    checking for test... /usr/bin/test
    checking for rm... /usr/bin/rm
    checking for grep... /usr/bin/grep
    checking for echo... /usr/bin/echo
    checking for sed... /usr/bin/sed
    checking for cp... /usr/bin/cp
    checking for mkdir... /usr/bin/mkdir
    need to check for Perl first, apxs depends on it...
    checking for perl... /usr/bin/perl
    could not find /usr/local/apache2/bin/apxs
    configure: error: You must specify a valid --with-apxs path
    if any body has encountered such a problem please give me the reply
    thank you for all

    hi o.bogosavljevic
    yes i am using that package only
    what might be the path of the aspx

  • Programmatically distinguish between running and reserved vi's

    I want to programatically check whether a VI is running. I tried to use the "ExecutionState" property, but this did not work for me. My problem is that my definition of running does not match the execution state property’s definition of running:
    My Definitions
    ·         Running = Some element of this VI is currently executing (run arrow looks like this: )
    ·         Reserved = This VI is a sub VI of a running VI, but this VI is not actually running (run arrow looks like this: )
    ·         Idle = This VI is in memory but is not running or reserved (run arrow looks like this: )
    Execution State property definitions
    ·         Running = Some element of this VI is currently executing   OR   this VI is a sub VI of a running VI (run arrow looks like this  or like this )
    ·         Idle = This VI is in memory but is not running (run arrow looks like this: )
    Since each VI's front panel displays a running arrow when that VI is running and a reserved arrow when that VI is reserved, there must be some way to programatically distinguish between these two states.  I hope that this distinction is exposed to programmers.

    You should also go vote for this idea - http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Need-a-way-to-visualize-VI-call-chain-hierarchy/idi-p/...
    Just to expand on P@Anand's suggestion, because it is a good one - you can obtain references to all the VIs and check their state, and then open the BDs of those which are Run Top Level and manuallly inspect where the code is actually stuck.
    Note that if your top level VIs are the ones which are reentrant, you will need to open a reference to the clone, and that's not listed in the All VIs In Memory property, although there are some ways around that. You can try to open N references in a loop using MyVI.vi:# as the VI name and ignore those which return an error, but you should note that the numbers don't necessarily start from 1 and that NI might close up the option to get the clone references like that.
    You could also try closing the main VI to unload it and then opening a new one and looking at the Unopened SubVIs hierarchy, which should list all of the clones. I'm assuming that if the main VI is unloaded, only the clones which are still running will still be in memory, but that might change if you have classes (which don't unload) and I haven't actually tried this myself.
    Try to take over the world!

  • How to distinguish between enabled and disabled tasks in SSDT-BI 2012

    Hi,
    I've got SSDT-BI 2012 together with VS2012 installed. Simple questions: What is the difference between enabled and disabled tasks in control flow from the design/color point of view? I do see that the disabled tasks changes to grey (omg are you really kidding
    me????) from black. This could be a bad joke or dream however is not.
    So I'm kindly asking you to help me solve this problem. How can I change the color difference between these two options (enabled task vs disabled task)? I do not care whether the one will be yellow or pink, simply just need to be recognizable at first
    look and not under long and painful examination.
    Thanks for your reply. Hopefully it will be useful.
    Karol.

    Hi Karol,
    It’s true that it only changes the font color of the task name text to grey after disabling a task in SSDT 2012. In SSDT 2010, the whole task control including icon will turn grey after it is disabled; in BIDS, the background color of the task control will
    turn grey after it is disabled. These behaviors are by design. Personally, I agree with you that this behavior in SSDT 2012 is not very readable.
    If you have concerns, I would suggest you submitting a wish at
    https://connect.microsoft.com/sql.
    Connect site is a connection point between you and Microsoft, and ultimately the larger community. Your feedback enables Microsoft to make software and services the best that they can be, and you can learn about and contribute to exciting projects.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Could someone help me to clearly distinguish between SOAP and HTTP adapter?

    In which scenarios we can go for HTTP adapter and when to go for SOAP adapter?

    Hi Lekshmi !!
    A SOAP message will be bundled inside the soap envelope.HTTP is not an adapter in adapter engine whereas soap is an adapter i.e, HTTP doesn't require a communication channel where as SOAP requires.You can send soap messages using some SOAP client.
    SOAP Adapter is used to xchange SOAP messages bw remote clients and webservices....
    check this link for more differences..
    SOAP and HTTP adapter
    When you need to Send Data to XI from a Webservice , your SOAP adapter is used.
    HTTP adapter is used when you want to post a HTTP request message from a web application to XI.
    How can i make use of SOAP Sender Adapter without using any tools like XML Spy etc....
    XML SPy is used as a TEST tool when you are sending SOAP information to XI. TO actually send data , you need to configure a webservice and construct a SOAP request message and post the data .
    we use SOAP adapter when we need to connect to remote system or use Webservices in these cases we use SOAP adapter.
    HTTP Adapter is used by extenal systems to connect to Intergartin server using native HTTP Interface.
    the http adapter is a service which is directly connected to integration engine. Adapter Framework (Java) isnt involved. It is much more performant than SOAP adapter.
    The SOAP adapter is written in Java and is responsible for the SOAP envelope around the real XML message. You can build/remove that envelope as well in the mapping and use instead http adapter. But standard for webservices is using SOAP adapter.
    Check this thread....
    Difference between SOAP and Http Sender
    HTTP Adatpter Vs Soap Adapter
    HTPP Adatpter Vs Soap Adapter ????
    Difference between SOAP and Http Sender
    Difference between SOAP and Http Sender
    Plain HTTP Adapter vs SOAP Adapter with regards to SSL
    Plain HTTP Adapter vs SOAP Adapter with regards to SSL
    Hope it clears your doubt !!!!
    Questions are welcome here!!
    <b>Also mark helpful answers by rewarding points </b>
    Thanks,
    Abhishek Agrahari

  • Distinguishing between Form and URL variables

    My mind isn't working like it should today, but what I am trying to do is:
    1) alter a page via passing a argument in the URL
    2) store this in a hidden field within the form on the page
    3) retrieve the hidden field when the page is refreshed or in this case manipulated again for printing.
    Basically, I have a report screen that allows the user to toggle between paging 1 page at a time or show all pages. If they click for all pages I pass a variable (allPages), and store it in a hidden field (allPages). Now if the user presses the "Print" button I reload the page stripping out form elements and put in Page breaks so that the report prints fairly nicely. Whats not working is my ability to differentiate between the parameter passed in the URL and the parameter contained within the form.
    I am currently able top get the URL passed parameter via:
    request.getParameter("allPages")
    Is there a way to check for the form element, if it exist then use it else check for the URL passed parameter, or default it.
    Thanks in advance.

    I wonder, why you didn't use two different name for the parameter via URL and via Form, so your program should can easily distinguish where come from where, am I right?
    The other way, you may check the method, whether it is "post" or "get", the get method is what you said as via URL and post normally use by form. But I think, it is better use two different parameter for Form and URL.

  • Handshake between tomcat and sap xi over https

    I have a webservice which is hosted on sap xi server. My class in tomcat will call it over https protocol. For that, tomcat needs to import the xi certificate. I did it in cacerts which resides in jre's lib/security directory. Still, it doesn't work. But the strange thing is, if i write the stand alone class, and use the same cacerts file, it works.
    // For standalone class
    System.setProperty("javax.net.ssl.trustStore", "C:\\certs\\cacerts");
    //For class which is in tomcat
    System.setProperty("javax.net.ssl.trustStore", <cacerts file path>);
              System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
    I am getting the following exception :
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
         org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
         org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)
         org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         org.apache.axis.client.Call.invoke(Call.java:2767)
         org.apache.axis.client.Call.invoke(Call.java:2443)
         org.apache.axis.client.Call.invoke(Call.java:2366)
         org.apache.axis.client.Call.invoke(Call.java:1812)
         com.reliant.ws.xi.client.Os_getDocumentRequestBindingStub.os_getDocumentRequest(Os_getDocumentRequestBindingStub.java:164)
         com.reliant.ws.xi.client.BillFetchClient.fetchContent(BillFetchClient.java:83)
         org.apache.jsp.en_005fUS.EBillViewer.EBillWSCall_jsp._jspService(EBillWSCall_jsp.java:56)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    The problem was with the certificate. The XI certificate was expired. It was valid from 2002 to 2005. And Tomcat ignores the certificates which are expired. So I was getting No trusted certificate found.

  • JNDI differences between Tomcat and Web Logic 6.1

    I am looking at two difference piece of code :
    Application developed and deployed under Tomcat ( perfectly working )
    Context initCtx = new InitialContext();
    Context ctx = (Context) initCtx.lookup("java:comp/env");
    // Get a Connection
    DataSource pool = (DataSource) ctx.lookup("jdbc/WebApps");
    // Getting connection
    con = pool.getConnection();
    This is instead an application developed and deployed under Web Logic
    Context ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("dbase");
    // Connection
    con = ds.getConnection();
    when i deploy the WL application in Tomcat ( as a WAR file ) I got "dbase name not bound in this context", any guess why this is happening even though I already set up the server.xml :
    <Resource auth="Container" name="dbase" type="javax.sql.DataSource"/>
    <ResourceParams name="dbase">
    <parameter>
    Unfortunately I cannot rewrite the WL code so I need to work on Tomcat
    Thanks in advance
    Leonardo

    Thanks for your reply,
    However I think I have not been clear.
    This is the situation. We have Web Logic on production and Tomcat on our Intranet.
    So I am in need of making the WLogic app working under Tomcat "Without touching the code" of the application. The only thing I can modify at this point is the Tomcat installation. If it's possible.
    The only problem I have is with the piece of code of the Data Base Connection. I got "dbase is not bind in this context".
    Leonardo

Maybe you are looking for

  • Crm update

    Hi Guru's I am doing an update of crm system from sp03 to sp08 there i am getting an error in import phase "IMPORT_PROPER" the error details are as follows This is tp version 376.01.20 (release 701, unicode enabled) ERROR: stopping on error 8 during

  • Space before

    Hi, I've got this dumb thing where the text I imported from Word has an extra space after/before each paragraph that I don't want. I tried both find/replacing ^p^p with ^p in the text section, and find/replacing ~b~b+ with \r in the GREP section, and

  • Iphone 4 from abroad

    I bought a iPhone from abroad and is not calling Israel's networks .... What do you do?

  • CLEAN_REQREQ_UP

    Hi SRM experts, Can you please tell me how the shopping cart is getting replicated to backend using CLEAN_REQREQ_UP through RFC call. I want to which BAPI it calls & some other details. Thanks & Regards, Ajay

  • How to remove soft deleted records?

    Hi everybody, Are there any ways to remove soft deleted records from LT table? For instance, table is versioned and database has few workspaces. The user removes some data from LIVe workspace (or from other workspaces). The removed records are marked