If you are looking at loading a native Library - or other wacky initializations. Maybe using Startup classes would be better such as the LifeCycle Listeners. They are called in order of being parsed.
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/engine.html Turner, John wrote: > You can specify the order by using the same element, with successively > increasing ID numbers: > > First servlet: ID 1 > Second servlet: ID 2 > .... > nth Servlet: ID n > > I'm not sure about a better way to load the native library, I'm sure someone > else on the list can answer your question. > > John Turner > > > -----Original Message----- > From: Collins, Jim [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 22, 2002 9:45 AM > To: 'Tomcat Users List' > Subject: RE: Order for starting WebApps > > > Hi John, > > Thanks for your response. Do you know if there is anyway of explicitly > specifying the order from Tomcat? > One other question. The servlet I want loaded first only loads a native > library in its init method, I vaguely recall that there is a better way of > doing this as the servlet never accepts any requests. > > Thanks > > Jim. > > >>-----Original Message----- >>From: Turner, John [mailto:[EMAIL PROTECTED]] >>Sent: 22 August 2002 14:37 >>To: 'Tomcat Users List' >>Subject: RE: Order for starting WebApps >> >> >> >>In your web.xml, use the load-on-startup element with an ID >>of 1 (or maybe >>even 0) to ensure that servlet loads first. >> >>From the DTD: "The load-on-startup element indicates that this servlet >>should be loaded (instantiated and have its init() called) on >>the startup of >>the web application. The optional contents of these element must be an >>integer indicating the order in which the servlet should be >>loaded. If the >>value is a negative integer, or the element is not present, >>the container is >>free to load the servlet whenever it chooses. If the value is >>a positive >>integer or 0, the container must load and initialize the >>servlet as the >>application is deployed. The container must guarantee that >>servlets marked >>with lower integers are loaded before servlets marked with >>higher integers. >>The container may choose the order >>of loading of servlets with the same load-on-start-up value." >> >>John Turner >>[EMAIL PROTECTED] >> >>-----Original Message----- >>From: Collins, Jim [mailto:[EMAIL PROTECTED]] >>Sent: Thursday, August 22, 2002 9:29 AM >>To: 'Tomcat Users List' >>Subject: Order for starting WebApps >> >> >>Hi, >> >>Does anyone know how to specify the order in which Tomcat >>starts WebApps? I >>have a servlet that loads a library used by other apps and I >>need to ensure >>that this is started first. >> >>Thanks >> >>Jim. >> >> >>PLEASE READ: The information contained in this email is confidential >>and intended for the named recipient(s) only. If you are not >>an intended >>recipient of this email you must not copy, distribute or take any >>further action in reliance on it and you should delete it and >>notify the >>sender immediately. Email is not a secure method of communication and >>Nomura International plc cannot accept responsibility for the accuracy >>or completeness of this message or any attachment(s). Please >>examine this >>email for virus infection, for which Nomura International plc accepts >>no responsibility. If verification of this email is sought then please >>request a hard copy. Unless otherwise stated any views or opinions >>presented are solely those of the author and do not represent those of >>Nomura International plc. This email is intended for informational >>purposes only and is not a solicitation or offer to buy or sell >>securities or related financial instruments. Nomura >>International plc is >>regulated by the Financial Services Authority and is a member of the >>London Stock Exchange. >> >> >> >>-- >>To unsubscribe, e-mail: >><mailto:[EMAIL PROTECTED]> >>For additional commands, e-mail: >><mailto:[EMAIL PROTECTED]> >> >>-- >>To unsubscribe, e-mail: >><mailto:[EMAIL PROTECTED]> >>For additional commands, e-mail: >><mailto:[EMAIL PROTECTED]> >> > > > PLEASE READ: The information contained in this email is confidential > and intended for the named recipient(s) only. If you are not an intended > recipient of this email you must not copy, distribute or take any > further action in reliance on it and you should delete it and notify the > sender immediately. Email is not a secure method of communication and > Nomura International plc cannot accept responsibility for the accuracy > or completeness of this message or any attachment(s). Please examine this > email for virus infection, for which Nomura International plc accepts > no responsibility. If verification of this email is sought then please > request a hard copy. Unless otherwise stated any views or opinions > presented are solely those of the author and do not represent those of > Nomura International plc. This email is intended for informational > purposes only and is not a solicitation or offer to buy or sell > securities or related financial instruments. Nomura International plc is > regulated by the Financial Services Authority and is a member of the > London Stock Exchange. > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
