Hi,
I have send this mail on resin mailing list but I didn't get any response !!
So I try here hoping somebody could help me
Regards
Veronique
Hi,
I run resin 1.1 under solaris with Apache 1.3.12. I'd like to load a
servlet ( and run his init method) when the server is started ! So i
added in my resin.conf :
<servlet-mapping url-pattern='/login' servlet-name='login'/>
<servlet servlet-name='login' servlet-class='LoginHandler' load-on-startup/>
I added these 2 lines because i'd also like to be able to call this
servlet using /login instead of /servlet/LoginHandler ...
I only add in the init method a System.out.println("Login initialized");
to test this config. But it is only called when i effectively call the
servlet from a jsp page and not when i start the server !
somebody has seen this problem before ?
thanks for your help
Regards
Veronique
-----------------------------------------------------
Sorry to send this again, but I tried again and again changing some syntax ....
and it still doesn't work
I tried
<servlet servley-name='login' servlet-class='LoginHandler'>
<load-on-startup></load-on-startup>
</servlet>
...
.then I inserted a "1" between <load-on-startup></load-on-startup> to tell load it
first ....
Please help :)
regards
--------------------------------------------------
Again some more tests.... i added some init-param to verify If they were "seen"
and it returns me null !!! Should I precise somewhere that my servlet is in
WEB-INF/classes ...
Here is what i added :
<servlet servlet-name='login' servlet-class='WEB-INF/classes/LoginHandler'>
<init-param>
<param-name>baz</param-name>
<param-value>test1</param-value>
</init-param>
<load-on-startup/>
</servlet>
and in LoginHandler init method I have :
String test = conf.getInitParameter("baz");
System.out.println("Init Login : "+test);
... test is null and the init is still call when i first send a request to my
servlet !
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets