You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Balaji <ba...@india.adventnet.com> on 2003/03/27 06:37:40 UTC

Architecture Details

Hi,
Can anyone tell me where to find the overall component architecture of 
Catalina ?

TIA
Bala


At 08:12 PM 3/26/2003 -0800, you wrote:


>On Wed, 26 Mar 2003, Koes, Derrick wrote:
>
> > Date: Wed, 26 Mar 2003 20:29:00 -0500
> > From: "Koes, Derrick" <De...@smith-nephew.com>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > To: 'Tomcat Users List' <to...@jakarta.apache.org>
> > Subject: RE: Bug #5585, #11091, #13924, #18040 Workaround ???
> >
> >
> > Sorry, no, but I've been looking for one.  I want to show MY OWN error page
> > for a 401.
> >
> > I've posted to this list about this, but to no avail thus far.
> >
> > Basic auth seems to "work" BECAUSE a 401 is "thrown" for a protected
> > resource.  Sort of makes sense, but makes it difficult to use the <error>
> > tags to get a customized error page for a 401.
> >
>
>You do realize, I hope, that it's the *browser* that decides to ignore
>whatever the server sends along with a 401 error and chooses to pop up the
>login dialog instead?
>
>Craig
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Architecture Details

Posted by Balaji <ba...@india.adventnet.com>.
Hi Craig,

Sorry about my message thread.  I didnt realize that.
Thanks for a detailed explanation.

Thanks
Bala


At 11:29 PM 3/26/2003 -0800, you wrote:


>On Thu, 27 Mar 2003, Balaji wrote:
>
> > Date: Thu, 27 Mar 2003 11:07:40 +0530
> > From: Balaji <ba...@india.adventnet.com>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > To: Tomcat Users List <to...@jakarta.apache.org>
> > Subject: Architecture Details
> >
> > Hi,
> > Can anyone tell me where to find the overall component architecture of
> > Catalina ?
> >
>
>Note:  it is considered impolite to hijack someone else's message thread
>to ask an unrelated question.  if you want to ask a new question, you
>should really post a new message rather than replying to an existing one.
>
>Your best starting point is to peruse the Catalina Javadocs that are in
>the "tomcat-docs" webapp included with Tomcat -- also available online
>(although not necessarily up to date for you particular version of
>Tomcat):
>
>   http://jakarta.apache.org/tomcat/tomcat-4.1-doc/
>
>For the question you posted on TOMCAT-DEV about how to get the current
>number of active sessions (which is really more relevant here), neither
>interceptors (Tomcat 3.3) or valves (Tomcat 4/5)  are the right way to
>approach to figuring that out.  The reason for this is that interceptors
>and valves are focused on what happens to each individual request -- and
>sessions can be created and destroyed at times that are totally
>independent of when a request comes in.
>
>For any Servlet 2.3 or later container (including Tomcat 4.x or Tomcat
>5.x) you should investigate using a javax.servlet.http.HttpSessionListener
>to detect when new sessions are created, and existing sessions are
>destroyed.  If you store the current count in some globally accessible
>location, then you can use it however you like.  For a Servlet 2.2
>container (such as Tomcat 3.3), HttpSessionListener did not exist, so you
>will have to figure out how to hand-modify the container source code.
>And, of course, you will be tying yourself to a particular version (3.3)
>of a particular container (Tomcat) now and forever.  You should think
>twice before making that sort of decision -- especially when you are
>looking at tying yourself to a version of Tomcat that will soon (when
>Tomcat 5 final is released) will be two major version numbers out of date.
>
> > TIA
> > Bala
> >
>
>Craig McClanahan
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Architecture Details

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 27 Mar 2003, Balaji wrote:

> Date: Thu, 27 Mar 2003 11:07:40 +0530
> From: Balaji <ba...@india.adventnet.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Architecture Details
>
> Hi,
> Can anyone tell me where to find the overall component architecture of
> Catalina ?
>

Note:  it is considered impolite to hijack someone else's message thread
to ask an unrelated question.  if you want to ask a new question, you
should really post a new message rather than replying to an existing one.

Your best starting point is to peruse the Catalina Javadocs that are in
the "tomcat-docs" webapp included with Tomcat -- also available online
(although not necessarily up to date for you particular version of
Tomcat):

  http://jakarta.apache.org/tomcat/tomcat-4.1-doc/

For the question you posted on TOMCAT-DEV about how to get the current
number of active sessions (which is really more relevant here), neither
interceptors (Tomcat 3.3) or valves (Tomcat 4/5)  are the right way to
approach to figuring that out.  The reason for this is that interceptors
and valves are focused on what happens to each individual request -- and
sessions can be created and destroyed at times that are totally
independent of when a request comes in.

For any Servlet 2.3 or later container (including Tomcat 4.x or Tomcat
5.x) you should investigate using a javax.servlet.http.HttpSessionListener
to detect when new sessions are created, and existing sessions are
destroyed.  If you store the current count in some globally accessible
location, then you can use it however you like.  For a Servlet 2.2
container (such as Tomcat 3.3), HttpSessionListener did not exist, so you
will have to figure out how to hand-modify the container source code.
And, of course, you will be tying yourself to a particular version (3.3)
of a particular container (Tomcat) now and forever.  You should think
twice before making that sort of decision -- especially when you are
looking at tying yourself to a version of Tomcat that will soon (when
Tomcat 5 final is released) will be two major version numbers out of date.

> TIA
> Bala
>

Craig McClanahan


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Need Help in Server.XML

