Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Tomcat and sequence of events

Reply
Thread Tools

Tomcat and sequence of events

 
 
pvsnmp@yahoo.com
Guest
Posts: n/a
 
      12-04-2005
Hi,
I have a web application with a number of servlets. I am using Tomcat.
I have configured a filter for the web application in its web.xml file.
The url pattern which the filter will match is /*. The application
servlets are present in ROOT directory, the default web application
path. I have also enabled the invoker servlet. It matches the default
url pattern /servlet/*.
Can someone explain the sequence of events that happen as a request
arrives for a servlet , with URL /servlet/xyz ? How does the filter
know where to hand the request to when it reaches
chain.doFilter(req,res) ? There are no other filters and none of the
servlets are defined in the web.xml file, so its the invoker servlet
which hands the request to servlets i guess. But how to the various
components know what is to be done next???

rgds,
Prashant

 
Reply With Quote
 
 
 
 
Hiran Chaudhuri
Guest
Posts: n/a
 
      12-04-2005
<(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed) oups.com...
> I have a web application with a number of servlets. I am using Tomcat.
> I have configured a filter for the web application in its web.xml file.
> The url pattern which the filter will match is /*. The application
> servlets are present in ROOT directory, the default web application
> path. I have also enabled the invoker servlet. It matches the default
> url pattern /servlet/*.


What do you mean by 'The application servlets are present in ROOT directory?

> Can someone explain the sequence of events that happen as a request
> arrives for a servlet , with URL /servlet/xyz ? How does the filter
> know where to hand the request to when it reaches
> chain.doFilter(req,res) ?


Tomcat fist checks the first part of the url to find the correct web
application (context).
Then it executes all the registered listeners, if their URL pattern matches.
Then it executes the servlet whose URL pattern matches.
Then it returns the response through the filters back to the browser.

> There are no other filters and none of the
> servlets are defined in the web.xml file, so its the invoker servlet
> which hands the request to servlets i guess. But how to the various
> components know what is to be done next???


That is what you specified in your web.xml. There are some more components,
such as valves. They are Tomcat internal and probably not interesting for
you.

Hiran


 
Reply With Quote
 
 
 
 
pvsnmp@yahoo.com
Guest
Posts: n/a
 
      12-05-2005
>Tomcat fist checks the first part of the url to find the correct web
>application (context).
>Then it executes all the registered listeners, if their URL pattern matches.
>Then it executes the servlet whose URL pattern matches.
>Then it returns the response through the filters back to the browser.
>Hiran


Hi,
what abt request going through filter?? How does the filter know where
handout the request once its job is done ?? In my case i am not
defining the servlets in the web.xml file.

rgds,
Prashant

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to iterate over sequence and non-sequence ? stef mientki Python 13 10-20-2007 10:21 AM
Events Events Events Please Help Chris ASP .Net Web Controls 0 08-30-2005 08:21 PM
Sequence of events John Spiegel ASP .Net 4 01-03-2005 03:30 PM
BOOT SEQUENCE (how to change boot sequence) bird Computer Support 13 12-24-2003 02:20 AM
Re: Sequence of events on a web form Craig Deelsnyder ASP .Net 0 07-27-2003 11:13 PM



Advertisments