Jim,
Create a SetupServlet in your servlets package and use something similar as
the below part of my web.xml
you can even pass some parameters with the param-value
and if I remebmer right you put the load-on-startup tag and it should start
it on startup and initiliase whatever you want.
<servlet-name>setup</servlet-name>
<servlet-class>wallis.servlets.SetupServlet</servlet-class>
<init-param>
<param-name>props</param-name>
<param-value>/tomcat/webapps/wallis/WEB-INF/MDC.properties</param-value>
</init-param>
<load-on-startup/>
</servlet>
hope this helps
Manolis
On Sun, 9 Mar 2003, Jim Lynch wrote:
> I've got a situation where I need to initialize some session variables
> the first time in. I'd like to start execution with a servlet rather
> than a .html or .jsp page. I tried to use:
>
> <servlet-mapping>
> <servlet-name>StartServlet</servlet-name>
> <url-pattern>/*</url-pattern>
> </servlet-mapping>
>
> But I blew the stack since that caused my attempts to call anything else
> to come right back to the StartServlet.
>
> I know I can use <url-pattern>/start/*</url-pattern>
>
> and tell the user to go to http://wheverer/whatever/start
> but if they go to http://wheverer/whatever, which is natural, I would
> like them to get what they expect. I know I could put a redirection
> page to force them to go to the "start" url, but I think there's gotta
> be a way to do this. I have done a web search, but there aren't any
> unique terms that I could think of to describe the question and didn't
> find anything useful.
>
> Thanks for any pointers.
>
> Jim.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]