Subject.getSubject in servlet container

Hi All,
Interested if the following code will produce a Subject that was authenticated by a JAAS module.
This code is to be executed in the servlet container after the LoginModule.login() was done and number of subsequent requests to the secured web/ejb resources.
AccessControlContext context = AccessController.getContext();
return Subject.getSubject(context);The reason for this question is a LoginContext.logout API. I will need a subject to logout with.
From what I read on JAAS and security implementation in different containers, they all have a way of getting to the current request Subject, but all of the ways a proprietary as they require a call to the app server specific API. I would like to have a portable application and would like not to create factories and facades to hide the proprietary APIs from end user. The above code is the only one I know in JDK that will achive that goal but I haven't tested it in any servlet/ejb container yet.
I can always pop a Subject into an HttpSession after a login, but I don't know if that is the correct usage pattern or Subject.getSubject should be used or app server specific api should be used.
It seems that all of the articles that talk about JAAS are dealing with a stand-alone clients accessing EJBs, and none go into a detailed analysis of JAAS in a web application or discuss usage patterns for web apps.
Thanks
Dmitry

Hi,
the issue you are facing will probably be discussed in the next version of the Servlet spec. As of now, getting the Subject from the AccessControllerContext is one possibility (PE 8.0 does it), but other container may not do it.
In Tomcat and PE, you can retrieve the Subject using the HttpSession key: javax.security.auth.subject.
Still, this will not be portable. So adding your own key is probably the way to go if you look for portability.
Thanks
-- Jeanfrancois

