Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Startup servlet -Urgent

Status
Not open for further replies.

elanja

Programmer
Sep 10, 2003
13
0
0
IN
In web.xml file, What is the Meaning of <load-on-startup> for the Below Contents.

<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

where can I configure my class file in web.xml.
Is there is Any Option for servlet Class file is Loading on startup when Tomcat is Starting.

Is the above Option is there .how can i call the Startup servlet class in my servletclass(A servlet which is Locatedin webpps/examples)

By

ERams
 
>load-on-startup
All your classes that exist will be loaded when tomcat starts up.

>configure classfile?
well, you can define your file that has the classes in your
web.xml. I use struts so all my classes(servlets) exist in
struts-config.xml. To point to this file from web.xml, you need to...
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>

<servlets in webapps/examples
All servlets/classes for an application usually are placed under \WEB-INF\classes. Of course, upon deployment, you want to create a jar file and move it to \WEB-INF\lib directory.


~za~
You can't bring back a dead thread!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top