Posted by Surendra Kumar <su...@cisco.com>.
Hi,
    We were using Tomcat version 3.3.1 in our product and everything wad
working fine. Recently Tomcat released 3.3.1a with
security updates. To fix the security issue we have replaced the 4 jar files
(tomcat.jar, tomcat_modules.jar, tomcat_util.jar, facade22.jar)
mentioned in the report.
    After updating the jar files our product is not working and throwing
class not found exception.
    In server.xml we have the following configuration

#####
<LoaderInterceptor11 useApplicationLoader="true" jarSeparator=";"
additionalJars="C:\PROGRA~1\myclasspath;C:\PROGRA~1\classpath" debug="10" />
#####

After updating the tomcat jar files, the dir
"C:\PROGRA~1\myclasspath;C:\PROGRA~1\classpath" is not added in the
context's
classpath and all access to class files in this directory throws "Class Not
Found Exception"

We have narrowed down the problem to "tomcat_modules.jar". If we replace
this jar file from 3.3.1 version, everything works
fine.

I have downloaded the source for 3.3.1 and 3.3.1a and i didn't find any
change in LoaderInterceptor11.java. But the size of classfiles
in both jar are not same.

I have enabled debug for this module and the only difference i could note is
an extra "/" character is missing at the end of classpath
with new jar files. following are diff

 LoaderInterceptor11:     file:C:/PROGRA~1/myclasspath
< LoaderInterceptor11:     file:C:/PROGRA~1//classpath
< LoaderInterceptor11: DEFAULT:/test adding: file:C:/PROGRA~1/myclasspath
< LoaderInterceptor11: DEFAULT:/test adding: file:C:/PROGRA~1/classpath
---
> LoaderInterceptor11:     file:C:/PROGRA~1/myclasspath/
> LoaderInterceptor11:     file:C:/PROGRA~1/classpath/
> LoaderInterceptor11: DEFAULT:/test adding:
file:C:/PROGRA~1/CSCOpx/myclasspath/
> LoaderInterceptor11: DEFAULT:/test adding:
file:C:/PROGRA~1/CSCOpx/classpath/


I need help on debugging this. Thanks for any help and suggestion.

Regards
Surendra


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Architecture Details

Posted by Balaji <ba...@india.adventnet.com>.
Hi,

Does Interceptors in 3.x and Valves in 4.x the same thing? Where do I find 
documents on writing an interceptor? I'm trying a simple example of getting 
the number of active sessions by writing a interceptor. Can anyone help me?

Kind Regards
Bala



At 11:07 AM 3/27/2003 +0530, you wrote:
>Hi,
>Can anyone tell me where to find the overall component architecture of 
>Catalina ?
>
>TIA
>Bala
>
>
>At 08:12 PM 3/26/2003 -0800, you wrote:
>
>
>>On Wed, 26 Mar 2003, Koes, Derrick wrote:
>>
>> > Date: Wed, 26 Mar 2003 20:29:00 -0500
>> > From: "Koes, Derrick" <De...@smith-nephew.com>
>> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
>> > To: 'Tomcat Users List' <to...@jakarta.apache.org>
>> > Subject: RE: Bug #5585, #11091, #13924, #18040 Workaround ???
>> >
>> >
>> > Sorry, no, but I've been looking for one.  I want to show MY OWN error 
>> page
>> > for a 401.
>> >
>> > I've posted to this list about this, but to no avail thus far.
>> >
>> > Basic auth seems to "work" BECAUSE a 401 is "thrown" for a protected
>> > resource.  Sort of makes sense, but makes it difficult to use the <error>
>> > tags to get a customized error page for a 401.
>> >
>>
>>You do realize, I hope, that it's the *browser* that decides to ignore
>>whatever the server sends along with a 401 error and chooses to pop up the
>>login dialog instead?
>>
>>Craig
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Architecture Details

Posted by Filip Hanik <ma...@filip.net>.
uuuh, it uses a
- small kernel, server/host
- it has a JMX kernel that registers and manages components
- It uses Valves (pipeline) to handle the request chain
- It uses Coyote connectors (pooled) to handle incoming requests
- Managers handle the sessions, Contexts handle the contexts including
managers

Filip

> -----Original Message-----
> From: Balaji [mailto:balaji@india.adventnet.com]
> Sent: Wednesday, March 26, 2003 9:38 PM
> To: Tomcat Users List
> Subject: Architecture Details
>
>
> Hi,
> Can anyone tell me where to find the overall component architecture of
> Catalina ?
>
> TIA
> Bala
>
>
> At 08:12 PM 3/26/2003 -0800, you wrote:
>
>
> >On Wed, 26 Mar 2003, Koes, Derrick wrote:
> >
> > > Date: Wed, 26 Mar 2003 20:29:00 -0500
> > > From: "Koes, Derrick" <De...@smith-nephew.com>
> > > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > > To: 'Tomcat Users List' <to...@jakarta.apache.org>
> > > Subject: RE: Bug #5585, #11091, #13924, #18040 Workaround ???
> > >
> > >
> > > Sorry, no, but I've been looking for one.  I want to show MY
> OWN error page
> > > for a 401.
> > >
> > > I've posted to this list about this, but to no avail thus far.
> > >
> > > Basic auth seems to "work" BECAUSE a 401 is "thrown" for a protected
> > > resource.  Sort of makes sense, but makes it difficult to use
> the <error>
> > > tags to get a customized error page for a 401.
> > >
> >
> >You do realize, I hope, that it's the *browser* that decides to ignore
> >whatever the server sends along with a 401 error and chooses to
> pop up the
> >login dialog instead?
> >
> >Craig
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org