basis in servlet technology
hey any one out there plz let me wat happens interenally when the container reads thefollowing information provided as part of web.xml,as i am a beginner i am not able to under wat goes on internally.So plz help me in this regard. Let us supposesone as my servlet name andSrvone as my servlet class and/one be the url pattern for my servlet.
<web-app>
<servlet>
<servlet-name>sone</servlet-name>
<servlet-class>Srvone</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>sone</servlet-name>
<url-pattern>/one</url-pattern>
</servlet-mapping>
</web-app>
Here's what happens in your web.xml:
1.) You tell the server that there is a servlet whose name is sone. This is a name you choose to identify the servlet.
2.) Then you tell the server that the servlet you just named is actually contained in the class Srvone. This is the fully qualified class name of the where the servlet code is.
3.) To be able to access the servlet, you need to provide a mapping. So then you go on and tell the server that, you want the servlet whose name is sone to be executed when a request is made to /one.
These three steps have to be taken for your servlet to be accessible.
Clear?