Similar Messages

  • Obtaining JAAS subject in a servlet.

    G'day,
    There are problems in Java with getting the JAAS subject, as the standard Subject.getSubject() call can return null if called within a privileged action:
    Subject s = Subject.getSubject(AccessController.getContext());
    Subject.doAs(s, new PrivilegedAction() {
      public Object run() {
        Subject s1 = Subject.getSubject(AccessController.getContext());
        AccessController.doPrivileged(new PrivilegedAction() {
          public Object run() {
            Subject s2 = Subject.getSubject(AccessController.getContext());
            return null;
        return null;
    Here, s2 may be null, which is why other app servers have custom approaches (such as JBoss and its SecurityAssociation.getSubject() call).
    Is there a similar API for Netweaver AS Java for obtaining the JAAS subject? Or can the JAAS subject be obtained always using the standard Java API?
    Edit I put the above code into a servlet protected by BasicLoginModule, and all three subject objects (s, s1, and s2) were null. I thought that at least 's' would be non-null, but apparently not.
    --Geoff

    G'day,
    Thanks for the link to the JAAS login module section of the SAP Library documentation.
    I have already written a custom JAAS login module (which populates a subject with principals and their credentials), but I am looking for the Netweaver equivalent of JBoss's SecurityAssociation.getSubject() that can be called from any code. I did not find anything suitable while searching through the SAP Library documentation.
    However, I did stumble upon an API that might be useful:
    Object object = com.sap.security.core.InternalUMFactory.getEngineResourceHelper();
    if (object != null && object instanceof com.sap.security.core.IEngineResourceHelper) {
      com.sap.security.core.IEngineResourceHelper helper =
          (com.sap.security.core.IEngineResourceHelper) object;
      Subject subject = helper.getCurrentSubject();
    The class name InternalUMFactory suggests that this API may be undocumented or unstable.
    If I have a servlet protected by the BasicLoginModule, and I authenticate to the servlet using a username/password, then the subject returned is a principal with the correct username, and with password credentials.
    If the servlet is not protected by a login module, then the subject returned is "Guest".
    If I put the servlet as an iView within a portal, then the subject returned is "Guest", even though the portal is protected by a login module and authentication is required. I thought here that the Subject for the portal would be propogated to the servlets running in that portal, but maybe my understanding is wrong.
    --Geoff

  • Thread pool in servlet container

    Hello all,
    I'm working on this webapp that has some bad response times and I've identified an area were we could shave off a considerable amount of time. The app is invoking a component that causes data to be catched for subsequently targeted apps in the environemnt. Our app does not need to wait for a response so I'd like to make this an asyncronous call. So, how best to implement this?...I considered JMS, but started working on a solution using the Java 1.4 backport of JSR 166 (java.util.concurrent).
    I've been testing the use of a ThreadPoolExecutor, using an ArrayBlockingQueue. The work that each Runnable will perform involves a lot of waiting (the component we call invokes a web service, among a couple other distributed calls). So I figure the pool will be much larger than the queue. Our container has 35 execute threads, so I've been testing with a thread pool size of 25, and a queue of 10.
    Any thoughts on this approach? I understand that some of this work could be simplified by JMS, but if I don't need to be tied to the container, I'd prefer not to. The code if much easier to unit test, and plays nicely with our continious build integration (which runs our junit test for us and notifies on errors).
    Any thoughts are greatly appreciated...Thanks!!

    Well, if it works, that's by far the best way to go - but note that creating threads in a servlet container means those threads are outside of the container's control. Many containers will refuse to give the new threads access to the JNDI context, even, and some may prevent you from creating threads at all.

  • Using JDO in a Servlet container/app server

    Hi,
    I was just wondering what Solarmetric recommends when using Kodo in a
    servlet container/app server. Specifically the following:
    1. Should each user session maintain a PersistenceManager or should the
    PM be created per request? I am thinking it might be expensive to
    maintain PMs across requests since you may have idle sessions and the
    PMs may hold database resources? But since PMs aren't pooled in Kodo is
    creating/closing a PM per request expensive or is it offset by Kodo's
    connection pooling?
    2. Is it advisable to store data to be displayed on a JSP by storing the
    JDO instances themselves or serializable proxies (simple data beans) of
    these objects in a user's session?
    3. If you can store the JDO instances in the session, do you need to
    make them transient instances using makeTransient() and call close() the
    PersistenceManager?
    Thanks in advance,
    Khamsouk

    These are all very good questions. There really is no one right answer to any
    of them, so I'll just try to educate you on the issues involved and you can
    make your own decision. Hopefully other people who are actually using Kodo
    in a servlet/JSP environment will chime in too.
    1. Should each user session maintain a PersistenceManager or should the
    PM be created per request? I am thinking it might be expensive to
    maintain PMs across requests since you may have idle sessions and the
    PMs may hold database resources? But since PMs aren't pooled in Kodo is
    creating/closing a PM per request expensive or is it offset by Kodo's
    connection pooling?As long as you are outside of a datastore transaction, a PM does not maintain
    any database resources. The only significant state it maintains is a soft
    cache of persistent objects that have already been instantiated. If you are
    using Kodo 2.3 RC1 and have no set the
    com.solarmetric.kodo.DefaultFetchThreshold property to -1, then some
    large collections you obtain from query results or relation traversals may be
    scrollable result sets on the back-end, in which case they obviously maintain
    some database resources.
    2. Is it advisable to store data to be displayed on a JSP by storing the
    JDO instances themselves or serializable proxies (simple data beans) of
    these objects in a user's session?
    3. If you can store the JDO instances in the session, do you need to
    make them transient instances using makeTransient() and call close() the
    PersistenceManager?I'll address these together. JDO fully supports serialization, and in fact
    I think you'll find it does so in exactly the way that you want. If you choose
    to store serialized persistent objects in the session, then during
    serialization the objects will transparently pull in all of their persistent
    state and relations, so the entire object graph is serialized. When you
    deserialize, the objects will no longer be attached to their persistence
    manager -- they will be transient.
    Another options is to store the object IDs in the session, and re-retrieve
    the persistent objects for each web request.
    One design pattern that can probably net very good performance is to maintain
    a global read-only persistence manager that you use to dereference these IDs.
    Of course, if you ever want to change an object, you'll have to re-fetch it
    in a new persistence manager, and evict it from the global manager's cache.
    I hope this helps.

  • Handshake Exception with Firefox and Jetty Servlet Container

    We do have a strange problem with Firefox 2 and Jetty 6.1 (a Servlet Container) using HTTPS to communicate: At some stage Firefox (FF) sends a ClientHelloV2, to which Jetty responds with a ServerHelloV3. This leads to a handshake failure for this handshake and for any subsequent attempt.
    To avoid the handshake failures there are 2 options:
    1.) restart FF
    2.) change the servername or port, by using ssltap [2] as a proxy.
    [FF] --> [ssltap] --> [Jetty]
    That way it is possible to change the port without restarting
    FF and Jetty, and to debug the SSL traffic.
    Both options make FF to start a SSL session, by sending a ClientHelloV3. Then everything works until we get to the same stage described above.
    h2. Logs:
    From what I can see in the logs of ssltap, Firefox is sending some data, which might be something like a partial handshake (?).
    --> [
    alloclen = 63 bytes
    (63 bytes of 63)
    [Wed Jan 09 12:18:41 2008] [ssl2] ClientHelloV2 {
    version = {0x03, 0x00}
    cipher-specs-length = 36 (0x24)
    sid-length = 0 (0x00)
    challenge-length = 16 (0x10)
    cipher-suites = {
    (0x000039) TLS/DHE-RSA/AES256-CBC/SHA
    (0x000038) TLS/DHE-DSS/AES256-CBC/SHA
    (0x000035) TLS/RSA/AES256-CBC/SHA
    (0x000033) TLS/DHE-RSA/AES128-CBC/SHA
    (0x000032) TLS/DHE-DSS/AES128-CBC/SHA
    (0x000004) SSL3/RSA/RC4-128/MD5
    (0x000005) SSL3/RSA/RC4-128/SHA
    (0x00002f) TLS/RSA/AES128-CBC/SHA
    (0x000016) SSL3/DHE-RSA/3DES192EDE-CBC/SHA
    (0x000013) SSL3/DHE-DSS/DES192EDE3CBC/SHA
    (0x00feff) SSL3/RSA-FIPS/3DESEDE-CBC/SHA
    (0x00000a) SSL3/RSA/3DES192EDE-CBC/SHA
    session-id = { }
    challenge = { 0xa954 0x2122 0x3e82 0xb993 0xd72f 0xea54 0x779f 0x958c }
    The server responds with:
    <-- [
    (1161 bytes of 1156)
    SSLRecord { [Wed Jan 09 12:18:41 2008]
    0: 16 03 00 04 84 |....�
    type = 22 (handshake)
    version = { 3,0 }
    length = 1156 (0x484)
    handshake {
    0: 02 00 00 46 |...F
    type = 2 (server_hello)
    length = 70 (0x000046)
    ServerHello {
    server_version = {3, 0}
    random = {...}
    0: 47 84 ad 91 a1 f6 cb e5 f8 e2 f0 46 60 4b dd 48 | G����.&#9574;.�.�F`K.H
    10: 13 a8 93 96 d2 4f 2b d8 2d fe 49 2f 22 e5 29 5e | .����O+�-.I/".)^
    session ID = {
    length = 32
    contents = {..}
    0: 47 84 ad 91 84 b7 ef 62 92 fb 03 d7 8a 41 ae 82 | G������b��.�.A�.
    10: d5 57 a3 e0 24 cc b5 2e b2 c7 29 3d 3a 37 a6 11 | &#305;W��$&#9568;�.&#9619;�)=:7�.
    cipher_suite = (0x0032) TLS/DHE-DSS/AES128-CBC/SHA
    0: 0b 00 02 f6 |....
    type = 11 (certificate)
    length = 758 (0x0002f6)
    CertificateChain {
    chainlength = 755 (0x02f3)
    Certificate {
    size = 752 (0x02f0)
    data = { saved in file 'cert.001' }
    0: 0c 00 01 38 |...8
    type = 12 (server_key_exchange)
    length = 312 (0x000138)
    0: 0e 00 00 00 |....
    type = 14 (server_hello_done)
    length = 0 (0x000000)
    +Then FF responds with a handshake failure:+
    --> [
    (7 bytes of 2)
    SSLRecord { [Wed Jan 09 12:18:41 2008]
    0: 15 03 00 00 02 |.....
    type = 21 (alert)
    version = { 3,0 }
    length = 2 (0x2)
    fatal: handshake failure
    0: 02 28 |.(
    I am pretty stuck. Do you have any idea? Or can you give me any advice, how to further investigate this problem?
    Thanks,
    -Stefan
    [2] http://www.mozilla.org/projects/security/pki/nss/tools/ssltap.html

    I did some more analysis:
    When I replace the keystore by another keystore provided by the Jetty
    distribution, Firefox will not complain about the handshake
    exception. Nevertheless there are handshake exceptions, and the SSL
    level switches from TLS to SSLv3.
    Now I guess the question is: What is the difference between the two
    keystores?
    Answer: As far as I can see, the Keystore provided in the Jetty distro
    has expired in 2001, while my keystore is still valid (although also
    self-generated).
    Could it be, that Firefox some is less strict regarding handshake
    failures, after you have told it to accept an expired certificate?
    I am not sure whether this is problem of JSSE, or not? What do you think?

  • How to get servlet container name on which servlet is running

    I tried getServletInfo(),but I couldn't get the information. Please give me code to find the servlet container on which servlet is running.
    Is there any system property which will retrieve servlet container information such as its name and version
    Thanks & Regards,
    Nasrin.N

    getServerInfo() should work.
    What about getServerInfo() doesn't work for you?
    My standard solution is to this in a JSP page:
    <h2> Server Info </h2>
    Server info = <%= application.getServerInfo() %> <br>
    Servlet engine version = <%=  application.getMajorVersion() %>.<%= application.getMinorVersion() %><br>
    Java version = <%= System.getProperty("java.vm.version") %><br>Cheers,
    evnafets

  • How to provide web service in servlet container?

    If I want my servlet container to provide web service (JAX-RPC), how should I implement it?
    I'm using Tomcat/Resin as servlet container. Thanks in advance!

    It depends on what standard you are conforming to. Even though some specifications allow you to switch protocols, http is the dominating standard. WS-I, for example, requires the http protocol.
    Klas

  • Runtime process not working from servlet container

              Hello,
              I'm executing a standalone executable from the Runtime class, using exec.
              Process process = Runtime.getRuntime().exec(buildCommand.toString());
              There are threads monitoring the input and error streams. This same use of the Runtime
              class is used at least 5 other times in the servlet with no problems. The same method
              is also called from a JUnit test and also executes properly.
              The method called from the servlet however does not work. the executable it's calling
              is a C++ executable that uses an ODBC alias set up on the machine to connect to the
              Oracle database. For some reason the ODBC layer throws an exception while trying
              to connect when the executable is called from the servlet, rather than called from
              the command line or JUnit test.
              Does the servlet have a different environment than a client call from the JUnit test?
              Would it not have access to ODBC drivers it needs? Could there be some sort of security
              setting that the servlet container is set too low?
              Any information would be terrific.
              Thanks,
              Sara
              

    Thanks!
    I borrowed a DVD drive and everything installed correctly.

  • How to get list of jar files loaded by servlet container.

    Hi,
    I need to display in my servlet program about the list of jar files loaded by servlet container. Does it vary for each servlet container or is it same. Where can I get those details.
    I need to write code to support tomcat 4x, iplanet 5.0 and websphere 6.0.
    Thanks & Regards,
    Nasrin.N

    For curious, here are output prints for all 3 methods:
    1) parsing system property
    2) tschodt
    3) overcast SystemClassLoader to URLClassLoader
    /home/espinosa/workspace/jboss_embedded_test1/target/test-classes
    /home/espinosa/workspace/jboss_embedded_test1/target/classes
    /opt/javalibs/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar
    /opt/javalibs/javax/jms/jms/1.1/jms-1.1.jar
    /opt/javalibs/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
    package com.sun.org.apache.xerces.internal.impl.validation, Java Platform API Specification, version 1.6
    package com.thoughtworks.qdox.directorywalker
    package com.sun.org.apache.xerces.internal.parsers, Java Platform API Specification, version 1.6
    package java.util.jar, Java Platform API Specification, version 1.6
    package org.testng.internal.thread
    package com.sun.org.apache.xerces.internal.util, Java Platform API Specification, version 1.6
    package java.net, Java Platform API Specification, version 1.6
    package sun.reflect.misc, Java Platform API Specification, version 1.6
    package esp.ejb.samples1.test
    package sun.security.provider, Java Platform API Specification, version 1.
    file:/home/espinosa/workspace/jboss_embedded_test1/target/test-classes/
    file:/home/espinosa/workspace/jboss_embedded_test1/target/classes/
    file:/opt/javalibs/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar
    file:/opt/javalibs/javax/jms/jms/1.1/jms-1.1.jar
    file:/opt/javalibs/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
    ...Interestingly, method 1 and 3 gives the same list, same order, same count, just format of item is a little bit different. The order is same as in Eclipse .classpath file.
    Method 2 (tschodt) give significantly more items! rougly 3x! Different order (somewhat random it seems to me). Some items contain extra information, like version and string "Java Platform API Specification".
    It prints not absolute paths but logical Java names.

  • Servlet container

    hello friends,
    I am new to using Linux . could you help in knowing the advantages of using Linux and Apache server as my Web server for my java and jsp.
    Do i have to use a third party servlet container line Servlet Exec for windows .
    Thanks for any help
    andrew

    hi Haris,
    Thanks for the info , can i use Servlet Exec 3.0 . I am just figuring out the different options i can have .
    Thanks once again.
    andrew

  • Servlet Container, how many containers?

    i heard that there are several containers in java to execute the java application.. i know few details about servlet container.. which will act as container to process java programs..etc,
    can anyone explain me what are other containers available?

    i heard that there are several containers in java to
    execute the java application.. i know few details
    about servlet container.. which will act as container
    to process java programs..etc,Different kinds of containers, sure. Servlets/JSPs run in a servlet/JSP container, EJBs run in an EJB container.
    There are several implementations of each: Tomcat and Jetty for servlets/JSPs, WebLogic and JBOSS for EJBs.
    >
    can anyone explain me what are other containers available?Which others did you have in mind?
    %

  • Running in Servlet Container or Standalone?

    How can I detect if I'm running in a servlet container or a standalone application?
    if ( iAmRunningInAServletContainer() )
      // do this
    else
      // do thatIs there a System property that all servlet containers set? I can't find any.

    Hopes this helps,
    http://java.sun.com/blueprints/guidelines/designing_webservices
    I use jaxrpc and tomcat to host web services. It works good as long the web services don't need to be invoked internal to the app. I don't like working with anything other than the remote interface (ex. gen'd stubs) when calling remote methods from within my app. I think that hosting a web service in an ejb container allows you to access the service with jndi. That would be a nice feature to have. Although, if I used an ejb container I would change my implementation so that the web service proxy'd to an ejb and all internal access would use the ejb where external would go through the web service.
    Matthew

  • New installation of iPlanet 7.0.14 fails to initialize servlet container

    I have two servers that I have installed iPlanet 7.0.14 on, with a locally installed copy of the latest 1.6.0_31 JDK.
    On one server, when I start the webserver, it initializes the internal servlet container properly, but on the other, it fails. Both servers should be set up identically, and both are in zones on Solaris 10 Sparc boxes (M4000s) that should be identically configured.
    Here is what I see in the startup on the server where it is not working (I have blanked out the IPs and hostnames of the system):
    Oracle iPlanet Web Server 7.0.14 B02/13/2012 13:53
    info: CORE3016: daemon is running as super-user
    info: CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.6.0_31] from [Sun Microsystems Inc.]
    info: WEB0100: Loading web module in virtual server [admin-server] at [admingui]
    info: WEB0100: Loading web module in virtual server [admin-server] at [jmxconnector]
    info: HTTP3072: admin-ssl-port: https://*****:61000 ready to accept requests
    info: CORE3274: successful server startup
    Oracle iPlanet Web Server 7.0.14 B02/13/2012 14:29
    info: wl-init reports: WebLogic Server Plugin version 1.1 <WLSPLUGINS_11.1.1.6.0_SOLARIS.SPARC64_111122.1115>
    info: CORE5076: Using [Java HotSpot(TM) 64-Bit Server VM, Version 1.6.0_31] from [Sun Microsystems Inc.]
    failure: PWC1240: Container StandardEngine[com.sun.web-1].StandardHost[*****-80].StandardContext[] has not been started
    java.lang.ExceptionInInitializerError
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4963)
         at com.sun.webserver.connector.nsapi.WebModule.start(WebModule.java:240)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1224)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:924)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1224)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:520)
         at org.apache.catalina.startup.Embedded.start(Embedded.java:917)
         at com.sun.enterprise.web.PwcWebContainer.onStartup(PwcWebContainer.java:70)
         at com.sun.webserver.connector.nsapi.WebContainer.start(WebContainer.java:497)
         at com.sun.webserver.init.J2EERunner.confPostInit(J2EERunner.java:304)
    Caused by: java.lang.NullPointerException
         at org.apache.catalina.util.ExtensionValidator.<clinit>(ExtensionValidator.java:125)
         ... 10 more
    failure: PWC1240: Container StandardEngine[com.sun.web-1].StandardHost[*****].StandardContext[] has not been started
    java.lang.NoClassDefFoundError: Could not initialize class org.apache.catalina.util.ExtensionValidator
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4963)
         at com.sun.webserver.connector.nsapi.WebModule.start(WebModule.java:240)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1224)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:924)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1224)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:520)
         at org.apache.catalina.startup.Embedded.start(Embedded.java:917)
         at com.sun.enterprise.web.PwcWebContainer.onStartup(PwcWebContainer.java:70)
         at com.sun.webserver.connector.nsapi.WebContainer.start(WebContainer.java:497)
         at com.sun.webserver.init.J2EERunner.confPostInit(J2EERunner.java:304)
    info: HTTP3072: http-listener-1: https://*****:443 ready to accept requests
    info: HTTP3072: http-listener-2: http:/*****:80 ready to accept requests
    info: CORE3274: successful server startup
    Oracle iPlanet Web Server 7.0.14 B02/13/2012 14:29
    info: IdcNSAuth::idcInit reports: Initializing Content Server NS Authorization plugin
    info: wl-init reports: WebLogic Server Plugin version 1.1 <WLSPLUGINS_11.1.1.6.0_SOLARIS.SPARC64_111122.1115>
    info: CORE5076: Using [Java HotSpot(TM) 64-Bit Server VM, Version 1.6.0_31] from [Sun Microsystems Inc.]
    failure: PWC1240: Container StandardEngine[com.sun.web-1].StandardHost[*****-80].StandardContext[] has not been started
    java.lang.ExceptionInInitializerError
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4963)
         at com.sun.webserver.connector.nsapi.WebModule.start(WebModule.java:240)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1224)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:924)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1224)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:520)
         at org.apache.catalina.startup.Embedded.start(Embedded.java:917)
         at com.sun.enterprise.web.PwcWebContainer.onStartup(PwcWebContainer.java:70)
         at com.sun.webserver.connector.nsapi.WebContainer.start(WebContainer.java:497)
         at com.sun.webserver.init.J2EERunner.confPostInit(J2EERunner.java:304)
    Caused by: java.lang.NullPointerException
         at org.apache.catalina.util.ExtensionValidator.<clinit>(ExtensionValidator.java:125)
         ... 10 more
    failure: PWC1240: Container StandardEngine[com.sun.web-1].StandardHost[*****].StandardContext[] has not been started
    java.lang.NoClassDefFoundError: Could not initialize class org.apache.catalina.util.ExtensionValidator
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4963)
         at com.sun.webserver.connector.nsapi.WebModule.start(WebModule.java:240)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1224)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:924)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1224)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:520)
         at org.apache.catalina.startup.Embedded.start(Embedded.java:917)
         at com.sun.enterprise.web.PwcWebContainer.onStartup(PwcWebContainer.java:70)
         at com.sun.webserver.connector.nsapi.WebContainer.start(WebContainer.java:497)
         at com.sun.webserver.init.J2EERunner.confPostInit(J2EERunner.java:304)
    info: HTTP3072: http-listener-1: http://*****:80 ready to accept requests
    info: HTTP3072: http-listener-2: https://*****:443 ready to accept requests
    info: CORE3274: successful server startup
    I also have the log output from turning the server to 'finest' mode, but that's really really long. It's mostly more of the same "container not started" issue. I should mention that there are NO servlets or anything else being loaded so far, and the HTTP/HTTPS serving seems to work as expected. There is a WebLogic plugin installed, but it's on both boxes, and causes no issues on the other system.

    I thought that might be the case, too, so I did a clean install of the webserver without any configuration changes - just a basic server using all the defaults. I got the same result after that - the servlet stuff fails to load before it even gets to the WLS plugin loading.
    I also tried to do a clean reinstall of the JDK and again, no difference in the behavior.
    My guess is that it could be a library or other issue on the server itself, but I don't know what to look for.

  • How to find the servlet container used via servlet

    I need to write code for different servlet container in a servlet. so I need to find in runtime what servlet container is used.
    Please let me know is there any possibility to get the servlet container name in servlet.
    Thanks & Regards,
    Nasrin.N

    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class Context extends HttpServlet {
    public void service(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException {
    PrintWriter out=res.getWriter();
    res.setContentType("text/html");
    ServletContext stx=getServletContext();
    out.println("ServletContext " + stx.getServerInfo());
    }

  • ARE THERE ANY WAYS BY WHICH I CAN FIND THE Appln Servlet Container Memory

    ARE THERE ANY WAYS BY WHICH I CAN FIND THE Appln Servlet Container Memory .

    You can check out Tomcat memory usage using Tomcat Manger
    and clicking server status.
    It gives the information like this
    Free memory: 489.80 MB Total memory: 508.12 MB Max memory: 1016.12 MB
    For specific application stats, i think there are some profilers which u have to search in google.

Maybe you are looking for