• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web server knoweldge

 
Mohan Chandrasekaran
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Can any one tell, how webserver application will come to a conclusion that the incoming request is for a servlet or jsp in contrast to the html or pdf files? And how it invokes the Servlet container.

If this question looks silly. Please do forgive me and try to reply in simple statements.

Thanks in advance,
Mohan
 
Martyn Clark
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mohan
I don't know if i am getting your question correctly but if you mean web server as in apache or IIS with webapp container connected to it, the JSP extention is enough to tell the webserver to pass this request on to the container. The request for the servlet is the same but when the container recives the request for a servlet it the looks at your deployment descriptor and finds the mapping to the servlet then deals with it.
 
Mohan Chandrasekaran
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Martyn for your valuable reply.

So I understand that the order of Webserver is to search for html files. If it does not find it then it will invoke the Container and pass the request.

Is this correct?
 
vipul patel
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in HTTP request, there is a name of the resource. recourse could be HTML file or JSP page.

depanding on the name, web-server handles it. If it is servlet, container looks in to DD entry. remember <url-mapping> tag in DD? There is an entry <url-pattern>. This should match with the resource name in your HTTP request.

rest is bit obvious.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic