File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Servelet  instances created in web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Servelet  instances created in web.xml" Watch "Servelet  instances created in web.xml" New topic
Author

Servelet instances created in web.xml

Sheethal Shenoy
Greenhorn

Joined: Nov 19, 2003
Posts: 3
Hello,
I have
<servlet>
<servlet-name>notify</servlet-name>
<servlet-class>org.diabetes.phd.PHDNotify</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>notify</servlet-name>
<url-pattern>notify.phd</url-pattern>
</servlet-mapping>

in my web.xml in weblogic 7.0 .But on startup i get 2 instances on the servlet.Irrespective of <load-on-startup> is 0 or 1 i get 2 instances on the servlet.Could anyone explain this behaviour.I would appreciate any help
Thanks
Sheets


Sheethal
Nitish Bahadur
Ranch Hand

Joined: Aug 25, 2003
Posts: 118
Is it implementing SingleThreadModel?
Wasim Ayoubi
Ranch Hand

Joined: Nov 21, 2004
Posts: 46
Hi there

load on startup does have nothing to do with the number of servlet instances created by the container.

as told before, check if your servlet code implements the SingleThreadModel interface.


Wasim Ayoubi<br />SCJA1.0(BETA), SCJP1.4, SCWCD1.4<br />Next ???
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servelet instances created in web.xml
 
Similar Threads
URL Mapping : Default Servlet
instances of compnents within application
Mapping for a normal servlet? Mandatory in struts?
Access servlet from subdirectory
JSF Components does not appear on the browser