<listener> and <servlet> load sequence - Weblogic

This is a discussion on <listener> and <servlet> load sequence - Weblogic ; Hi All, I am having problem with web.xml load sequence in WebLogic 8.1. My application has both and configured in web.xml. The servlet must be loaded after the listener because it has to get some information from the listener. At ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: <listener> and <servlet> load sequence

  1. <listener> and <servlet> load sequence

    Hi All,

    I am having problem with web.xml load sequence in WebLogic 8.1.

    My application has both and configured in web.xml. The
    servlet must be loaded after the listener because it has to get some
    information from the listener.

    At first, I tested my application on Tomcat and it works fine, since Tomcat
    always load before . But when I deployed my application
    on WebLogic, the servlet is loaded before the listener and cause problem to
    my application.

    My question is, is there anyway to configure WebLogic to load
    before ? If there is no way, I think I have to get back to Tomcat


    Thanks you very much in advanced.

    Best regards,
    Tinnapat C.



  2. Re: <listener> and <servlet> load sequence

    Hi,

    The servlet spec doesnt seem to mandate whether the listener must be
    instantiated first or the servlets so I would recommend that you put all the
    information needed by the servlet in its init method. That way the webapp
    would be portable across app servers.

    --Nagesh



    "Tinnapat Chaipanich" wrote in message
    news:402c9ffa@newsgroups.bea.com...
    > Hi All,
    >
    > I am having problem with web.xml load sequence in WebLogic 8.1.
    >
    > My application has both and configured in web.xml.

    The
    > servlet must be loaded after the listener because it has to get some
    > information from the listener.
    >
    > At first, I tested my application on Tomcat and it works fine, since

    Tomcat
    > always load before . But when I deployed my

    application
    > on WebLogic, the servlet is loaded before the listener and cause problem

    to
    > my application.
    >
    > My question is, is there anyway to configure WebLogic to load
    > before ? If there is no way, I think I have to get back to Tomcat
    >
    >
    > Thanks you very much in advanced.
    >
    > Best regards,
    > Tinnapat C.
    >
    >




  3. Re: <listener> and <servlet> load sequence

    Hi Nagesh

    Thank you very much for your answer

    Regards,
    Tinnapat C.


    "Nagesh Susarla" wrote in message
    news:40312550@newsgroups.bea.com...
    > Hi,
    >
    > The servlet spec doesnt seem to mandate whether the listener must be
    > instantiated first or the servlets so I would recommend that you put all

    the
    > information needed by the servlet in its init method. That way the webapp
    > would be portable across app servers.
    >
    > --Nagesh
    >




  4. Re: <listener> and <servlet> load sequence

    I will add that, Server 2.4 spec clarifies the order. Next release onwards
    the order will be:

    init and notify listeners -> init filters -> init load-on-startup servlets

    --Vinod.



    "Nagesh Susarla" wrote in message
    news:40312550@newsgroups.bea.com...
    > Hi,
    >
    > The servlet spec doesnt seem to mandate whether the listener must be
    > instantiated first or the servlets so I would recommend that you put all

    the
    > information needed by the servlet in its init method. That way the webapp
    > would be portable across app servers.
    >
    > --Nagesh
    >
    >
    >
    > "Tinnapat Chaipanich" wrote in message
    > news:402c9ffa@newsgroups.bea.com...
    > > Hi All,
    > >
    > > I am having problem with web.xml load sequence in WebLogic 8.1.
    > >
    > > My application has both and configured in web.xml.

    > The
    > > servlet must be loaded after the listener because it has to get some
    > > information from the listener.
    > >
    > > At first, I tested my application on Tomcat and it works fine, since

    > Tomcat
    > > always load before . But when I deployed my

    > application
    > > on WebLogic, the servlet is loaded before the listener and cause problem

    > to
    > > my application.
    > >
    > > My question is, is there anyway to configure WebLogic to load
    > > before ? If there is no way, I think I have to get back to

    Tomcat
    > >
    > >
    > > Thanks you very much in advanced.
    > >
    > > Best regards,
    > > Tinnapat C.
    > >
    > >

    >
    >




+ Reply to Thread