RE: Scheduled task in tomcat - how?

2005-05-18 Thread Subir Sengupta
Look at the Timer and TimerTask classes, for scheduling tasks.

-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 17, 2005 7:16 PM
To: Tomcat Users List
Subject: Scheduled task in tomcat - how?

I need to create an automated task in tomcat that gets launched every
two
hours or so, does its work and then sleeps again. The task needs to send
some request values via a secure (https) POST to a cgi script running on
an
outside server, then receive the response, parse it and put it into the
database. The response doesn't return the values as request parameters,
but
instead simply returns records in CSV (comma separated values) format,
one
record per line.

So, here's what I'm pondering:
  a.. What's the best way to create that automated (scheduled) task and
run
it as a servlet under tomcat (5.5.9)?
  b.. You guys might laugh, but the last time I parsed CSV as part of
the
HTTP response was in my Perl days (looong ago) - is there some servlet
support for doing this, or do I need to code alll this stuff myself from
scratch?
  c.. Finally, what's the best approach to 'receiving' the response? The
servlet issueing the request is obviously the requester, but since this
is
running inside of tomcat, how do I route the response to that servlet?
Maybe
I'm overthinking this, but I'm not sure how a servlet can be the
recipient
of its own request. Hope this makes sense.
Any input on one or more of these questions would be appreciated.

Michael


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to do "Downtime" with a Apache/Tomcat webapp

2005-05-17 Thread Subir Sengupta
Filters work great for this.  Also, if you have a cluster, you probably
have a load balancer in front of the cluster. If you do, then you could
have the load balancer direct all your traffic to a server that runs
Apache and only served up a 'Sorry the site is down' page.  When the
site is back up you can redirect the traffic back to the servers. This
will allow you to do maintenance on the DB, Application, Tomcat etc.

Subir

-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 16, 2005 12:36 PM
To: Tomcat Users List
Subject: Re: How to do "Downtime" with a Apache/Tomcat webapp

I had a similar requirement in my app... We had a two-hour window per 
day when the app was unavailable because background tasks were 
processing.  The server was still up, and so was the app technically, 
but it was not available.

I wrote a filter to take care of this.  I had a flag in application 
context to tell if the app was up or not too, so that if I had to make 
the app unavailable during a time when it normally was available, I just

set the flag.  I also defined a single user that was still allowed to 
get in (another context parameter).  This works out great.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

Len Popp wrote:
> I've been thinking about the same problem, but I haven't gotten around
to 
> working on it seriously.
>  How about this: Instead of fiddling with the JkMount directives in
Apache, 
> swap the web.xml in your Tomcat app so it points to a minimal servlet
that 
> returns the "Out of service" page for all requests.
>  Does that sound like it would work? It would be less disruptive
because you 
> don't have to restart Apache (if there's more to the web site than the
one 
> Tomcat app). Plus this will work with stand-alone Tomcat.
> 
> On 5/15/05, Richard Mixon (qwest) <[EMAIL PROTECTED]> wrote: 
> 
>>I'm curious how folks handle letting users know that their webapp is
>>down when doing maintenance.
>>
>>We've got a pretty standard setup. Our informational/static site is
>>served by Apache 2.0.x. We use mod_jk to link to a page in our
>>webapplications, triggering CMA for authentication and login. We run
>>Tomcat 5.5.x. Although we actually have Tomcat clustered, there are
>>still times when we need to make the application unavailable. (i.e.
>>doing database schema changes, etc.).
>>
>>I would like for a page to be displayed that says the application is
>>temporarily not available.
>>
>>So, what's the best way to do this?
>>
>>One way I can think of is to modify the JkMount directives so that may
>>context name was not mapped to Tomcat, but instead to a static page -
>>the just do a restart. Trouble is some of our users have bookmarks
into
>>various pages/actions in the application - we would somehow have to
mapp
>>all pages that began with the context name to this single page. This
>>sounds a bit messy.
>>
>>Is there a more straightforward way of doing this?
>>
>>Thank you - Richard
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 4.1 and auto-redirect/URL rewrite

2005-03-07 Thread Subir Sengupta
You could write a filter to do this.  So if the filter see's the shorter
url it can redirect/forward to the longer url.

Subir

-Original Message-
From: David Wall [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 07, 2005 11:26 AM
To: Tomcat Users List
Subject: Tomcat 4.1 and auto-redirect/URL rewrite


I have a page in a tomcat 4.1 webapp that has a rather lengthy path
name, 
but I'd like to be able to email a much shorter link to avoid long links

being broken across lines by some older email clients.

With Apache HTTPD's rewrite module, this could be accomplished.  Is
there 
something similar in TC?  I'd like to map something like:

https://www.myhost.com/app/pickup?c=12345678901234567890

to

https://www.myhost.com/app/custom/customerName/applicationName/welcome.j
sp?c=12345678901234567890

I know I could create a servlet that does an auto-redirect, but I'm
looking 
to see if TC has anything that more directly will rewrite the URLs.

Thanks,
David 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Compiling JSP with Remedy Java api

2005-03-07 Thread Subir Sengupta
Hi,

I'm supporting a legacy app that uses Remedy. It's Tomcat 4.x and Java
1.4 based, but I imagine the setup should be the same.  The arapi51.jar
file goes into WEB-INF/lib. This app runs on Linux and there are some
.so files that need to be copied to $JAVA_HOME/jre/lib/i386.  The .so
files can be found in linux/api/lib if you unzip the Remedy zip file.

hth,
Subir

-Original Message-
From: Luis Mandel [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 07, 2005 6:16 AM
To: tomcat-user@jakarta.apache.org
Subject: Compiling JSP with Remedy Java api


Hi!
I have installed Tomcat 5.5.7 and java 1.5. It works perfectly. I would
like to compile some JSP pajes using the Remedy Java API (arapi51.jar).
I don't know where I have to put the jar files from this API. I've put
them here:

D:\Program Files\Apache Software Foundation\Tomcat 5.5\server\classes

But seems to be that it is not the correct place.

Following the handbook I should  the classpath at the server but I am
not sure where and how.

I would like to know if somebody has done this.

Thanks a lot in advance.

Luis Mandel

-- 
-
Dr. Luis Mandel
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Is it possible to use a parameter other than JSESSIONID to maintain session?

2005-03-01 Thread Subir Sengupta
You will have to change it in the connector source too.

Subir

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 01, 2005 3:13 PM
To: Tomcat Users List
Subject: Re: Is it possible to use a parameter other than JSESSIONID to
maintain session?


1) Checkout the source
2) issue the command

cd {tomcat src base}
find . -name '*.java' | xargs grep -i jsessionid

This will tell you all the placed jsessionid is used.

-Tim

Garth Patil wrote:

> Changing the name in Globals.java seems to partially work. Now, in 
> order to have Tomcat just use that value, and not try to rewrite it 
> (or expect it in a specific format), I need to find where in the code 
> Tomcat looks up that parameter, and where it rewrites it to the URL. 
> Can anyone familiar with the code point me in the right direction? 
> Thanks again, Garth
> 
> 
>>You *might* be able to recompile tomcat with only changing: 
>>jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals
>>.java
>>
>>-Tim
>>
>>Garth Patil <[EMAIL PROTECTED]> wrote:
>>
>>Hi,
>>I'm currently working on a server application using Tomcat, and I've 
>>run into a snag. The clients for the application are custom HTTP 
>>clients (a provider's custom client that won't be changing on our
>>behalf) that do not have the ability to persist the JSESSIONID in the 
>>request. However, there is already a unique parameter (let's call it
>>CUSTOMPARAM) that they do send with every POST to us.  I still want to

>>use Tomcat's sessioning, but I need it to do two things: 1. Use the 
>>CUSTOMPARAM as the unique session parameter. 2. Not rewrite the 
>>parameter in the response, leaving that control to my application.
>>Is there a way to just tell Tomcat in the configuration that I want it
>>to use a different parameter to identify the session, and that I don't
>>need it to rewrite it in my response? I've been through the docs, a
>>book on Tomcat 5, and the mailing list archives, and I haven't been
>>able to find anything.
>>Thanks,
>>Garth
>>
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Sniffing loaclhost traffic for HHTP headers

2005-02-21 Thread Subir Sengupta
You should be able to telnet to the Tomcat server and send it a request.
The response including headers will be visible in your telnet session.

Subir

-Original Message-
From: Marco Mastrocinque [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 21, 2005 2:09 AM
To: tomcat-user@jakarta.apache.org
Subject: Sniffing loaclhost traffic for HHTP headers


Hi All,
   Just a 'silly question,' I downloaded a HTTP sniffing program
because I want to get use to reading header information. I'm using
Apache Tomcat, on a localhost configuration for development purposes.
The sniffing program I downloaded from 'EffeTech,' in the FAQ section
states, 'Due to the mechanism of Windows operating system, a sniffer
can't capture local-to-local traffic.' Please note I found this out the
hard way! The question I have is how do you do it?

Thanks Marco Mastrocinque.
   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: compiling and deployment in tomcat

2005-02-02 Thread Subir Sengupta
1 - Yes, you have to compile them
2 - If you don't want to register your servlets in web.xml, you can use
the Invoker servlet.  However, I believe there are security issues with
it, since it will allow any servlet on your site to be run.

Subir

-Original Message-
From: Julio Macedo [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 02, 2005 2:34 PM
To: tomcat-user@jakarta.apache.org
Subject: compiling and deployment in tomcat


Hi,

 

I've just installed Tomcat 5.5 and I have two main doubts and I hope
someone may help me.

 

1. Do I really have to compile a servlet manually using javac (or using
another tool) or may I save it in a specific folder so Tomcat compiles
it to me?

 

2. Do I really have to register my servlets in web.xml file or this
process can be done automatically by Tomcat?

 

When I did the test with jsp pages, it was not necessary compile or
register the file (Tomcat did everything to me) so I expect the same
with servlets.

 

Thanks,

 

Julio

 

 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: apache2 tomcat5 jk2 questions

2005-01-06 Thread Subir Sengupta
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/news/20041100.html#2
0041115.1

-Original Message-
From: Casas, Claudia [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 06, 2005 12:49 PM
To: Tomcat Users List
Subject: RE: apache2 tomcat5 jk2 questions


No way! I just got my server completely working on jk2! 
Does anybody have any links or resources that talk about this. If this
is really a big issue, I will definitely move back to jk

-Original Message-
From: j r [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 05, 2005 6:30 PM
To: Tomcat Users List
Subject: Re: apache2 tomcat5 jk2 questions

I believe that I have read that mod_jk2 was to stop being supported as
of 11/15/04.  It might be something to think about if you start seeing
more bugs.  I have reverted all of my boxes to mod_jk which serves just
as fast for me.

-j

On Wed, 05 Jan 2005 11:32:01 -0800, Dwayne Ghant <[EMAIL PROTECTED]>
wrote:
> This should help atleat I hope:
> Your httpd.conf should look "something" like this at the bottom.
> 
>   
> JkUriSet worker ajp13:localhost:8009
> 
> 
> Have a beautiful day.
> Casas, Claudia wrote:
> 
> >Thanks! Tomcat now works for every user directory!  : )
> >But I still do not know how to make apache forward my jsp request to 
> >tomcat. I used to include Jkmount option in my httpd.conf, but now I 
> >have not idea.
> >I have read about a JkSet but not sure how to use it. I have also
read
> >that you can have this configuration in the jk2.properties, but do
not
> >know how either. If you could point me to the right direction I would

> >really appreciate it.
> >
> >I basically need to be able to view my jsp's through apache as: e.g. 
> >http://myserver/~userdir/myfile.jsp
> >
> >-Original Message-
> >From: Dwayne Ghant [mailto:[EMAIL PROTECTED]
> >Sent: Wednesday, January 05, 2005 11:03 AM
> >To: Tomcat Users List
> >Subject: Re: apache2 tomcat5 jk2 questions
> >
> >Please Read your Documentation at this page 
> >http://myserver:8080/tomcat-docs/config/host.html
> >and that should answer your question.
> >
> >Read the section that says:
> >User Web Applications
> >
> >Casas, Claudia wrote:
> >
> >
> >
> >>Hello everybody,
> >>I have configured jk2 successfully finally to work with apache and 
> >>tomcat.
> >>
> >>#!Question 1
> >>I have included the following in my server.xml file:  >>path="/ccasas" docBase="/home/ccasas/wwwdocs" debug="0"
> >>   reloadable="true" crossContext="true">
> >>
> >>
> >>This allows me to see my jsp file as : 
> >>http://myserver:8080/ccasas/myfile.jsp
> >>  which is what I want to be able
to
> >>access my jsp files from my homedir. BUT
> >>
> >>MY QUESTION IS:
> >>How do I tell apache to forward this request to tomcat. In other
words,
> >>when I access http://myserver/ccasas/mnyfiles.jsp is only reading
the
> >>file as text.
> >>
> >>Previously I had added a Jkmount option inside my httpd.conf, but it

> >>does not like it right now.
> >>
> >>
> >>#Question 2
> >>Is there a way to specify my context path so that it will handle all
my
> >>homedirs. In apache I use a wildcard (/home/*/wwwdocs) to handle all
of
> >>my home directories. Is there anything like this in tomcat that I
can
> >>use??
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> 
> --
> 
> Dwayne A. Ghant
> Application Developer
> Temple University
> 215.204.
> [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Request an app test (free beer!)

2004-12-20 Thread Subir Sengupta
RH Linux v9:

Linux

-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 20, 2004 2:26 PM
To: Commons User; Struts User; Tomcat User
Subject: [OT] Request an app test (free beer!)


I was informed last OT post I made that the subject should always 
include the word "beer".  I added the "free" to get your attention :)

I'm working on something for which I need to know what the os.name 
property on various OS's is.  I would greatly appreciate it if some 
folks could try the following:

public class test {
public static void main(String[] args) {
System.out.println(System.getProperty("os.name"));
}
}

I'm particularly interested in various *nix variants, Linux, Mac and 
such.  Windows I already have answers for (although some verification to

be sure nothing fishy is going on wouldn't hurt).

If you could just post your OS and what the result was, I would greatly 
appreciate it.  Thanks in advance!

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Know of a group for JSP development?

2004-09-22 Thread Subir Sengupta
Sun has one: http://forum.java.sun.com/forum.jsp?forum=45

Subir

-Original Message-
From: Jarl Skogsholm [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 20, 2004 7:16 PM
To: Tomcat Users List
Subject: Re: Know of a group for JSP development?


Join a java group, join a html group, combine what you learn.  ;)


On Mon, 20 Sep 2004 13:14:46 -0700 (PDT), Justin Jaynes 
<[EMAIL PROTECTED]> wrote:

> I realize this group is NOT for JSP development
> questions.  Does anyone know of such a group?
>
> I have exhausted my books in looking for answers and
> would like to chat with other JSP developers.
>
> My appreciation for all this list has already done for
> me.
>
> Justin Jaynes
>

-- 
They that can give up essential liberty to obtain a little temporary 
safety deserve neither liberty nor safety.
-- Benjamin Franklin (1755)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: ?how configure tomcat to auto startup in linux?

2004-05-03 Thread Subir Sengupta
There are instructions on how to do this on Oscar Carrillo's site.

http://www.linuxjava.net/howto/webapp/#daemons

Subir

-Original Message-
From: Ing. Enrique de la Barrera Perez [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 03, 2004 7:29 PM
To: Tomcat Users List
Subject: Re: ?how configure tomcat to auto startup in linux?


I can start/stop my tomcat fine and applications are running ok, i just need tomcat to 
autostart when system up.

Linux version?
>>Redhat Linux 9.0

Machine?(Intel?)
>>Intel

JDK version?
>>jdk 1.4.2_04

Tomcat 5 Correct?
>>5.0.19

Planned use? Develop Production Internet Intranet
>>Production Internet

Will port 8080 serve your needs or do you need port 80?
>>Currently running on port 80

Thanks for your time
ebarrera

- Original Message -
From: "Ing. Enrique de la Barrera Perez" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, May 03, 2004 10:04 PM
Subject: Re: ?how configure tomcat to auto startup in linux?


> Sorry, but i´m not a linux expert, so, this idea would be perfect but 
> not for me.
>
> I have followed the instructions in 
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/setup.html
> and everything seems to be ok, just that Tomcat dont start up:
>
> cd $CATALINA_HOME/bin
> tar xvfz jsvc.tar.gz
> cd jsvc-src
> autoconf
> ./configure
> make
> cp jsvc ..
> cd ..
>
> cd $CATALINA_HOME
> ./bin/jsvc -Djava.endorsed.dirs=./common/endorsed -cp 
> ./bin/bootstrap.jar \
> -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
> org.apache.catalina.startup.Bootstrap
>
> When i type this last command nothing happens, or at least, Tomcat 
> dont start up ¿any guide about what i have to do?
>
> Regards
> ebarrera
>
>
> - Original Message -
> From: "QM" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, May 03, 2004 3:36 PM
> Subject: Re: ?how configure tomcat to auto startup in linux?
>
>
> > On Mon, May 03, 2004 at 06:20:04PM -0700, Ing. Enrique de la Barrera
Perez
> wrote:
> > : Hello Tomcat users ???
> > : ?could somebody tell when to find documentation to configure 
> > tomcat to
> auto
> > : startup in linux?
> >
> > Check /etc/init.d for examples of start scripts.
> > Clone one of those and you're in business.
> >
> > You can then use plain old "su," "jsvc" (search apache.org), or 
> > "erni" (brandxdev.net) to start the process as the Tomcat user 
> > instead of root.
> >
> > -QM
> >
> > --
> >
> > software  -- http://www.brandxdev.net
> > tech news -- http://www.RoarNetworX.com
> >
> >
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: coreservlets

2004-04-12 Thread Subir Sengupta
I have the "More Servlets" book.  It's excellent. Highly recommended.

Subir

-Original Message-
From: Schalk [mailto:[EMAIL PROTECTED] 
Sent: Sunday, April 11, 2004 6:04 AM
To: 'Tomcat Users List'
Subject: RE: coreservlets
Importance: High


I have the first edition, it is pretty nice and very detailed. Have not
looked at the other book or the second edition but think the newer books
will be a better bet.

Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.com
 
This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in
error, please notify me immediately so that I can correct and delete the
original email. Thank you. 

:: -Original Message-
:: From: electroteque [mailto:[EMAIL PROTECTED]
:: Sent: Sunday, April 11, 2004 11:34 AM
:: To: Tomcat Users List
:: Subject: coreservlets
:: 
:: I found this place pretty extensive, I may buy the books, would
anyone
:: recommend these ?
:: 
:: www.coreservlets.com
:: 
:: 
:: -
:: To unsubscribe, e-mail: [EMAIL PROTECTED]
:: For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can someone help me to fix the soft link problem in Tomcat 4.1.27

2004-04-09 Thread Subir Sengupta
Kam,

Your war file should still get unpacked.  Having a context defined will
not affect that.  You probably have a misconfiguration in your
server.xml.  If you post your server.xml here then someone may spot the
problem.

Subir

-Original Message-
From: Kam Lung Leung [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 09, 2004 2:44 PM
To: [EMAIL PROTECTED]
Subject: RE: Can someone help me to fix the soft link problem in Tomcat
4.1.27


Thank Subir,

The link does help me to fix the problem. After creating a context for
my web component DistributedInputOutput in the server.xml file. Tomcat
is no longer unpack my web componemt DistributeInputOutput.war at
startup. Tomcat complains the directory is not accessible. In fact
Tomcat will not unpack any web components said myWebComp.war when there
is a Context defined in the server.xml. However, Tomcat does unpack
other web components when the server.xml does not contains a Context
defined for this web component.  I come to a conclusion is that the
Context is used for web component that need not to be unpacked when
Tomcat startup. Another the way to say this is that if I need the web
component to be unpack when Tomcat startup, then I should not defined a
Context for that web component in the server.xml. Please let me know if
this is not the case.

Thank,
Kam
 

On Thu, 8 Apr 2004 16:12:50 -0700, "Subir Sengupta" wrote:

> 
> http://marc.theaimsgroup.com/?l=tomcat-user&m=105159411609623&w=2
> 
> 
> -Original Message-
> From: Kam Lung Leung [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 08, 2004 2:54 PM
> To: [EMAIL PROTECTED]
> Subject: Can someone help me to fix the soft link problem in Tomcat
> 4.1.27
> 
> 
> Hi,
> 
> I installed Tomcat 4.1.27 on our server and drop a myApp.war into the 
> webapps directory. We restart Tomcat and wait for it to finish to 
> unpack all web components, then we stop Tomcat. We create a soft link 
> within our web component to point to directory outside the root 
> context of our web component. But Tomcat says the requested resource 
> is not available when we try to access the soft linked directory from 
> the browser. In fact a "null" shows up in the last modified column. 
> Can someone please tell me what to do to fix this problem. Your help 
> is greatly appreciated.
> 
> Kam
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


Kam Lung Leung
Vice President of Engineering 
Wireless Web Access Inc.
(303) 627-9684

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can someone help me to fix the soft link problem in Tomcat 4.1.27

2004-04-08 Thread Subir Sengupta
http://marc.theaimsgroup.com/?l=tomcat-user&m=105159411609623&w=2


-Original Message-
From: Kam Lung Leung [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 08, 2004 2:54 PM
To: [EMAIL PROTECTED]
Subject: Can someone help me to fix the soft link problem in Tomcat
4.1.27


Hi,

I installed Tomcat 4.1.27 on our server and drop a myApp.war into the
webapps directory. We restart Tomcat and wait for it to finish to unpack
all web components, then we stop Tomcat. We create a soft link within
our web component to point to directory outside the root context of our
web component. But Tomcat says the requested resource is not available
when we try to access the soft linked directory from the browser. In
fact a "null" shows up in the last modified column. Can someone please
tell me what to do to fix this problem. 
Your help is greatly appreciated.

Kam

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Configure Apache for running Perl(cgi)

2004-03-18 Thread Subir Sengupta
Here's an article that should help.

http://www.ftponline.com/javapro/2003_03/online/perl_teden_03_18_03/defa
ult.aspx

Subir

-Original Message-
From: Vivek Sivagiri [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 18, 2004 12:51 PM
To: Tomcat Users List
Subject: Re: Configure Apache for running Perl(cgi)


Thanks for the info, Subir!!
I am trying various options like uncommenting the cgi-mapping in the
web.xml file and renaming the servlets-cgi.jar. The default directory is
..webapps/ROOT/WEB-INF/cgi. I have my script mail.pl in the cgi folder.
What would be my calling URL?

Thanks
Vivek


- Original Message -
From: "Emerson Cargnin" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, March 18, 2004 3:42 PM
Subject: Re: Configure Apache for running Perl(cgi)


> so the answer is : You can't (AFAIK), run PERL scripts under Tomcat, 
> Tomcat supports just servlets/JSP. :)
>
> Emerson
>
> Subir Sengupta wrote:
> > He's on the right mailing list.  He clearly asked for help running 
> > Perl scripts on Apache Tomcat.
> >
> > Subir
> >
> > -Original Message-
> > From: Cindy Ballreich [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 18, 2004 10:44 AM
> > To: Tomcat Users List
> > Subject: Re: Configure Apache for running Perl(cgi)
> >
> >
> > This list is for users of the Tomcat servlet container. While it may

> > contain information about how Tomcat interacts with Apache, it is 
> > not an Apache web server list. Perhaps you are looking for this... 
> > http://httpd.apache.org/lists.html#http-users
> >
> > At 01:01 PM 3/18/04 -0500, Vivek Sivagiri wrote:
> >
> >>How would this be incorrect for this message board?
> >>It is a question about configuring Apache for CGI scripts.
> >>
> >>
> >>- Original Message -
> >>From: "Emerson Cargnin" <[EMAIL PROTECTED]>
> >>To: "Tomcat Users List" <[EMAIL PROTECTED]>
> >>Sent: Thursday, March 18, 2004 1:02 PM
> >>Subject: Re: Configure Apache for running Perl(cgi)
> >>
> >>
> >>
> >>>I think you are on the wrong list ;)
> >>>
> >>>
> >>>Vivek Sivagiri wrote:
> >>>
> >>>>Hi
> >>>>I need to run Perl scripts as CGI on Apache Tomcat.
> >>>>How do I need to configure the server?
> >>>>
> >>>>Thanks
> >>>>Vivek
> >>>
> >>>
> >>>--
> >>>Emerson Cargnin
> >>>Analista de Sistemas
> >>>Setor de Desenvolvimento de Sistemas - TRE-SC
> >>>tel : (048) - 251-3700 - Ramal 3181
> >>>
> >>>
> >>>---
> >>>--
> >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>For additional commands, e-mail:
[EMAIL PROTECTED]
> >>
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >
> >
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Emerson Cargnin
> Analista de Sistemas
> Setor de Desenvolvimento de Sistemas - TRE-SC
> tel : (048) - 251-3700 - Ramal 3181
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Configure Apache for running Perl(cgi)

2004-03-18 Thread Subir Sengupta
He's on the right mailing list.  He clearly asked for help running Perl
scripts on Apache Tomcat.

Subir

-Original Message-
From: Cindy Ballreich [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 18, 2004 10:44 AM
To: Tomcat Users List
Subject: Re: Configure Apache for running Perl(cgi)


This list is for users of the Tomcat servlet container. While it may
contain information about how Tomcat interacts with Apache, it is not an
Apache web server list. Perhaps you are looking for this...
http://httpd.apache.org/lists.html#http-users

At 01:01 PM 3/18/04 -0500, Vivek Sivagiri wrote:
>How would this be incorrect for this message board?
>It is a question about configuring Apache for CGI scripts.
>
>
>- Original Message -
>From: "Emerson Cargnin" <[EMAIL PROTECTED]>
>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>Sent: Thursday, March 18, 2004 1:02 PM
>Subject: Re: Configure Apache for running Perl(cgi)
>
>
>> I think you are on the wrong list ;)
>> 
>> 
>> Vivek Sivagiri wrote:
>> > Hi
>> > I need to run Perl scripts as CGI on Apache Tomcat.
>> > How do I need to configure the server?
>> > 
>> > Thanks
>> > Vivek
>> 
>> 
>> --
>> Emerson Cargnin
>> Analista de Sistemas
>> Setor de Desenvolvimento de Sistemas - TRE-SC
>> tel : (048) - 251-3700 - Ramal 3181
>> 
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Configure Apache for running Perl(cgi)

2004-03-18 Thread Subir Sengupta
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cgi-howto.html

-Original Message-
From: Vivek Sivagiri [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 18, 2004 10:02 AM
To: Tomcat Users List
Subject: Re: Configure Apache for running Perl(cgi)


How would this be incorrect for this message board?
It is a question about configuring Apache for CGI scripts.


- Original Message - 
From: "Emerson Cargnin" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, March 18, 2004 1:02 PM
Subject: Re: Configure Apache for running Perl(cgi)


> I think you are on the wrong list ;)
> 
> 
> Vivek Sivagiri wrote:
> > Hi
> > I need to run Perl scripts as CGI on Apache Tomcat.
> > How do I need to configure the server?
> > 
> > Thanks
> > Vivek
> 
> 
> --
> Emerson Cargnin
> Analista de Sistemas
> Setor de Desenvolvimento de Sistemas - TRE-SC
> tel : (048) - 251-3700 - Ramal 3181
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Java Hosting

2004-03-10 Thread Subir Sengupta
Myjavaserver isn't accepting new users.

Subir

-Original Message-
From: Rick Umali [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 10, 2004 10:25 AM
To: Tomcat Users List
Subject: Re: Java Hosting


Hello:

> Does anyone know of a good hosting company that hosts Java?

If your needs are modest, you might look at 

http://www.myjavaserver.com

It boasts some decent facilities for application deployment, but no
ssh/telnet access. There are other constraints, but for my simple
requirements (i.e. learning), it's suitable. Check out:

http://www.myjavaserver.com/~rickumali
-- 
Rick Umali[EMAIL PROTECTED]www.rickumali.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat ports

2004-03-05 Thread Subir Sengupta
You will also have to run Tomcat as root if you use port 80.

-Original Message-
From: Reynir Þór Hübner [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 05, 2004 2:30 PM
To: Tomcat Users List
Subject: Re: Tomcat ports


Hi,
Try opening up /tomcat-home/conf/server.xml
there you can set the connector to use what ever port you like. (try 
searching for 8080).

hope it helps
-reynir



Ralph Merrick wrote:

>Can anyone tell me, how to configure tomcat to work with a port, less 
>than 1024, port 80 to be exact.
> 
>Thanks
>a ton
>
>
>-
>Do you Yahoo!?
>Yahoo! Search - Find what you're looking for faster.
>  
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: mod_deflate with mod_jk2

2004-03-04 Thread Subir Sengupta
Here's what I have in my httpd.conf file and it works fine with Tomcat.


#Compress everything except images

# Insert filter
SetOutputFilter DEFLATE
 
 # Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# Don't compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|swf|wav|doc|pdf)$
no-gzip dont-vary

SetEnvIfNoCase Request_URI \.* dont-vary 

 

DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio


Hope that helps,
Subir

-Original Message-
From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 04, 2004 8:56 AM
To: Tomcat Users List
Subject: mod_deflate with mod_jk2


On my site, I have Apache 2.0 fronting Tomcat 4.1 using the mod_jk2
connector.

I'm trying to enable mod_deflate to automatically compress output from
Tomcat, using this line in my apache config:

AddOutputFilterByType DEFLATE text/html

But the DEFLATE filter is ignoring output from Tomcat, while static html
content (served by apache) is correctly being deflated.

Am I missing something, or is it impossible for mod_jk2 and mod_deflate
to play nice together? Maybe I need to add a compression filter at the
Tomcat level instead? (This seems silly).

Thank you,

Bryan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JK2 config problem [RESOLVED]

2004-02-26 Thread Subir Sengupta
Did you forget the attachment?

-Original Message-
From: Kent Boogaart [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 25, 2004 7:30 PM
To: '[EMAIL PROTECTED]'
Subject: JK2 config problem [RESOLVED]


Typical - as soon as I post I figure it out. All I had to do was alter
the second IIS site so that the 'jakarta' virtual directory points to
the same location as the first site (D:\tomcat41\bin\native\).

With that modification, the existing workers2.properties file correctly
forwards requests based on the host IP. In fact, the workers2.properties
file can be simplified even further to be more readable. A simplified
version is attached.

Hope this info is useful to others . . .

Regards,
Kent




Hello all,

Here's my problem: I would like to have two Tomcat processes running on
the one machine, each with a my web-app available via the default
context ("/"). Furthermore, I would like each site to be available via
IIS. I have tried for days to get this up and running but with no luck.
I could not find any substantial documentation on workers2.properties
configuration anywhere. Therefore I have been cross-referencing with JK1
configuration and with the JK2 source code. Following is my set up.


Tomcat 1

Directory: D:\tomcat41\
Name: Development

The jk2.properties for this tomcat contains: channelSocket.port=8009

The workers2.properties for this tomcat (which is shared for all
Tomcats) is attached. As you can see, I have tried to resolve requests
from the different IP addresses to the different Tomcats.

The server.xml file for this tomcat contains this connector definition:

   



Tomcat 2

Directory: D:\tc_system_test\
Name: System test

The jk2.properties for this tomcat contains: channelSocket.port=8010

The server.xml file for this tomcat contains exactly the same connector
definition as Tomcat 1 except the port is 8010 instead of 8009.


IIS Site 1 (Development)

IP: 203.8.163.166
jakarta virtual dir points to: D:\tomcat41\bin\native\


IIS Site 2 (System Test)

IP: 203.8.163.164
jakarta virtual dir points to: D:\tc_esm_system_test\bin\native\


Symptons

When I navigate to the development site via http://203.8.163.166/ it
works and I get my default page. When I navigate to the system test site
via http://203.8.163.164/ I get a "zero size reply" error. If I go
directly to Tomcat everything works OK.

Looking at the ISAPI logs I can see that the development site logs this:

HttpFilterProc started
Virtual Host redirection of 203.8.163.166 : 80
[/index.jsp] is a servlet url - should redirect to
ajp13:203.8.163.166:8009 check if [/index.jsp] is pointing to the
web-inf directory HttpExtensionProc started HttpExtensionProc got a
worker for name ajp13:203.8.163.166:8009
channelSocket.receive(): Error receiving message body -1 53
workerEnv.processCallbacks() Error reading reply
ajp13.service() ajpGetReply recoverable error 12
handler.response() Header[0] [Content-Type] =
[text/html;charset=ISO-8859-1]
handler.response() Header[1] [Content-Length] = [61]
handler.response(): status=200 headers=2
Into jk_ws_service_t::head
Into jk_ws_service_t::write
HttpExtensionProc service() returned OK

System test, on the other hand, contains this in the log:

HttpFilterProc started
In HttpFilterProc Virtual Host redirection of 203.8.163.164 : 80
HttpFilterProc [/index.jsp] is a servlet url - should redirect to
ajp13:203.8.163.164:8010 HttpFilterProc check if [/index.jsp] is
pointing to the web-inf directory

It repeats these four lines 9 or 10 times and never reaches the
HttpExtensionProc. Looking at the code I can see that the threadPool
registry entry affects how the HttpExtensionProc is executed. I tried
changing it from the existing value of 5 (which does not use a pool) to
10 (which should use the pool). It had no effect.


Can anyone shed some light on this? I hope I have been clear in my
explanation of the problem. If not, I would be happy to clarify. Thanks
heaps for any help.

Kent



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Weird Problems

2004-02-10 Thread Subir Sengupta
Netscape uses the favicon.ico too



-Original Message-
From: Vernon Wu [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 10, 2004 2:02 PM
To: Tomcat Users List
Subject: RE: Weird Problems


Hi, Mike,

>There aren't any 'subtypes' of 404, and there is no way for a request 
>to be 404 at one point in its life, and then "finally" a 200.
> 
>To avoid the 404 you're seeing, why not put a favicon.ico gif image in 
>the root of the web directory?  It can be a transparent gif. It's an 
>annoyance, courtesy of certain versions of IE.

That is a good work-around solution. Hopefully, that is the only cause
of all of nonsense 404 error. 

Wait a minute. I didn't use IE at all when I tested this problem this
morning. What I had is the Netscape 7.1. I don't know whether this
browser pretend itself as IE or not. 

Vernon



Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default
.asp?SRC=lycos10

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: preloading JSPs

2004-02-05 Thread Subir Sengupta
Use the jspc precompile script to precompile your jsp's.  The script is
in Tomcats bin directory.

-Original Message-
From: Alex Korneyev [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 05, 2004 8:12 AM
Cc: Tomcat Users List
Subject: preloading JSPs


Hello,

 all of my .jsp files are located on a network drive, so it takes much
longer for them to be compiled the first time around. So, is there an
option in 4.1.29 to preload and pre compile all the .jsp fles on  start
up?

 best regards,

 alex k


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problem with redirecting .jsp file requests with .htaccess

2004-01-30 Thread Subir Sengupta
Sorry, cut and paste problem!  Here's the correct link.

See Stefanos Karasavvidis's workaround toward the bottom of the bug
report.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25055 

Subir

-Original Message-
From: Francois Masson [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 30, 2004 12:02 AM
To: Tomcat Users List
Subject: Re: Problem with redirecting .jsp file requests with .htaccess



Hi,

Thanks for your answer, but I guess the link you sent is invalid. When I

follow the link, I get an error message from the Apache Bug Database 
that the "The bug number is invalid"....

Francois


Subir Sengupta wrote:

>Could it be this bug: 
>http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3D25055=20
><http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3D25055=20>
>
>-Original Message-
>
>From: Francois Masson [mailto:[EMAIL PROTECTED]
><mailto:[EMAIL PROTECTED]>
>
>Sent: Thursday, January 29, 2004 5:27 AM
>
>To: [EMAIL PROTECTED]
>
>Subject: Problem with redirecting .jsp file requests with .htaccess
>
> 
>
> 
>
>Hi,
>
>I am using Apache 2, Tomcat 4.1.29 and the ajp13 connector (under 
>Fedora
>
>FC1) to connect Apache and Tomcat together. I have a problem with 
>the=20 .htaccess directives for .jsp files. In the httpd.conf 
>config,=20 AllowOverride is set to All in order to process the 
>directives that I=20 put in the .htaccess file. The redirection 
>directives works fine for all
>
>kind of files (html, jpg,...) but .jsp pages. The problem seems to 
>be=20 that the .htaccess directives used for redirecting some specific 
>.jsp=20 requests are ignored by Apache who transmits directly the 
>request to Tomcat.
>
>For instance, if I want Apache to redirect the files file1.html and=20 
>file1.jsp to respectively file2.html and file2.jsp, I put the 
>following=20 directives in my .htaccess file in the same directory:
>
>Redirect /file1.html http://mywebsite.com/file2.html 
><http://mywebsite.com/file2.html>
>
>Redirect /file1.jsp http://mywebsite.com/file2.jsp 
><http://mywebsite.com/file2.jsp>
>
>The first redirection works perfectly fine (i.e.=20 
>http://mywebsite.com/file1.html <http://mywebsite.com/file1.html>  is 
>redirected to=20 http://mywebsite.com/file2.html 
><http://mywebsite.com/file2.html> ), but the second redirection fails. 
>I=20 cannot manage to redirect http://mywebsite.com/file1.jsp 
><http://mywebsite.com/file1.jsp>  to=20 http://mywebsite.com/file2.jsp 
><http://mywebsite.com/file2.jsp> .
>
>Can anyone help ? It seems to me that the JkMount /*.jsp wrkr 
>directives
>
>has full priority over the redirection mechanism of .htaccess files ?
>
>Thanks in advance for your help.
>
>Francois
>
> 
>
> 
>
> 
>
>-
>
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problem with redirecting .jsp file requests with .htaccess

2004-01-29 Thread Subir Sengupta
Could it be this bug:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3D25055=20
 

-Original Message-

From: Francois Masson [mailto:[EMAIL PROTECTED]
 

Sent: Thursday, January 29, 2004 5:27 AM

To: [EMAIL PROTECTED]

Subject: Problem with redirecting .jsp file requests with .htaccess

 

 

Hi,

I am using Apache 2, Tomcat 4.1.29 and the ajp13 connector (under Fedora

FC1) to connect Apache and Tomcat together. I have a problem with the=20
.htaccess directives for .jsp files. In the httpd.conf config,=20
AllowOverride is set to All in order to process the directives that I=20
put in the .htaccess file. The redirection directives works fine for all

kind of files (html, jpg,...) but .jsp pages. The problem seems to be=20
that the .htaccess directives used for redirecting some specific .jsp=20
requests are ignored by Apache who transmits directly the request to
Tomcat.

For instance, if I want Apache to redirect the files file1.html and=20
file1.jsp to respectively file2.html and file2.jsp, I put the
following=20 directives in my .htaccess file in the same directory:

Redirect /file1.html http://mywebsite.com/file2.html
 

Redirect /file1.jsp http://mywebsite.com/file2.jsp
 

The first redirection works perfectly fine (i.e.=20
http://mywebsite.com/file1.html   is
redirected to=20 http://mywebsite.com/file2.html
 ), but the second redirection fails.
I=20 cannot manage to redirect http://mywebsite.com/file1.jsp
  to=20 http://mywebsite.com/file2.jsp
 .

Can anyone help ? It seems to me that the JkMount /*.jsp wrkr directives

has full priority over the redirection mechanism of .htaccess files ?

Thanks in advance for your help.

Francois

 

 

 

-

To unsubscribe, e-mail: [EMAIL PROTECTED]

For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problem with redirecting .jsp file requests with .htaccess

2004-01-29 Thread Subir Sengupta
Could it be this bug?
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3D25055=20

-Original Message-
From: Francois Masson [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 29, 2004 5:27 AM
To: [EMAIL PROTECTED]
Subject: Problem with redirecting .jsp file requests with .htaccess



Hi,

I am using Apache 2, Tomcat 4.1.29 and the ajp13 connector (under Fedora

FC1) to connect Apache and Tomcat together. I have a problem with the=20
.htaccess directives for .jsp files. In the httpd.conf config,=20
AllowOverride is set to All in order to process the directives that I=20
put in the .htaccess file. The redirection directives works fine for all

kind of files (html, jpg,...) but .jsp pages. The problem seems to be=20
that the .htaccess directives used for redirecting some specific .jsp=20
requests are ignored by Apache who transmits directly the request to
Tomcat.

For instance, if I want Apache to redirect the files file1.html and=20
file1.jsp to respectively file2.html and file2.jsp, I put the
following=20 directives in my .htaccess file in the same directory:

Redirect /file1.html http://mywebsite.com/file2.html
Redirect /file1.jsp http://mywebsite.com/file2.jsp

The first redirection works perfectly fine (i.e.=20
http://mywebsite.com/file1.html is redirected to=20
http://mywebsite.com/file2.html), but the second redirection fails. I=20
cannot manage to redirect http://mywebsite.com/file1.jsp to=20
http://mywebsite.com/file2.jsp.

Can anyone help ? It seems to me that the JkMount /*.jsp wrkr directives

has full priority over the redirection mechanism of .htaccess files ?

Thanks in advance for your help.

Francois




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: how can I change a variable on the fly with shutting down tomcat

2004-01-29 Thread Subir Sengupta
Yes you can do this with the java.nio classes.  Check out this article
http://sys-con.com/story/?storyid=3D37288

Subir

-Original Message-
From: Mike Kenny - CPX Mngd Services
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 28, 2004 10:39 PM
To: Tomcat Users List
Subject: RE: how can I change a variable on the fly with shutting down
tomcat


This is more of a question than an answer, but does java have anything
like C's mmap()? Which allowed you to map files into memory such that
changes to either the file or the area in memory updated the other. I
know that this may be too OS specific to satisfy Java's platform
independence, but this posting got me thinking about it.

Mike

-Original Message-
From: tom ly [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 28, 2004 9:55 PM
To: [EMAIL PROTECTED]
Subject: how can I change a variable on the fly with shutting down
tomcat


I have a variable stored in memory which will be returned for certain
xml-rpc requests in tomcat/axis, it needs a initial value upon startup
of tomcat.  But then I need to be able to change this variable on the
fly without shutting down tomcat and then have it be permanently changed
afterwards.  What can I do? I've though about using a text file.  But I
want to read from this text file once only during startup of tomcat,
store the value in memory for fast access but then be able to change the
value in memory as well as the text file on the fly.  What can i use to
do this? or is there a better way? Regards, Tom Ly



-
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: disable taglib pooling jspc

2004-01-23 Thread Subir Sengupta
You cannot.  JSPC enables tag pooling by default and there is no switch
to disable it.

-Original Message-
From: Faine, Mark [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 22, 2004 10:02 AM
To: '[EMAIL PROTECTED]'
Subject: disable taglib pooling jspc


I have successfully configured tomcat 4.1.27 to disable tag pooling by
using the enablePooling init parameter but how do I do the same with an
ant precompile script.
 
I am using the script from http://www.apache.org/~fhanik/precompile.html
 
 
The script workds correctly but the resulting class files have taglib
pooling issues.
 
Thanks,
-Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to find the differences between versions?

2004-01-15 Thread Subir Sengupta
Look in the Release notes.  There is a list of new features and bug
fixes, with the version number it was added/fixed in.  So look for any
version number higher than 4.1.12 to see what changed.

Subir

-Original Message-
From: Glanville, Jay [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 1:30 PM
To: [EMAIL PROTECTED]
Subject: How to find the differences between versions?


What is the best way that I can find all the issues that were resolved
in between 4.1.12 and 4.1.29?  Basically, my manager wants to know if we
should upgrade to 4.1.29, and he wants to see a list of all the issues
that were closed since 4.1.12?

JDG

--
Jay Glanville
Web Developer

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JNI & loadLibrary

2004-01-13 Thread Subir Sengupta
Put the class in common/lib

-Original Message-
From: Maxime Colas des Francs [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 12, 2004 9:38 AM
To: Tomcat Users List
Subject: JNI & loadLibrary


Hi

Tomcat 5.0.16 release-note says :

"... the application must also ensure that the library is
not loaded more than once.  If the above code were placed in a class
inside the web application (i.e. under /WEB-INF/classes or
/WEB-INF/lib), and the application were reloaded, the loadLibrary() call
would be attempted a second time.

To avoid this problem, place classes that load native libraries outside
of the web application, and ensure that the loadLibrary() call is
executed only once during the lifetime of a particular JVM."

How can i do that ?

thks for help 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: GZIP-encoding/mod_gzip and Tomcat??

2003-12-01 Thread Subir Sengupta
If you're using Apache 2.x then you need mod_deflate

http://httpd.apache.org/docs-2.0/mod/mod_deflate.html

Subir

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 01, 2003 8:12 AM
To: Tomcat Users List
Subject: Re: GZIP-encoding/mod_gzip and Tomcat??


mod_gzip works with jk

Just make sure that you have the following:
mod_gzip_dechunk  Yes

-Tim

Mike Baroukh wrote:
>>No need for it in the connector if you're using apache! :)
>>You can get a mod_gzip module and do it from Apache which would 
>>probably be faster.
> 
> 
> Are you sure ?
> Has somebody already used mod_gzip with Apache & Tomcat ?
> 
> I use it with Resin, but it was not possible with tomcat because 
> mod_jk replied directly to the client (so I think ...). There was many

> message on newsgroups about this. We had to adapt the sample gzip 
> filter provided with tomcat.
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problems following symlinks

2003-11-24 Thread Subir Sengupta
Put this line in your context, in server.xml.



Subir

-Original Message-
From: John Prout [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 24, 2003 12:24 PM
To: Tomcat Users List (E-mail)
Subject: Problems following symlinks


Using Tomcat, I am not able to open a JSP page, when the page is a
symlink to another file. When I replace the symlink with the file,
everything works fine.

Googling around, I've found some mention of Tomcat not following
symlinks by default, but that there's an attribute "allowLinking" to
over-ride this behavior, but I haven't been able to find where to put
this. 

Does anyone know a fix to this problem?

I am running Tomcat 4.1.? embedded in JBoss 3.2.2, running on Redhat
Linux 9.0

Thanks in advance

John 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Connecting Apache 2.0.47 to Tomcat 4.0.6

2003-10-31 Thread Subir Sengupta
Apache 2.0.47 will work with either mod_jk or mod_jk2.

Subir

-Original Message-
From: Asif Chowdhary [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 29, 2003 8:04 AM
To: Tomcat Users List
Subject: RE: Connecting Apache 2.0.47 to Tomcat 4.0.6


Yes, that's what I have read in the Tomcat Definitive Guide from
OReilly. You can give it a try but I think you will run into problems.
My email from yesterday has instructions on how to make it work with
mod_jk2.

Bye

-Original Message-
From: Ahmad, Kashif [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 10:59 AM
To: 'Tomcat Users List'
Subject: RE: Connecting Apache 2.0.47 to Tomcat 4.0.6


Sorry, are you saying the Apache 2.0.47 works with mod_jk2 only?
Because I know the instructions as provided work for Apache 2.0.43 and
mod_jk1.2. Seems like you are saying that 2.0.x doesn't work with 1.2 at
all.  Just clarifying.  Thanks ;-)

Kashif

-Original Message-
From: Asif Chowdhary [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 29, 2003 10:50 AM
To: Tomcat Users List
Subject: RE: Connecting Apache 2.0.47 to Tomcat 4.0.6

I think Apache 2.0 works with mod_jk2. and the configuration is very
different 
from mod_jk1.2. The directives such as JkWorkersFile JKMount dont work
with mod_jk2.

-Original Message-
From: Ahmad, Kashif [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 10:42 AM
To: '[EMAIL PROTECTED]'
Subject: Connecting Apache 2.0.47 to Tomcat 4.0.6


Hi All:

 

I have a question and hope someone can answer it.  I have a client that
is trying to install Apache 2.0.47 with Tomcat 4.0.6.  The application
he is trying to run comes with instructions on how to configure Apache
2.0.43 with Tomcat 4.0.4 with mod_jk_1.2.  Do the same instructions
apply to with the Apache 2.0.47 with Tomcat 4.0.6?  I've been able to
get him so far to the point where he can access the application on the
Tomcat internal HTTP on the default port 8080.  However, when he
connects with Apache on port 80, he gets a mis-configuration error.

 

Here are the instructions as provided for the application for
configuring Apache 2.0.43 and Tomcat 4.0.4

 

*Start Configuration Instruction*

 

4.2.2 Configure the Apache HTTP Server for Teams

Add the following lines at the end of httpd.conf in /opt/apache/conf:

#

# Configure mod_jk

#

LoadModule jk_module /opt/apache/modules/mod_jk.so

JkWorkersFile /opt/tomcat/conf/jk/workers.properties

JkLogFile /opt/tomcat/logs/mod_jk.log

JkLogLevel error

Alias /teams /opt/tomcat/webapps/teams

JkMount /teams/*.do ajp13

JkMount /teams/*.jsp ajp13

Alias /teamsadmin /opt/tomcat/webapps/teamsadmin

JkMount /teamsadmin/*.do ajp13

JkMount /teamsadmin/*.jsp ajp13

 

4.2.3 Configure Tomcat for TEAMS

 

4.2.3.1 Set Up Environment Variables

* Set JAVA_HOME to the JDK or JRE installation directory.

* Set TOMCAT_HOME to the Tomcat installation directory, e.g.,
/opt/tomcat.

 

4.2.3.2 Modify the Tomcat Startup Script

1. Add the following configuration information near the top of the file

$TOMCAT_HOME/bin/catalina.sh right after the comment section. Note that

it must be added as one line. Also, when copying from text editors,
ensure that

there are no hard returns in the entry between JAVA_OPTS= and

DORBagentPort settings.

 

# Define JAVA_OPTS

JAVA_OPTS="-Xbootclasspath/p:/opt/teams/jars/vbjapp.jar:/

opt/teams/jars/vbjorb.jar:/opt/teams/jars/swingall.jar -Xss2m -Xmx128m

-Dfile.encoding=ISO8859_1 -Djava.compiler=NONE -DSERVLET=true

-DTEAMS_HOME=/opt/teams -DLOG_FILE=/opt/tomcat/logs/teams.log

-DTEAMS_DEBUG_LEVEL=6 -DORBagentPort=15000"

 

2. Also in the $TOMCAT_HOME/bin/catalina.sh file, append the following
jar

files to the second CLASSPATH setting:

a. If you are using JRE 1.3, add:

b. If you are using JDK 1.3 (see following example), add:

CLASSPATH="$CLASSPATH":/opt/teams/jars/tools.jar:"$ORACLE_HOME/jdbc/lib/

classes12.zip"

CLASSPATH="$CLASSPATH":"$ORACLE_HOME/jdbc/lib/classes12.zip"

 

4.2.3.3 Create AJP Connecter Workers File

Create a file /opt/tomcat/conf/jk/workers.properties with the following

content (note that the value of worker.ajp13.port is an example):

The AJP Connector Port (5044) must also be put into the server.xml file,

located in the$TOMCAT_HOME/conf directory, in the section called "Define
an

AJP 1.3 Connector."

 

# Setup for Solaris system

#

workers.tomcat_home=/opt/tomcat/

workers.java_home=/opt/jdk1.3.1

ps=/

worker.list=ajp13

# Definition for Ajp13 worker

#

worker.ajp13.port=5044

worker.ajp13.host=localhost

worker.ajp13.type=ajp13

 

 

 

 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
T

RE: can tomcat give me page loadtime stats?

2003-10-09 Thread Subir Sengupta
You could also write a filter to measure performance.

http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters.html

Subir

-Original Message-
From: Jay Glanville [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 09, 2003 9:12 AM
To: 'Tomcat Users List'
Subject: RE: can tomcat give me page loadtime stats?


I have a feeling that these variables (%D and %T) are not available in
4.1.12 as they don't actually resolve to anything in the access log.  I can
determine that they were added in AccessLogValue (ver 1.3), but I don't know
what the CVS tag is for version 4.1.12 (ver 1.3 has these
tags: s1ap8_i3, s1ap8_i2, s1ap8_i1, jwsdp_12__02, jwsdp_12__01,
TOMCAT_5_0_2, TOMCAT_5_0_1)

Thanks for you help.

JDG

> D'oh! The catalina javadocs are out of date (but not by much)
> on the website. 
> In your local version of the javadoc, there should be the following:
> 
> %D - Time taken to process the request, in millis
> %T - Time taken to process the request, in seconds
> 
> -Tim
> 
> 
> Jay Glanville wrote:
> 
> > Good.  Thanks.  Now, a little help is requested in how to use
> > AccessLogValue.  (and now that I read the first answer, I 
> realize that
> > I might not have phrased my question as unambiguously as possible).
> > 
> > I'd like to have the following information logged:
> >page x took y milliseconds to create (or something like that)
> > 
> > According to
> > 
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/org/
> > ap
> > ache/catalina/valves/AccessLogValve.html, I would use %U for x (the 
> > page's URL), but what would I use for y (the amount of time
> it took to
> > create the page)?  %t only gives me the date and time it
> was requested,
> > not how long it took Tomcat to calculate the page's contents.
> > 
> > Thanks
> > 
> > JDG
> > 
> > 
> > 
> >>See the AccessLogValve javadocs.
> >>
> >>-Tim
> >>
> >>Glanville, Jay wrote:
> >>
> >>
> >>>Is there a way for tomcat to give me information on how
> >>
> >>long it takes
> >>
> >>>to load a page?
> >>>
> >>>I have a web application upon which I wish to improve it's 
> >>>performance. Before I can do any attempts at improvement, I
> >>
> >>need a way
> >>
> >>>to measure its performance.  One of the ways that I was considering 
> >>>measuring this delta was to see how long Tomcat takes to
> >>
> >>load a page.
> >>
> >>>Can tomcat product this information for me (configuration
> >>
> >>setting, log
> >>
> >>>files, etc)?  Or do I need to manually add timestamp information to 
> >>>the top and bottom of my page templates?
> >>>
> >>>Suggestions appreciated.
> > 
> > 
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: When does tomcat call the garbage collector?

2003-09-27 Thread Subir Sengupta
You could set up a context or lifecycle listener.  Then, when you shut down
Tomcat you could close your connections in the respective contextDestroyed
method or stop method.

Subir

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 26, 2003 12:15 PM
To: Tomcat Users List
Subject: Re: When does tomcat call the garbage collector?


it is your own responsibility to close connections from a pool. Tomcat
doesn't do garbage collection, the Java VM does. Also, if you kill your VM
and the connections are still open on the AS400 box, tough luck, (I would
imagine they should timeout shortly) that is out of reach from the VM/Tomcat
side, best thing you can do is to not keep a pool of open connections,
because if the VM crashes or gets killed, there will be no one closing them
from the client

Filip

- Original Message -
From: "Bruce W. Marriner" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, September 26, 2003 12:10 PM
Subject: When does tomcat call the garbage collector?



Hello I am working on a crm web app in jsp.  I am pre-compiling everything
with ant and serving them as servlets though tomcat.  I am curious when
tomcat does garbage collection on the servlets.  For instance, if a servlet
opens stuff up I would imagen when that page has finished executing it would
clean up anything not properly cleaned up.

The real issue...  I have a dbHandler class that takes care of sql
statements and connection pooling.  I am using IBM's AS400JDBCConnectionPool
class to handle the pool.  If it has say 100 connections open, and you
shutdown tomcat.  They stay open on the AS400.  I would think that some
process would go though and close everything that is open when tomcat shuts
down.

I am compiling with JDK1.4.2_09 and running Tomcat 4.1.27 which is using
JRE1.4.2 to execute the servlets.  Any ideas would be helpful, thanks.

Bruce Marriner

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Jasper2's JspC

2003-08-14 Thread Subir Sengupta
Try using jspc with the -compile flag and see what happens.  Your code is
probably not setting something (I don't know what), which is causing it to
not compile.

As an aside, I don't use the -compile flag to compile.  I use the jspc
script to create the .java files and then I use Jikes to compile.  It's much
much faster than javac.

Subir

-Original Message-
From: Dmitry Beransky [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 11:50 AM
To: Tomcat Users List
Subject: RE: Jasper2's JspC


At 10:42 AM 8/13/2003, Subir Sengupta wrote:
>Use the -compile argument.

>At 10:42 AM 8/13/2003, Steph Richardson wrote:
>Otherwise, JspC will not create .class files for you, but the java 
>files
>that JspC creates can just be compiled with javac, using
>Tomcat's classpath

Here's the thing.  Setting -compile flag forces JspC to call 
Compiler.compile().  I'm already making this call (I'm actually bypassing 
JspC, setting all the options and contexts myself and calling 
Compiler.compile() directly).  Compiler.compile() makes a call to 
generateClass() which in turn invokes Ant's javac task to compile the 
file.  The task completes with no errors or exceptions; I'm stepping 
through the execution in a debugger and I can see that 'success' flag is 
set to true upon the javac's completion.  Yet there is no .class file to be 
found anywhere.


Dmitry

-Original Message-
>I'm having partial luck manually invoking JspC and compiling JSP pages 
>on demand.  I get as far as precomiling to .java, but for the world of 
>me can't figure out how to get the java class compiled to bytecode.  
>Looking at the source code for org.apache.jasper.compiler.Compiler, it 
>appears that I should be getting a .class as well, but I'm not.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Jasper2's JspC

2003-08-14 Thread Subir Sengupta
Use the -compile argument.

-Original Message-
From: Dmitry Beransky [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 9:55 AM
To: [EMAIL PROTECTED]
Subject: Jasper2's JspC


Hi,

I'm having partial luck manually invoking JspC and compiling JSP pages on 
demand.  I get as far as precomiling to .java, but for the world of me 
can't figure out how to get the java class compiled to bytecode.  Looking 
at the source code for org.apache.jasper.compiler.Compiler, it appears that 
I should be getting a .class as well, but I'm not.

Can anyone offer any pointers or sample source code I could look at 
(reminder, this is for Japser2)?


Thanks
Dmitry


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 4 and native threads

2003-05-31 Thread Subir Sengupta
Yes, rh9 uses a new threading library -
http://people.redhat.com/drepper/nptl-design.pdf .  To force RH to not use
the new library try setting LD_ASSUME_KERNEL=2.2.5 in your shell before
staring your app.  That may fix your problem.

Subir

-Original Message-
From: Michenaud Laurent [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 1:38 PM
To: Tomcat Users List
Subject: RE: Tomcat 4 and native threads


i think it is because i've got a redhat 9.0 which
uses new kinds of threads( NPTL ).
Compatibility problems...

>
> Howdy,
> It's surprising that you think tomcat uses green threads and you don't
> know what the HotSpot VM is ;)  I don't think I've ever seen that
> combination before.
>
> Do java -version and you'll see that you already have the HotSpot VM.
> JDK 1.4.1 works on the Intel platforms you want.
>
> Unless you're really in exotic spaces, you don't need to specify native
> / green / alternative threading libraries to Sun's JVM.  Just run it
> with the default threading configuration.
>
> For more details on what options the VM supports, including
> threading-related options, see:
> http://java.sun.com/docs/hotspot/VMOptions.html
>
> Yoav Shapira
> Millennium ChemInformatics
>
>
>>-Original Message-
>>From: Michenaud Laurent [mailto:[EMAIL PROTECTED]
>>Sent: Friday, May 30, 2003 4:03 PM
>>To: Tomcat Users List
>>Subject: RE: Tomcat 4 and native threads
>>
>>What is the HotSpot VM ?
>>Where can i download it ?
>>Does it work on i686 ?
>>
>>at this time, i've download the sun j2sdk 1.4.1 ( i586 ) and
>>when i launch : java -native
>>I get :
>>Error: native VM not supported
>>
>>> HotSpot VM supports only native threads and the Classic VM supports
>>native
>>> and green threads.
>>>
>>> To force it to use either native or green threads you can do:
>>>
>>> java -native mypkg.MyClass
>>> javac -native MyClass.java
>>>
>>> or if you use classic VM
>>>
>>> java -green mypkg.MyClass
>>> javac -green MyClass.java
>>>
>>> -Original Message-
>>> From: John Corrigan [mailto:[EMAIL PROTECTED]
>>> Sent: Friday, May 30, 2003 2:22 PM
>>> To: Tomcat Users List; [EMAIL PROTECTED]
>>> Subject: RE: Tomcat 4 and native threads
>>>
>>>
>>> Doesn't the thread model depend on the JVM?
>>>
>>>
>>> -Original Message-
>>> From: Michenaud Laurent [mailto:[EMAIL PROTECTED]
>>> Sent: Friday, May 30, 2003 12:19 PM
>>> To: [EMAIL PROTECTED]
>>> Subject: Tomcat 4 and native threads
>>>
>>>
>>> Hi,
>>>
>>> Tomcat 4 is using green threads, am i wrong ?
>>>
>>> how can i make it working with native threads ?
>>>
>>> thanks
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> This e-mail, including any attachments, is a confidential business
> communication, and may contain information that is confidential,
> proprietary and/or privileged.  This e-mail is intended only for the
> individual(s) to whom it is addressed, and may not be saved, copied,
> printed, disclosed or used by anyone else.  If you are not the(an)
> intended recipient, please immediately delete this e-mail from your
> computer system and notify the sender.  Thank you.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: mod_jk.so / apache 1.3.27 / tomcat 4.1.18

2003-02-10 Thread Subir Sengupta
I get that too and it doesn't cause any problems.  I didn't build Apache so
I don't know what's causing it.  However you can probably safely ignore it.

Subir

-Original Message-
From: [de internetman] Rene Kooyman [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 10, 2003 12:33 PM
To: Tomcat Users List
Subject: mod_jk.so / apache 1.3.27 / tomcat 4.1.18


Oke, that's done, just use the: /usr/lib/apache folder .. p,
now were getting somewhere, although i can't compile normaly because
apxs is located in the other folder ... so be it 

Now md_jk.so will load... but here's the error messages i was telling
you about earlier:

[warn] Loaded DSO modules/mod_jk.so uses plain Apache 1.3 API, this module 
might crash under EAPI! (please recompile it with -DEAPI)


And like i said before, should this be safe to ignore ... or do i have to
recompile ... and if so: how ?

-- 
Kind regards,

Rene Kooyman


-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: how to block

2003-02-06 Thread Subir Sengupta
Here's how to do what Tim is talking about

http://developer.java.sun.com/developer/EJTechTips/2003/tt0114.html#2

Subir

-Original Message-
From: Tim Moore [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 06, 2003 10:22 AM
To: Tomcat Users List
Subject: RE: how to block 


Check out the "synchronizer token" pattern from Core J2EE Patterns.  In
a nutshell, you provide the form with a unique one-time-use token that
it submits with the form.  The form submission handler checks to see if
that token has been submitted before, and if so, rejects the request.

Struts includes an implementation of this pattern; check out the
generateToken and isTokenValid methods on Action.

Additionally, it's not too hard to write JavaScript that will disable a
submit button after it is clicked.

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863


> -Original Message-
> From: Bing Zhang [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, February 06, 2003 1:10 PM
> To: 'Tomcat Users List'
> Cc: Dan Yin; Jimmy Wu; Daniel Ruiz
> Subject: how to block 
> 
> 
> Hi all:
> 
>   I have one problem right now, which many people here on 
> the list should have already experienced.
> 
>   For example, some post from browser take some time on 
> the server side(servlet code) to process.  Often times 
> impatient user will click multiple times on the "submit" 
> button, Or "malicious" user will hold "Enter" key to request 
> it million times.  What's going to happen on the server side
> is:  multiple threads onto the same servlet would be launched 
> and resources would be used up, like connections, and CPU 
> processing time.  
> 
>   So what's a general approach to prevent this ??  No 
> matter the solution is on the client side (HTML/JavaScript), 
> the server side(servlet/JSP), or combined.  Can you guys pass 
> some experience, ideas, thoughts on this ??
> 
>   Thank you so much. 
> 
>   Bing
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: DB Connection Pooling with Tomcat

2003-02-04 Thread Subir Sengupta
I believe that the commons DBCP is bundled with TC 4.1

http://jakarta.apache.org/commons/dbcp.html

-Original Message-
From: Noncubicle Corp [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 3:06 AM
To: [EMAIL PROTECTED]
Subject: DB Connection Pooling with Tomcat


Hi,
I am wondering about connection pooling. I am using Tomcat 4.1 with Sybase. 
Does Tomcat have some some of pooling functionality, or do I look to my DB 
vendor? Right know we use one put together by someone (no one seems to know 
where it came from), and I am not convinced it is as good as it could be.

Thanks

JW




_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Tomcat running behind another web server

2003-01-31 Thread Subir Sengupta
Check out John Turner's howto's
http://www.johnturner.com/howto/apache-tomcat-howto.html

-Original Message-
From: Álisson" Nunes [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 31, 2003 9:41 AM
To: [EMAIL PROTECTED]
Subject: Tomcat running behind another web server



Hello,

I would like to know how can I make Tomcat run behind Apache. Or how can I
configure Apache to support JSP.

Thank you very much

Álisson Nunes



-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Tool for HTTP Request Stress Test

2003-01-17 Thread Subir Sengupta
I don't think Micorsoft's WAS is available on their website anymore.

http://webtool.rte.microsoft.com/

Subir

-Original Message-
From: Reynir Hübner [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 17, 2003 6:46 AM
To: Tomcat Users List
Subject: RE: Tool for HTTP Request Stress Test


Jmeter is one from jakarta, (jakarta.apache.org/jmeter)

Microsoft has a WebApplication stresstool that is quite good too (one of the
best apps I've seen from M$). 

Hope it helps
-reynir



> -Original Message-
> From: randie ursal [mailto:[EMAIL PROTECTED]] 
> Sent: 17. janúar 2003 02:37
> To: A mailing list about TOMCAT; A mailing list for 
> discussion about Sun Microsystem's Java Servlet API Technology.
> Subject: Tool for HTTP Request Stress Test
> 
> 
> Hi,
> 
>can anyone suggest an HTTP Stress Test tool.
> 
>coz i wanna stress test my web application which is deployed
>on Tomcat.
> 
> thanks.
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 
> 

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Opinions of available Tomcat books

2003-01-10 Thread Subir Sengupta
I found the James Goodwill book much too basic.  You could learn as much
from the Tomcat docs.

-Original Message-
From: Bill [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 7:41 AM
To: tomcat user
Subject: Opinions of available Tomcat books


I've been thinking about picking a copy of one of the Tomcat books out
there and was looking for suggestions and comments.  I noticed about 5
different pubs but I had a hard time finding anything about the books
other than the evaluation systems the book sellers use.  I saw John T.
commented about the Wrox book, does anyone have one of the others?

My particular concerns are that the book deal in length about
integration with other technologies/products (e.g. Apache ) and that it
cover up-to if not close-to the current version.

-b




--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Tomcat oddities

2003-01-08 Thread Subir Sengupta
Issue One:
If Tomcat used up all your memory, you would see OutOfMemory exceptions
being thrown, not a freeze.  Do you see these?  Everything will stop *while*
GC is occurring (not until GC occurs).  

Have you tried increasing the amount of memory allocated to Java?  Use the
-Xms and -Xmx flags to set memory allocations.  However, if you do have a
memory leak, increasing the memory will simply increase the intervals
between freezes.

-Original Message-
From: Michael Molloy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 1:55 PM
To: Tomcat Users List
Subject: Tomcat oddities


My company is in the deployment stage of a project that uses tomcat to 
serve information from an oracle database to about 25 people. When the 
app goes live, there will be about 150 people connected at any one 
time. Tomcat 4.1.12 is running behind Apache on Windows 2000 on a 
single cpu box, and Oracle is running on a separate Windows 2000 2-way 
box. (Windows was the client decision, not ours.)

Issue One
We're seeing two serious issues, the first of which happens about once 
a day, sometimes more. When there are several users on the system, 
maybe up to 15, there is a freeze during which no one can get any 
responses back from Tomcat. This period usually lasts from 5 to 15 
minutes, after which the system returns to normal and everything zips 
along.

We've tuned queries, so we don't think that is the problem. There may 
still be a rogue query out there causing problems, but we think it's 
unlikely. Besides, I don't know why that would stop everyone, which is 
what's happening.

Another possibility that we've discussed is that tomcat is simply using 
all of the memory and everything basically stops until GC occurs. This 
seems the most likely to me, but I wanted to ask the group. I don't 
know what the page file size is, nor do we have access to the server so 
we can't check task manager.

Can anyone think of any other possibilities?

Issue Two
We've had two reports where a user has had data from an old session 
show up in his/her current session. For example, I wrote a class that 
stores information from 14 different JSPs. The object is put into the 
user's session. In these two occasions, the user entered a new record 
using these screens & saved the data to the database. The user took an 
hour lunch break, which would have been long enough to timeout (set at 
20 minutes), returned, and queried a different record. Some of the data 
from the previous record showed up in the holder class in his/her 
current session and was saved to the database.

Any idea what that could be? The only thing I can think of is that IE 
is doing some data caching & mixing things up a bit.

Any suggestions will be greatly appreciated. We really need to get this 
figured out quickly.

Thanks
--Michael Molloy


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: enterprises that use Tomcat as Web Server.

2003-01-07 Thread Subir Sengupta
What makes you think that it is falsified :-)

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 4:15 AM
To: Tomcat Users List
Subject: Re: enterprises that use Tomcat as Web Server.


Netcraft is one way to find out what web server a company is running.

http://www.netcraft.com/

But some reports may be falsified by the webserver.
For example: Wal-mart report Solaris with IIS.
http://uptime.netcraft.com/up/graph/?host=walmart.com

-Tim


Andoni wrote:
> In regard to your query I'm sure you would understand if I pointed out
that
> most commercially owned businesses are quite sensitive about telling
anybody
> outside of their organisation any details of their computer infrastructure
> and especially a public interface of their computer infrastructure like a
> web server.
> 
> I am sure you are not looking for this information to help you hack in to
> companies but I assure you it would be useful to many internet hackers.
> 
> For this reason alone I don't see you getting many responses to your
query.
> 
> On the other hand you can test the make of any web server by downloading a
> program like visual route
(http://www.visualware.com/visualroute/index.html)
> and typing in the name of a domain whose web server you wan to know the
type
> of.
> 
> Regards,
> 
> Andoni.
> 
> - Original Message -
> From: "Sérgio Rocha" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, January 06, 2003 4:37 PM
> Subject: enterprises that use Tomcat as Web Server.
> 
> 
> 
>>
>>
>>
>>I need a list of enterprises that use Tomcat as Web Server.
>>Can someboby help me?
>>
>>_
>>MSN Hotmail, o maior webmail do Brasil. http://www.hotmail.com
>>
>>
>>--
>>To unsubscribe, e-mail:
> 
> 
> 
>>For additional commands, e-mail:
> 
> 
> 
>>
> 
> 
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

> 
> 
> 


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: learning filters

2002-12-11 Thread Subir Sengupta
Filters are covered in the "More Servlets" book, which is the next edition
of the "Core Servlets" book.

-Original Message-
From: Price, Erik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 9:06 AM
To: [EMAIL PROTECTED]
Subject: learning filters


I have been learning about servlet programming from "Core Servlets".  I like
this book.  But, since subscribing to this list, I have seen mention of
"filters".  In a message from Yoav Shapira I was recommended to use
"filters" to validate form data before passing it to a servlet.  This seems
to me a cleaner means of doing it, as opposed to putting form-validation
code in the servlet.  However, "Core Servlets" does not describe how to use
filters (that I know of).  Is there a reference for this technique
somewhere, or is it a generic term for "a servlet that intercepts, acts
upon, and passes along data" ?  If it is the latter then I can figure it out
from using getDispatcher().forward() etc but if it is a specific technique
then where can I learn more?

My Tomcat container is v. 4.0.6.


Erik

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: slight OT: RequestInterceptor

2002-12-10 Thread Subir Sengupta
What version of TC are you using?  4.x does not use interceptors, 3.x does.

-Original Message-
From: Manavendra Gupta [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 3:34 AM
To: Tomcat Users List
Subject: slight OT: RequestInterceptor


Hi,

This probably is slightly off-topic, but I would like to know:

1. How to implement a RequestInterceptor? Is there some sample code
available?
2. Is it a good idea to implement one for managing sessions?

Thanks,
Manav.


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Broken pipe msg from Ajp13Processor

2002-11-27 Thread Subir Sengupta
The number of ajp13 threads in the pool are configurable in the server.xml.

A broken pipe is usually caused by someone clicking on a link and then when
nothing happens clicking on a different link.  So the first click is
probably to a slow page (maybe due to a long db query etc).  Tomcat will
complete rendering the page and then try and write out to the socket, but th
socket no longer exists resulting in a Broken pipe.  Find out which page is
causing this problem and fix it.

I have not been able to reproduce this by hitting stop on the browser.

Hope that made sense.

Subir

-Original Message-
From: Schnitzer, Jeff [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 27, 2002 4:16 PM
To: [EMAIL PROTECTED]
Subject: Broken pipe msg from Ajp13Processor


I understand why the http connector would get "Broken pipe" messages -
users hitting stop on their browser.  But why does the Ajp13Processor
produce Broken pipe messages?

I'm getting a lot of this in my logs:

java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at
java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at org.apache.ajp.Ajp13.send(Ajp13.java:525)
at org.apache.ajp.RequestHandler.finish(RequestHandler.java:495)
at org.apache.ajp.Ajp13.finish(Ajp13.java:395)
at
org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:1
96)
at
org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:464)
at
org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
at java.lang.Thread.run(Thread.java:536)

I thought that mod_jk held open a single connection to the Ajp13
connector and recycled it?  Does it break the Ajp13 connection when the
user breaks the http connection?

Should I be worried?  I'm seeing what feels an awful lot like a thread
leak, and I'm wondering if this could be related.  I'm running Tomcat
4.0.4 with mod_jk.

Thanks in advance,
Jeff Schnitzer
[EMAIL PROTECTED]
The Sims Online

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Classloader/Classpath problem

2002-11-27 Thread Subir Sengupta
If I copy the jars to $CATALINA_HOME/lib, the app starts up fine, with no
exceptions thrown.  

-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 27, 2002 1:34 PM
To: [EMAIL PROTECTED]
Subject: RE: Classloader/Classpath problem


I do not know.

Have you tried it in common/lib? 

If it does not work there, you might try two copies, one in WEB-INF/lib
and one in server/lib. I have seen cases where that was the only
configuration I could find that would work.

Larry

>>> [EMAIL PROTECTED] 11/27/02 14:23 PM >>>
I'm very familiar with that doc.  

The question is - If the class loader loaded the jar, then why would my
init
app throw a NoClassDefFoundError exception.  And not throw it when the
jar
is in the classpath.

Subir

-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 27, 2002 12:40 PM
To: [EMAIL PROTECTED]
Subject: Re: Classloader/Classpath problem


Talking about "the class loader" with tomcat is a vast
over-simplification.

Look here for more:

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html

Larry

>>> [EMAIL PROTECTED] 11/27/02 12:53 PM >>>
Hi,

When I start Tomcat I get a NoClassDefFoundError exception. I'm
including a
snippet from the logs.  As you can see, the Classloader loads
wmsyslog.jar
which contains Syslog.class, but then fails with a NoClassDefFoundError
.  I
have a ServeletContextListener that initializes the system on Context
startup.  However, if I put jars in the classpath, TC sees the jars and
starts up.  Does anyone know why it this would happen even thought the
class
loader has loaded the jar.

I'm running TC 4.0.4 on RH Linux 7.3.

TIA,
Subir

WebappLoader[]: Deploy JAR /WEB-INF/lib/wmsyslog.jar to
/home/subir/www/tomcat/webapps/walmart/WEB-INF/lib/wmsyslog.jar
WMStandardManager[]: # in start(): WMStandardManager
WMStandardManager[]: Seeding random number generator class
java.security.SecureRandom
WMStandardManager[]: Seeding of random number generator has been
completed
ContextConfig[]: Added certificates -> request attribute Valve
loading properties

PropFile: /home/subir/www/conf/init.conf
StandardContext[]: Exception sending context initialized event to
listener
instance of class com.tc.WMContextListener
java.lang.NoClassDefFoundError: com/wm/syslog/Syslog
at com.wm.sys.Main._load_props(Main.java:195)
at com.wm.sys.Main.getProperty(Main.java:52)
at
com.tc.WMContextListener.contextInitialized(WMContextListener.java:12)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3188)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3404)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at
org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

StandardContext[]: Context startup failed due to previous errors
Context destroyed on Wed Nov 27 10:38:46 PST 2002.


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Classloader/Classpath problem

2002-11-27 Thread Subir Sengupta
I'm very familiar with that doc.  

The question is - If the class loader loaded the jar, then why would my init
app throw a NoClassDefFoundError exception.  And not throw it when the jar
is in the classpath.

Subir

-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 27, 2002 12:40 PM
To: [EMAIL PROTECTED]
Subject: Re: Classloader/Classpath problem


Talking about "the class loader" with tomcat is a vast
over-simplification.

Look here for more:

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html

Larry

>>> [EMAIL PROTECTED] 11/27/02 12:53 PM >>>
Hi,

When I start Tomcat I get a NoClassDefFoundError exception. I'm
including a
snippet from the logs.  As you can see, the Classloader loads
wmsyslog.jar
which contains Syslog.class, but then fails with a NoClassDefFoundError
.  I
have a ServeletContextListener that initializes the system on Context
startup.  However, if I put jars in the classpath, TC sees the jars and
starts up.  Does anyone know why it this would happen even thought the
class
loader has loaded the jar.

I'm running TC 4.0.4 on RH Linux 7.3.

TIA,
Subir

WebappLoader[]: Deploy JAR /WEB-INF/lib/wmsyslog.jar to
/home/subir/www/tomcat/webapps/walmart/WEB-INF/lib/wmsyslog.jar
WMStandardManager[]: # in start(): WMStandardManager
WMStandardManager[]: Seeding random number generator class
java.security.SecureRandom
WMStandardManager[]: Seeding of random number generator has been
completed
ContextConfig[]: Added certificates -> request attribute Valve
loading properties

PropFile: /home/subir/www/conf/init.conf
StandardContext[]: Exception sending context initialized event to
listener
instance of class com.tc.WMContextListener
java.lang.NoClassDefFoundError: com/wm/syslog/Syslog
at com.wm.sys.Main._load_props(Main.java:195)
at com.wm.sys.Main.getProperty(Main.java:52)
at
com.tc.WMContextListener.contextInitialized(WMContextListener.java:12)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3188)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3404)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at
org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

StandardContext[]: Context startup failed due to previous errors
Context destroyed on Wed Nov 27 10:38:46 PST 2002.

--
To unsubscribe, e-mail:  

For additional commands, e-mail:




--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Classloader/Classpath problem

2002-11-27 Thread Subir Sengupta
Hi,

When I start Tomcat I get a NoClassDefFoundError exception. I'm including a
snippet from the logs.  As you can see, the Classloader loads wmsyslog.jar
which contains Syslog.class, but then fails with a NoClassDefFoundError .  I
have a ServeletContextListener that initializes the system on Context
startup.  However, if I put jars in the classpath, TC sees the jars and
starts up.  Does anyone know why it this would happen even thought the class
loader has loaded the jar.

I'm running TC 4.0.4 on RH Linux 7.3.

TIA,
Subir

WebappLoader[]: Deploy JAR /WEB-INF/lib/wmsyslog.jar to
/home/subir/www/tomcat/webapps/walmart/WEB-INF/lib/wmsyslog.jar
WMStandardManager[]: # in start(): WMStandardManager
WMStandardManager[]: Seeding random number generator class
java.security.SecureRandom
WMStandardManager[]: Seeding of random number generator has been completed
ContextConfig[]: Added certificates -> request attribute Valve
loading properties

PropFile: /home/subir/www/conf/init.conf
StandardContext[]: Exception sending context initialized event to listener
instance of class com.tc.WMContextListener
java.lang.NoClassDefFoundError: com/wm/syslog/Syslog
at com.wm.sys.Main._load_props(Main.java:195)
at com.wm.sys.Main.getProperty(Main.java:52)
at
com.tc.WMContextListener.contextInitialized(WMContextListener.java:12)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3188)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3404)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

StandardContext[]: Context startup failed due to previous errors
Context destroyed on Wed Nov 27 10:38:46 PST 2002.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Hi all .. licence issue ..

2002-11-26 Thread Subir Sengupta
Have you looked here
http://www.apache.org/foundation/licence-FAQ.html

-Original Message-
From: Eriam Schaffter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 5:54 PM
To: [EMAIL PROTECTED]
Subject: Hi all .. licence issue ..


I would like to hack a little with tomcat .. I think it would be no 
problem but my question is if then I want to redistribute a product with 
tomcat stuff in it what are the requierements ?
Does tomcat includes any sun proprietary code ?
Is it GPL ?
Can I just take tomcat sources, recompile it with added features and 
distribute back both to tomcat community and to public under my own or 
my company's brand ?
If think it must just be as easier as it (stating in my softs that I use 
some code from apache fundation ..) as I believe the tomcat licence 
allows that kind of deals ..

Am I right ?

Thanks for any tips ..

Eriam Schaffter


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: precompilation of jsp pages

2002-11-19 Thread Subir Sengupta
There seem to be a number of differences between the runtime compiler and
the command line compiler (i.e. jspc which is called by ANT).  One of them
being with file naming (the problem you describe).  Also you will find that
if you have an underscore in the jsp file name both compilers will name them
differently.  For example a file named a_b.jsp will be named a_b.java by the
command line compiler and a_0005fb$jsp.java by the runtime compiler.  To get
it to work right, I had to go into Jasper and fix the code to make name
files consistently.  I don't know if this has been fixed in Jasper2.

Subir

-Original Message-
From: Ojars Kalnins [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 6:50 AM
To: Tomcat MailingList
Subject: precompilation of jsp pages


Hi!

I am using tomcat 4.0 and have problem with the precompilation of jsp pages.
Can anybody say why tomcat generates java files with name containing "$jsp"?
For example, "index.jsp" is generated to "index$jsp.java" file.

I wanted to use ANT (1.5.1) to precompile jsp files.
ANT generates java files without "$jsp" and tomcat does not use them, but
generates new files using "$jsp" in the file and class name.
Therefore I can use ANT only to check jsp errors, but I don't get fast
initial invocation of jsp pages when tomcat is started.

Thanks in advance,
Ojars

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Bug in catalina.sh? Problem using jpda

2002-10-08 Thread Subir Sengupta

Where in the bootstrap class do you add this code?

Thanks,
Subir

-Original Message-
From: Jean-Francois Arcand [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 08, 2002 1:32 PM
To: Tomcat Users List
Subject: Re: Bug in catalina.sh? Problem using jpda


I'm using Netbean 3.4 on Linux and I don' have any problems. On thing 
I'm doing in order debug from the Boostrap class is by adding the 
following code:

try{
Thread.sleep(1);
}catch(java.lang.Exception ex){
ex.printStackTrace();
}

This give the time to (in my case Netbean) to properly connect to the jpda.

-- Jeanfrancois

William Lee wrote:

> I have been using jswat for debugging Tomcat for a while.  However, 
> since I use the catalina's jpda start it doesn't work anymore.  It 
> seems like in the java command arguments that catalina.sh script 
> constructed are missing a -Xnoagent flag.  It's causing the jswat to 
> skip all the breakpoint that I've set I think.
>
> Also, it seems like the setclasspath.sh script is explicitly checking 
> jdb and javac in your JAVA_HOME/bin directory before allowing you to 
> pass.  That means you can't really use that script with any JRE for 
> the binaries are not included...  I know jsp would not work with the 
> JRE but I can use the JRE with just plan servlet with no problem and 
> having that check there is somewhat redundent.
>
> BTW, I'm currently using IBM JDK 1.3 and Tomcat 4.1.12 on Linux.
>


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: build.xml for Ant/JspC

2002-10-03 Thread Subir Sengupta

Here's a snippet of my build.xml (but I don't have a refid).  It seems to
work though.

 
 
  
   


 


 


 


   
   
   
   
   
   
  
 

Also I found an earlier posting that might help:
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg14936.html

Thanks for posting your compiler snippet.
Subir

-Original Message-
From: Kevin HaleBoyes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 03, 2002 5:56 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: build.xml for Ant/JspC


> There is a snippet of the build.xml that we use for jsp
compilation.

I'm lurking on this thread but wanted to ask:
What is your  set to?
I've attempted JspC but I get class-not-found errors and when I
resolve them I get problems with the endorsed/sealed XML classes.

In the end I resorted to calling jspc.sh as shipped with Tomcat
as it seems to manage the classpath properly:












In answer to another posters question (sorry, I don't remember
who it was), once the above call to jspc.sh finishes I then call
the java compiler as follows:






Thanks,
Kevin.


__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: build.xml for Ant/JspC

2002-10-03 Thread Subir Sengupta

Sachin,

Thanks, I did get this working.  Do you also compile the the .java files
with ant?  If so, could you send me a snippet of that piece of the build.xml
file.  I couldn't get that working either (I'm using Ant for the first
time).

Thanks,
Subir

-Original Message-
From: Sachin Pandey
To: [EMAIL PROTECTED]
Sent: 10/2/2002 7:56 PM
Subject: Re: build.xml for Ant/JspC

There is a snippet of the build.xml that we use for jsp compilation.














hth
Cheers
Sachin Pandey
NUIX Pty Ltd
Level 8, 143 York Street,
Sydney 2000
Phone: (02) 92839010
Fax: (02) 92839020

Disclaimer:
This message is intended only for the named recipient. If you are not
the
intended recipient you are notified that disclosing,copying,
distributing or
taking any action in reliance on the contents of this information is
strictly prohibited.
- Original Message -----
From: "Subir Sengupta" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 03, 2002 9:41 AM
Subject: build.xml for Ant/JspC


> Hi,
>
> Has anyone got Jspc running with Ant?  If so could you send me your
> build.xml or send me any suggestions on how to get it working.  I
followed
> the docs at
http://jakarta.apache.org/ant/manual/OptionalTasks/jspc.html
but
> couldn't get it working.
>
> I'm running TC 404 on Red Hat 7.3 and JDK 1.4
>
> Thanks,
> Subir
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




build.xml for Ant/JspC

2002-10-02 Thread Subir Sengupta

Hi,

Has anyone got Jspc running with Ant?  If so could you send me your
build.xml or send me any suggestions on how to get it working.  I followed
the docs at http://jakarta.apache.org/ant/manual/OptionalTasks/jspc.html but
couldn't get it working.

I'm running TC 404 on Red Hat 7.3 and JDK 1.4

Thanks,
Subir

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Illegal target of jump or branch

2002-08-16 Thread Subir Sengupta

This means that your jsp is too large.  When you take your code out it
reduces the size of the jsp and so it works fine.  In Java the max size of a
method is 64k (I believe).

Subir

-Original Message-
From: Mark Goking [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 16, 2002 2:16 AM
To: Tomcat Users List
Subject: Illegal target of jump or branch




hi all, what do you think of this problem

Illegal target of jump or branch

i dont know what's wrong with this because my other codes are working fine
and there's a portion of my code that is the cause of this error. what
baffles me is that if i take this out, it works fine. but my the other parts
of my code which look the same (except for the variable names) work fine
even if i do not take it out.

what do you think is the problem?

mark

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002
 

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: automatically serve index.jsp

2002-08-12 Thread Subir Sengupta

Put this in your web.xml

  
index.jsp
  

Subir

-Original Message-
From: Michael Remijan [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 11:02 AM
To: Tomcat Users List
Subject: RE: automatically serve index.jsp


...

having this snippet workers2.properties also works

- workers2.properties (snippet) ---
 [uri:/diary/]
 info=Map the whole webapp
---




-Original Message-
From: Steve Prior [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 12:53 PM
To: Tomcat Users List
Subject: Re: automatically serve index.jsp


You're a little ahead of me in doing this, but did you try adding
index.jsp to a DirectoryIndex directive in Apache?

This was very obious to do in Apache 1.3, not sure as obvious in 2.0.

Steve

Michael Remijan wrote:
> hi all,
> 
> I'm currently working on Apache 2.0.39 <-> tomcat-4.1.8 with mod_jk2 and
jdk1.4.0_01.  I've posted previously about apache giving a directory listing
instead of returning index.jsp.  The only way I've been able to get around
this problem is editing the workers2.properties file to include a mapping to
the whole webapp...
> 
> 
> - workers2.properties (snippet)
---
> [uri:/diary/*]
> info=Map the whole webapp
>
---
> 
> 
> 
> I have an alias and directory in httpd.conf set up as follows
> 
> - httpd.conf (snippet)

> ##
> ## diary webapp
> ##
> Alias /diary "C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary"
> 
> 
> Options FollowSymLinks MultiViews IncludesNoExec
> AddOutputFilter Includes html htm gif jpeg jpg
> AllowOverride None
> Order allow,deny
> Allow from all
> 
>

> 
> 
> The question I have is, because of mapping the whole webapp in the
workers2.properties file, will that basically override apache serving static
content?  I assuming it would  but I don't have the time to go digging
around in the connector's source.
> 
> 
> thanks,
> 
> 
> 
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:





--
To unsubscribe, e-mail:

For additional commands, e-mail:





--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Book recommendation

2002-06-21 Thread Subir Sengupta

I would highly recommend 'More Servlets and Java Server Pages' by Marty
Hall, it covers Tomcat 4 and the new Servlet 2.3/JSP 1.2 specs.

The Professional Java Server Programming is good too.

The James Goodwill book is much too basic, you could learn as much by
reading the Tomcat docs on the Tomcat web site.

Hope that helps,
Subir

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 21, 2002 10:26 AM
To: [EMAIL PROTECTED]
Subject: Book recommendation



Any recommendation for a good book that covers Tomcat and
other related open source technologies? More from an application
developers point of view as to how various components fit
together rather than sysadmin details or exhaustive details
about any one particular thing (say JBoss, Servlet etc).

Some books that came up on Internet search were...

1) MySQL and JSP Web Applications: Data-Driven Programming
Using Tomcat and MySQL By James Turner

2) Apache Jakarta-Tomcat by James Goodwill

3) JSP, Servlets, and Mysql by Dave Harms

4) Professional Java Server Programming (many authors)

Any other ones out there and which one would you recommend?


das

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Tomcat performance issues

2002-06-13 Thread Subir Sengupta

Use a tool like Optimizeit from Borland or wrap your methods in
System.currentTimeMillis().  That will at least help you narrow down your
search.

Good luck,
Subir

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 13, 2002 4:35 PM
To: [EMAIL PROTECTED]
Subject: Tomcat performance issues


Hi All

I have designed some jsp pages which extract from a database. But the pages 
can take upto 5 minutes before they show the content. Is there anyway I can 
pinpoit where the bottle neck is. My current settings are APACHE +  MOD_jk +

Tomcat 4.03 (could the bottle neck be my Apache and tomcat servers being on 
separate machines?) . Are there any tools that I can use to test the 
performance of my servers?

Regards 
amran

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: web.xml how-to

2002-06-13 Thread Subir Sengupta

Check out Chapter 5 - Controlling Web Application behavior with web.xml from
Marty Halls book 'More Servlets and Javaserver Pages'.  It's online at
http://www.moreservlets.com/

Hope this helps,
Subir

-Original Message-
From: Eric Armstrong [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 13, 2002 7:11 PM
To: Tomcat Users List
Subject: Re: web.xml how-to


Scott Seidl wrote:

> Can someone give me a good resource on how to create the web.xml file
> for a web application using servlets?
>
> Thanks
> Scott

See docs/tomcat/appdev/web.xml.txt

It's a prototype file with a lot of commentary.





--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Update: Exception Handling

2002-06-13 Thread Subir Sengupta

I started looking at the stacktrace and reading the code.  It seems that
ErrorReportValve class is responsible for trapping throwable and creating
the report that is sent to the browser.  So I made a copy and renamed it to
WMErrorReportValve and attached a Valve element at the Host level.  This
seemed to work since now when I throw an exception I see WMErrorReportVavle
in the stacktrace and not ErrorReportValve.

Can anyone confirm that this is the correct way to handle exceptions, since
this valve isn't documented anywhere.

Thanks,
Subir

-Original Message-
From: Subir Sengupta [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 3:49 PM
To: '[EMAIL PROTECTED]'
Subject: Exception Handling


Hi,

I'd like to be able to trap all exceptions and show users a friendly error
page.  I know I can specify which exception to trap in the web.xml file and
what error pages to display. But it seems that will only trap exceptions
that I specify and let any other exceptions through!  So that doesn't seem
like a very practical way to deal with exceptions.

When an exception is thrown, Tomcat prints the stacktrace to the browser.
Is there a way to hook into this mechanism and have Tomcat display an error
page instead.  Also I'd like to have an email with the exception sent to me.

There may already be a way to do this that I don't know about.  Any pointers
are appreciated.

I'm using Tomcat 4.0.3 on linux.

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Exception Handling

2002-06-12 Thread Subir Sengupta

Hi,

I'd like to be able to trap all exceptions and show users a friendly error
page.  I know I can specify which exception to trap in the web.xml file and
what error pages to display. But it seems that will only trap exceptions
that I specify and let any other exceptions through!  So that doesn't seem
like a very practical way to deal with exceptions.

When an exception is thrown, Tomcat prints the stacktrace to the browser.
Is there a way to hook into this mechanism and have Tomcat display an error
page instead.  Also I'd like to have an email with the exception sent to me.

There may already be a way to do this that I don't know about.  Any pointers
are appreciated.

I'm using Tomcat 4.0.3 on linux.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Tomcat 4.0.3 and Mod JK problem

2002-06-09 Thread Subir Sengupta

 Update.  I added an Alias element - 172.28.101.132 inside my
Host element, and the error went away.

So, the question now is, why do I need to alias the servers IP address?

Thanks,
Subir

-Original Message-
From: Subir Sengupta
To: ''[EMAIL PROTECTED]' '
Sent: 6/9/02 1:32 PM
Subject: RE: Tomcat 4.0.3 and Mod JK problem

Ok, I figured out what is causing this but not why.  If I hit my server
with
an IP address i.e. 172.28.101.132, it causes the error below and I get a
400- Bad Request in the browser.  However, if I telnet to 172.28.101.132
port 80, the server will successfully serve a page.

Could this be a network problem or is it a server.xml configuration
problem?

Thanks,
Subir



-Original Message-
From: Subir Sengupta
To: '[EMAIL PROTECTED]'
Sent: 6/8/02 9:06 PM
Subject: Tomcat 4.0.3 and Mod JK problem

Hi,

I have Tomcat running on my dev box, with no problems.  I moved tomcat
over
to another server and I now start getting this error:

StandardEngine[Walmart]: Mapping server name '172.28.101.132'
StandardEngine[Walmart]:  Trying a direct match
StandardEngine[Walmart]:  Trying an alias match
StandardEngine[Walmart]:  Trying the default host
StandardEngine[Walmart]: Mapping server name '172.28.101.132'
StandardEngine[Walmart]:  Trying a direct match
StandardEngine[Walmart]:  Trying an alias match
StandardEngine[Walmart]:  Trying the default host

Here are snippets from my workers.properties and server.xml files.

workers.properties

# The workers that your plugins should create and work with
#
worker.list=ajp12,ajp13-0
worker.ajp13-0.port=8009
worker.ajp13-0.host=localhost
worker.ajp13-0.type=ajp13
# /AJP13WORKERS

server.xml



  



The site will still serve pages but it keeps repeating the above
message.
Any ideas about what would cause this are appreciated.

Thanks,
Subir


 <> 
 <>  <> 

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Tomcat 4.0.3 and Mod JK problem

2002-06-09 Thread Subir Sengupta

Ok, I figured out what is causing this but not why.  If I hit my server with
an IP address i.e. 172.28.101.132, it causes the error below and I get a
400- Bad Request in the browser.  However, if I telnet to 172.28.101.132
port 80, the server will successfully serve a page.

Could this be a network problem or is it a server.xml configuration problem?

Thanks,
Subir



-Original Message-
From: Subir Sengupta
To: '[EMAIL PROTECTED]'
Sent: 6/8/02 9:06 PM
Subject: Tomcat 4.0.3 and Mod JK problem

Hi,

I have Tomcat running on my dev box, with no problems.  I moved tomcat
over
to another server and I now start getting this error:

StandardEngine[Walmart]: Mapping server name '172.28.101.132'
StandardEngine[Walmart]:  Trying a direct match
StandardEngine[Walmart]:  Trying an alias match
StandardEngine[Walmart]:  Trying the default host
StandardEngine[Walmart]: Mapping server name '172.28.101.132'
StandardEngine[Walmart]:  Trying a direct match
StandardEngine[Walmart]:  Trying an alias match
StandardEngine[Walmart]:  Trying the default host

Here are snippets from my workers.properties and server.xml files.

workers.properties

# The workers that your plugins should create and work with
#
worker.list=ajp12,ajp13-0
worker.ajp13-0.port=8009
worker.ajp13-0.host=localhost
worker.ajp13-0.type=ajp13
# /AJP13WORKERS

server.xml



  



The site will still serve pages but it keeps repeating the above
message.
Any ideas about what would cause this are appreciated.

Thanks,
Subir


 <> 
 <>  <> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Tomcat 4.0.3 and Mod JK problem

2002-06-08 Thread Subir Sengupta

Hi,

I have Tomcat running on my dev box, with no problems.  I moved tomcat over
to another server and I now start getting this error:

StandardEngine[Walmart]: Mapping server name '172.28.101.132'
StandardEngine[Walmart]:  Trying a direct match
StandardEngine[Walmart]:  Trying an alias match
StandardEngine[Walmart]:  Trying the default host
StandardEngine[Walmart]: Mapping server name '172.28.101.132'
StandardEngine[Walmart]:  Trying a direct match
StandardEngine[Walmart]:  Trying an alias match
StandardEngine[Walmart]:  Trying the default host

Here are snippets from my workers.properties and server.xml files.

workers.properties

# The workers that your plugins should create and work with
#
worker.list=ajp12,ajp13-0
worker.ajp13-0.port=8009
worker.ajp13-0.host=localhost
worker.ajp13-0.type=ajp13
# /AJP13WORKERS

server.xml



  



The site will still serve pages but it keeps repeating the above message.
Any ideas about what would cause this are appreciated.

Thanks,
Subir


 <> 



Subir Sengupta (E-mail).vcf
Description: Binary data

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


RE: web.xml DTD

2002-06-07 Thread Subir Sengupta

Yes, the order of the elements do matter.  The chapter from Marty Hall's
book 'More Servlets and Java Server Pages' that deals with web.xml elements
is online at www.moreservlets.com and is very informative - highly
recommended.  The site seems to be down right now otherwise I would have
provided a link to that chapter.

Subir

-Original Message-
From: Bo Min Jiang [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 5:23 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: web.xml DTD


Actually, you can find the DTD at http://java.sun.com/dtd/.  The file is
web-app_2_3.dtd

Also, I've found that the order of the elements does matter - on Tomcat
4.0.3, I have encountered startup errors when some elements were out of
order, e.g. placing  before .

Bo

-Original Message-
From: Guillaume de Roujoux [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 5:06 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: web.xml DTD


I don't think there is one (I have never seen one).
But the order of elements should not matter (provided they are here !)

Guillaume
- Original Message -
From: "August Detlefsen" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, June 07, 2002 4:54 PM
Subject: web.xml DTD


> Where can I find the DTD for web.xml? I want to make sure I have the
> elements in the correct order.
>
> Thanks,
> August
>
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to load properties into tomcat 4.0.3?

2002-06-05 Thread Subir Sengupta

Sorry, I don't know how to do this for a bean.  Perhaps someone else who
works with beans could help.

Sorry about that.

-Original Message-
From: Adam Pfeiffer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 9:54 AM
To: Tomcat Users List
Subject: RE: How to load properties into tomcat 4.0.3?


I am still a bit confused.  I do not know what the servlet-name and
servlet-class are referring
to?

The Jsp Page it called TopNav.jsp and the bean is called PictureBrowserBean.
I want to have the
bean PictureBrowserBean be able to access the extra parameter.  In this
case, the location of the
properties file. Here i my guess at what I would do


 TopNav
 PictureBrowserBean
  
propFile
/opt/jakarta-tomcat-4.0.3/webapps/trips-dev
  


Is this correct?  I am going to try this, but I am a bit short on time right
now.  Thanks again
for your help.

Adam


--- Subir Sengupta <[EMAIL PROTECTED]> wrote:
> You can do something like this in your web.xml
> 
> 
>  somename
>  someclass
>   
> param1
> somevalue
>   
> 
> 
> You can then call getServletConfig().getInitParameter("param1") from the
> init method of the somename servlet.
> 
> Hope this helps,
> Subir
> 
> -Original Message-
> From: Adam Pfeiffer [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 10:52 PM
> To: [EMAIL PROTECTED]
> Subject: How to load properties into tomcat 4.0.3?
> 
> 
> Hello,
> I have a bean that uses the Properties Object.  Currently, on each jsp
that
> calls that bean I have
> to do a bean.setPropsDir() which sets the directory where to find the
> properties file.  Is there a
> way in server.xml, web.xml or some other way that I can put in a variable
> that will define the
> directory where the properites file exists so that the class can access
> this?  
> 
> Thanks.
> 
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




How to set domain for default JSESSIONID cookie

2002-06-05 Thread Subir Sengupta

Hi,

If there a way to configure domain and Max Age for the Default JSESSIONID
cookie that Tomcat 4.03 sets.  I was wondering if I could do this in the
web.xml or server.xml files or do I need to do this programatically?

Thanks,
Subir

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to load properties into tomcat 4.0.3?

2002-06-04 Thread Subir Sengupta

You can do something like this in your web.xml


 somename
 someclass
  
param1
somevalue
  


You can then call getServletConfig().getInitParameter("param1") from the
init method of the somename servlet.

Hope this helps,
Subir

-Original Message-
From: Adam Pfeiffer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 10:52 PM
To: [EMAIL PROTECTED]
Subject: How to load properties into tomcat 4.0.3?


Hello,
I have a bean that uses the Properties Object.  Currently, on each jsp that
calls that bean I have
to do a bean.setPropsDir() which sets the directory where to find the
properties file.  Is there a
way in server.xml, web.xml or some other way that I can put in a variable
that will define the
directory where the properites file exists so that the class can access
this?  

Thanks.

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: AW: How to use setRequestedSessionId

2002-06-04 Thread Subir Sengupta

I'm still unclear about how to do this.  Once a request has been associated
with a session, how do we associate it with a different session.  I'm
probably wrong but it seems the only way is to use setRequestedSessionId().
Once I call getSession(), the session gets associated with the request, and
I'm not sure how to associate it with another session.  I tried setting up
an HttpRequestWrapper but it needs a bunch of abstract methods implemented.

Here's what I'm trying to do:
- In a filter, get the session ID (getSession().getId()) and compare the
value with a value set in another cookie
- if they don't match, create a new session
- associate the new session with the request

So, it's the last step that I don't know how to do.

Any help is appreciated.

Thanks,
Subir



-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 11:23 AM
To: Tomcat Users List
Subject: Re: AW: How to use setRequestedSessionId




On Mon, 3 Jun 2002, Ralph Einfeldt wrote:

> Date: Mon, 3 Jun 2002 19:03:46 +0200
> From: Ralph Einfeldt <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: AW: How to use setRequestedSessionId
>
> Have a look at:
> http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg41615.html
>

Ralph, thanks for pointing people to the archives :-).  There is lots of
good stuff there.  This one, happens to be a ResponseWrapper -- the
principles of writing a request wrapper are really similar.

The outline of a "conditionally create the session" filter might be lke
this:

public class MyFilter implements Filter {

public void doFilter(ServletRequest request,
 ServletResponse response,
 FilterChain chain)
  throws IOException, ServletException {

HttpServletRequestWrapper wrapper =
  new MyWrapper((HttpServletRequest) request;
chain.doFilter(wrapper, response);

}

}

and the corresponding wrapper class would look like:

public class MyWrapper extends HttpServletRequestWrapper {

public HttpSession getSession() {
if (ok to create session) {
return super.getSession();
} else {
return (null);
}

public HttpSession getSession(boolean create) {
if (ok to create session) {
return super.getSession(create);
} else {
return (null);
}
}


}

All of the rest of the HttpServletRequest methods get delegated through to
the original request -- you only need to override the stuff you want to
customize.  The wrapper instance is ultimately passed on to your servlet
or JSP page, which doesn't necessarily know that the wrapping took place.

Filters and wrappers are very cool -- it's worth your time learning how to
use them.  One source of information is the tutorial on web applications
that is availavle with the Java Web Services Developer Pack
(http://java.sun.com/webservices/), which includes Tomcat 4 as its server.

Useful homework exercise - write a Filter and request wrapper that add a
new request parameter to the request, under certain conditions.

Craig


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




FW: AW: How to use setRequestedSessionId

2002-06-04 Thread Subir Sengupta



I'm still unclear about how to do this.  Once a request has been associated
with a session, how do we associate it with a different session.  I'm
probably wrong but it seems the only way is to use setRequestedSessionId().
Once I call getSession(), the session gets associated with the request, and
I'm not sure how to associate it with another session.  I tried setting up
an HttpRequestWrapper but it needs a bunch of abstract methods implemented.

Here's what I'm trying to do:
- In a filter, get the session ID (getSession().getId()) and compare the
value with a value set in another cookie
- if they don't match, create a new session
- associate the new session with the request

So, it's the last step that I don't know how to do.

Any help is appreciated.

Thanks,
Subir



-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 11:23 AM
To: Tomcat Users List
Subject: Re: AW: How to use setRequestedSessionId




On Mon, 3 Jun 2002, Ralph Einfeldt wrote:

> Date: Mon, 3 Jun 2002 19:03:46 +0200
> From: Ralph Einfeldt <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: AW: How to use setRequestedSessionId
>
> Have a look at:
> http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg41615.html
>

Ralph, thanks for pointing people to the archives :-).  There is lots of
good stuff there.  This one, happens to be a ResponseWrapper -- the
principles of writing a request wrapper are really similar.

The outline of a "conditionally create the session" filter might be lke
this:

public class MyFilter implements Filter {

public void doFilter(ServletRequest request,
 ServletResponse response,
 FilterChain chain)
  throws IOException, ServletException {

HttpServletRequestWrapper wrapper =
  new MyWrapper((HttpServletRequest) request;
chain.doFilter(wrapper, response);

}

}

and the corresponding wrapper class would look like:

public class MyWrapper extends HttpServletRequestWrapper {

public HttpSession getSession() {
if (ok to create session) {
return super.getSession();
} else {
return (null);
}

public HttpSession getSession(boolean create) {
if (ok to create session) {
return super.getSession(create);
} else {
return (null);
}
}


}

All of the rest of the HttpServletRequest methods get delegated through to
the original request -- you only need to override the stuff you want to
customize.  The wrapper instance is ultimately passed on to your servlet
or JSP page, which doesn't necessarily know that the wrapping took place.

Filters and wrappers are very cool -- it's worth your time learning how to
use them.  One source of information is the tutorial on web applications
that is availavle with the Java Web Services Developer Pack
(http://java.sun.com/webservices/), which includes Tomcat 4 as its server.

Useful homework exercise - write a Filter and request wrapper that add a
new request parameter to the request, under certain conditions.

Craig


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Any way to tell how many sessions exist?

2002-06-03 Thread Subir Sengupta

Standard Manager has a findSessions() method, which will return an array of
all session in the Hashtable.

-Original Message-
From: Rick Mann [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 4:20 AM
To: tomcat user jakarta.apache.org
Subject: Any way to tell how many sessions exist?


I wanted to write a JSP to display server stats. I was hoping to be able to
get all the sessions, show how many there were, what their ages were, etc.
But it appears that access to the collection of sessions has been deprecated
from the Servlet 2.3 API.

Is there a way to get at this info, preferrably in a container-independent
manner? I will settle for a Tomcat-specific solution.

TIA,

-- 
Rick



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: RequestWrappers

2002-06-03 Thread Subir Sengupta

Hi,

Craig answered one of my questions and posted an example of a
RequestWrapper.  Here it is

http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/msg55350.html

Subir

-Original Message-
From: Cox, Charlie [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 4:48 AM
To: 'Tomcat Users List'
Subject: RE: RequestWrappers


here is an example posted by Craig to wrap the response(in a filter), but
you can see how to wrap the request from this example.

http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg41615.html


Charlie

> -Original Message-
> From: Joe Tomcat [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, June 02, 2002 10:36 PM
> To: Tomcat Users List
> Subject: Re: RequestWrappers
> 
> 
> On Sunday 02 June 2002 16:41, you wrote:
> > does anyone have any experience with making custom RequestWrappers
> > with Catalina? I keep finding that my custom RequestWrapper is being
> > wrapped by a catalina RequestWrapper -- making mine useless. Has
> > anyone had this problem and solved it?
> 
> There seems to be very little documentation or tutorials 
> about this subject.  
> I think it's in the more esoteric section of things.  I would 
> like to know, 
> too.  I tried to use a request wrapper but I couldn't get it to work 
> correctly so I gave up.
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: AW: How to use setRequestedSessionId

2002-06-03 Thread Subir Sengupta

Craig,

Thanks for this example.  It's very very useful.  I did search for request
wrappers but didn't find anything.  There were some postings yesterday from
people looking for RequestWrapper examples.  I'll point them to this
posting.

I'll take a look at the tutorial and do the homework.

Thanks again,
Subir

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 11:23 AM
To: Tomcat Users List
Subject: Re: AW: How to use setRequestedSessionId




On Mon, 3 Jun 2002, Ralph Einfeldt wrote:

> Date: Mon, 3 Jun 2002 19:03:46 +0200
> From: Ralph Einfeldt <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: AW: How to use setRequestedSessionId
>
> Have a look at:
> http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg41615.html
>

Ralph, thanks for pointing people to the archives :-).  There is lots of
good stuff there.  This one, happens to be a ResponseWrapper -- the
principles of writing a request wrapper are really similar.

The outline of a "conditionally create the session" filter might be lke
this:

public class MyFilter implements Filter {

public void doFilter(ServletRequest request,
 ServletResponse response,
 FilterChain chain)
  throws IOException, ServletException {

HttpServletRequestWrapper wrapper =
  new MyWrapper((HttpServletRequest) request;
chain.doFilter(wrapper, response);

}

}

and the corresponding wrapper class would look like:

public class MyWrapper extends HttpServletRequestWrapper {

public HttpSession getSession() {
if (ok to create session) {
return super.getSession();
} else {
return (null);
}

public HttpSession getSession(boolean create) {
if (ok to create session) {
return super.getSession(create);
} else {
return (null);
}
}


}

All of the rest of the HttpServletRequest methods get delegated through to
the original request -- you only need to override the stuff you want to
customize.  The wrapper instance is ultimately passed on to your servlet
or JSP page, which doesn't necessarily know that the wrapping took place.

Filters and wrappers are very cool -- it's worth your time learning how to
use them.  One source of information is the tutorial on web applications
that is availavle with the Java Web Services Developer Pack
(http://java.sun.com/webservices/), which includes Tomcat 4 as its server.

Useful homework exercise - write a Filter and request wrapper that add a
new request parameter to the request, under certain conditions.

Craig


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to use setRequestedSessionId

2002-06-03 Thread Subir Sengupta

Craig,

Thanks for the clarification.  I didn't realize that JSP was creating the
sessions.  I was blaming Tomcat!

Could you point me at an example of a RequestWrapper.  I couldn't find one
anywhere.

Thanks again,
Subir

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 9:10 AM
To: Tomcat Users List
Subject: Re: How to use setRequestedSessionId




On Mon, 3 Jun 2002, Subir Sengupta wrote:

> Date: Mon, 3 Jun 2002 00:24:33 -0700
> From: Subir Sengupta <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: How to use setRequestedSessionId
>
> Hi,
>
> I'm not sure how to do this and was hoping for some pointers.  I have a
> filter that intercepts the session in the request.  I then compare the
> Session Id to another value and based on some calculations either accept
or
> reject the Session Id.  Here's the question.  How do I invalidate the
> session and assign my own Session Id to the request?  Or have the request
> reuse an existing session object.  setRequestedSessionId does not seem to
be
> available from the filter, so I don't know how to change the session
> associated with the request.  I wrote my own version of the Standard
> Manager, but the manager doesn't have access to the request, so I can't do
> it there.
>
> One of the uses for this is to not create a session everytime a particular
> page is hit by a monitoring system (every 5 seconds).  Tomcat will create
a
> new session every time, which is wasteful.  If I could reuse the session
in
> this case, that would be ideal.
>
> Would a HttpRequestWrapper work here and if so can anyone provide an
> example.  I couldn't find any.
>
> I'm using Tomcat 4.03 on Linux.
>

It sounds to me like you are approaching this problem from the wrong
direction.

Tomcat creates a session automatically in only two circumstances -- when
you are using form-based login or the single sign-on facility.  In all
other cases, the application must ask for sessions to be created.

My bet is that you are running into the fact that JSP pages ask for
sessions to be created by default.  This is simple to turn off -- just put
the following at the top of the page your monitoring system is accessing:

  <%@ page session="false" %>

and making sure that you're not using form-based login or single sign-on
for this webapp.

If you really have your heart set on selectively creating the session or
not, you're best off by creating a Filter that creates a wrapper around
the request that overrides the getSession() methods.  Your wrapper
implementation can look at the request and decide whether or not to really
create it -- if so, call super.getSession() and return the value, or
otherwise just return null.  (As an added bonus, this will work on any
Servlet 2.3 container, because it does not involve modifying the container
internals.)


> Thanks,
> Subir
>

Craig McClanahan


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




How to use setRequestedSessionId

2002-06-03 Thread Subir Sengupta

Hi,

I'm not sure how to do this and was hoping for some pointers.  I have a
filter that intercepts the session in the request.  I then compare the
Session Id to another value and based on some calculations either accept or
reject the Session Id.  Here's the question.  How do I invalidate the
session and assign my own Session Id to the request?  Or have the request
reuse an existing session object.  setRequestedSessionId does not seem to be
available from the filter, so I don't know how to change the session
associated with the request.  I wrote my own version of the Standard
Manager, but the manager doesn't have access to the request, so I can't do
it there.

One of the uses for this is to not create a session everytime a particular
page is hit by a monitoring system (every 5 seconds).  Tomcat will create a
new session every time, which is wasteful.  If I could reuse the session in
this case, that would be ideal.

Would a HttpRequestWrapper work here and if so can anyone provide an
example.  I couldn't find any.

I'm using Tomcat 4.03 on Linux.

Thanks,
Subir


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: strange shut down problem - solution?

2002-05-22 Thread Subir Sengupta

This is definitely what is happening on my system, which is similar to yours
(Tomcat 4.0.3 on a linux box).  The problem seems to be with Tomcat starting
non Daemon threads in the WebappLoader and StandardLoader.  You could fix
that yourself and recompile and that may fix it. I'm going to try this when
I have some time. Of course, make sure that your app doesn't start non
Daemon threads.

The other options are to kill the threads like Mats' suggestion (kludgey,
but it works).  A simple 'killall java' works too.  You could also implement
a LifecycleListener that has a System.exit(0) statement as the last line in
the stop method.

Subir

-Original Message-
From: Cindy Ballreich [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 22, 2002 9:01 AM
To: Tomcat Users List
Subject: RE: strange shut down problem - solution?


At 05:45 PM 5/21/02 -0700, Subir Sengupta wrote:
>This is a documented bug.  Apparently if there is a non Daemon thread
>running Tomcat won't shut down cleanly.
>
>http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8700
>

Hmmm. That sure sounds like what's happening on my system. I guess
catalina.sh is called as daemon in the init.d script, but it's not starting
the threads as deamon. Is this what's happening?

At 10:13 AM 5/22/02 +0200, Mats Nyberg wrote:
>and a guru told me to
>
>  [tim-mn@spiderman src]$ ps -Af|awk '{ if ($3 == "1") { print ; } }' 
>|grep $JAVA_HOME|awk '{ print $2}'

This is basically the "solution" that I used. 
I added this line to the start section of my init.d script...
ps -Af | awk '{ if ($3 == "1") { print ; } }' | grep tomcat | awk '{ print
$2}' > /var/run/tomcat4.pid

And these lines to the stop section...
if [ -s /var/run/tomcat4.pid ] ; then
PID=`cat /var/run/tomcat4.pid`
kill $PID
fi

This works, but it seems like a horrible kludge to me. Does anyone have any
better solutions?

Cindy

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: strange shut down problem

2002-05-21 Thread Subir Sengupta

This is a documented bug.  Apparently if there is a non Daemon thread
running Tomcat won't shut down cleanly.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8700

Subir

-Original Message-
From: Phillip Morelock [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 5:16 PM
To: Tomcat Users List
Subject: Re: strange shut down problem


this might get you started...

run the following commands and send your output:

netstat -a

lsof | grep java

although that second one might have a lot of outputin which case look
over that to see which files, devices, and ports the JVM has open.

fillup


On 5/21/02 4:58 PM, "Cindy Ballreich" <[EMAIL PROTECTED]> wrote:

> I've got Tomcat 4.0.3 on Redhat 7.1 and when I start it I get the usual
batch
> of 20-50 threads. When I shut tomcat down (using shutdown.sh) there are
about
> a dozen threads that don't go away. Tomcat is definately not running (at
least
> it's not accepting requests), but the threads are still there. I'm not
seeing
> any errors, but I'm not sure where to look. I've done some web searches of
the
> archives and haven't found anything, but I'm hoping that someone will
> recognize this problem and point me in the right direction.
> 
> Thanks!!
> 
> Cindy
> 
> 
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

> 


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: PLZ HELP Administration TC 4.0.3

2002-05-19 Thread Subir Sengupta

ALSO READ THE Tomcat docs before posting questions like this here!!!



-Original Message-
From: Felipe R. Lorenzo VI [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 20, 2002 1:54 AM
To: Tomcat Users List
Subject: Re: PLZ HELP Administration TC 4.0.3




Please read $CATALINA_HOME/bin/catalina.sh or
%CATALINA_HOME%/bin/catalina.bat.

it describe in details their meaning 

frlvi




5/19/02 10:41:50 AM, puneet sachar <[EMAIL PROTECTED]> wrote:

>
>
>Listen i got few peoblem in administrating Tomcat
>4.0.3 
>
>Can u help me ...plz guide me ..
>
>Here follows the queries
>
>1) Difference b/w Tomcat_HOME and CATALINA_HOME and
>CATALINA_BASE ?
>
>1.1)IS CATALINA_BASE is something related to different
>context in a single container?
>
>
>2)what is ANT_HOME ?
>2.1) Do we have to install something additional to
>tomcat ? (apart jdk.13.x series)
>
>2.2) What are u doing at ur place with Tomact 3.x
>series ?
>
>3) where is httpd.conf/tomcat.conf file ?
>
>4) Where to add new context in tomcat?
>
>5) what to write in build.xml and it is needed to
>amend that file?
>what exactly this build.xml file do?
>is it necessary to have web.xml in each context and
>what its function?
>
>6) LIKE expample directory in webapps i want to have
>my own context ..as i don't want to keep my files in
>root directory directly and i want to have different
>packages and what i'll do if i want to comunicate b/w
>the 2 context. (i tried by making common .jar file and
>tell u its not working )
>
>
>
>
>
>Regards
>Puneet Sachar
>
>__
>Do You Yahoo!?
>LAUNCH - Your Yahoo! Music Experience
>http://launch.yahoo.com
>
>--
>To unsubscribe, e-mail:

>For additional commands, e-mail:

>




--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: I'm sure someone has tried this!! RE: Problem changing the defau lt cookie name JSESSIONID

2002-05-16 Thread Subir Sengupta

Thanks Craig.  That's a good suggestion, I'll recompile Tomcat.

I need to do this since we have many infrastructure type legacy apps and
third party websites that look for this cookie.  It's much easier to change
the cookie name rather than trying to change every app and third party that
depends on this cookie.  I know I could create another cookie, but I wanted
to take advantage of Tomcat's session management and cookie setting without
having to duplicate it.

BTW, I figured out what I was missing.  There were a couple of classes in
the AJP connector that had to be recompiled.  It works now.

Thanks,
Subir

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 16, 2002 12:16 PM
To: Tomcat Users List
Subject: Re: I'm sure someone has tried this!! RE: Problem changing the
defau lt cookie name JSESSIONID 



I doubt too many people have done this, since changing the cookie name
violates the servlet spec, and therefore it's a *really* bad idea.

Doing partial recompiles of a large application like this seems like a
chancy thing .. you are assuming that you know *all* of the dependencies,
including the indirect ones.  Recompile *all* of Tomcat, following the
procedures described in the BUILDING.txt document in the source
repository.

Craig


On Thu, 16 May 2002, Subir Sengupta wrote:

> Date: Thu, 16 May 2002 09:38:38 -0700
> From: Subir Sengupta <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: I'm sure someone has tried this!!  RE: Problem changing the
> defau lt cookie name JSESSIONID
>
>
>
> -Original Message-
> From: Subir Sengupta [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 15, 2002 8:42 PM
> To: '[EMAIL PROTECTED]'
> Subject: Problem changing the default cookie name JSESSIONID
>
>
> Hi All,
>
> I need to change the cookie name form JSESSIONID to something else.  I
> changed the default in org.apache.catalina.Globals.java.  I also
recompiled
> all the classes that had references to the Globals.SESSION_COOKIE_NAME
> constant.  After re-jarring catalina.jar I restarted Tomcat and it still
> created cookies with JSESSIONID as the cookie name.
>
> Can anyone tell me what I'm missing.  Is there any other class that I
> missed.  I did grep through the class files and found my cookie name, so
it
> looks like everything compiled correctly.
>
> Also, does anyone know which class creates new cookies?
>
> I'm using Tomcat 4.0.3, Apache 1.3 and running on a Linux server.
>
> Thanks in advance,
> Subir
>
>
>  <>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




I'm sure someone has tried this!! RE: Problem changing the default cookie name JSESSIONID

2002-05-16 Thread Subir Sengupta



-Original Message-
From: Subir Sengupta [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 15, 2002 8:42 PM
To: '[EMAIL PROTECTED]'
Subject: Problem changing the default cookie name JSESSIONID


Hi All,

I need to change the cookie name form JSESSIONID to something else.  I
changed the default in org.apache.catalina.Globals.java.  I also recompiled
all the classes that had references to the Globals.SESSION_COOKIE_NAME
constant.  After re-jarring catalina.jar I restarted Tomcat and it still
created cookies with JSESSIONID as the cookie name.

Can anyone tell me what I'm missing.  Is there any other class that I
missed.  I did grep through the class files and found my cookie name, so it
looks like everything compiled correctly.

Also, does anyone know which class creates new cookies?

I'm using Tomcat 4.0.3, Apache 1.3 and running on a Linux server.

Thanks in advance,
Subir


 <> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Problem changing the default cookie name JSESSIONID

2002-05-15 Thread Subir Sengupta

Hi All,

I need to change the cookie name form JSESSIONID to something else.  I
changed the default in org.apache.catalina.Globals.java.  I also recompiled
all the classes that had references to the Globals.SESSION_COOKIE_NAME
constant.  After re-jarring catalina.jar I restarted Tomcat and it still
created cookies with JSESSIONID as the cookie name.

Can anyone tell me what I'm missing.  Is there any other class that I
missed.  I did grep through the class files and found my cookie name, so it
looks like everything compiled correctly.

Also, does anyone know which class creates new cookies?

I'm using Tomcat 4.0.3, Apache 1.3 and running on a Linux server.

Thanks in advance,
Subir


 <> 



Subir Sengupta (E-mail).vcf
Description: Binary data

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


Getting a reference to a Manager from a filter

2002-05-09 Thread Subir Sengupta

Hi,

I'm implementing my own Manager so that I can overwrite createSession()  to
be able to create my own Sessions.  I also want to access this manager from
a filter.  Does anyone know how to do this?  The persistentManagerBase
example that comes with Tomcat 4 shows me how to do the first part, however
I don't see how to get a reference to the Manager from the filter.
ServletRequest doesn't have a getManager() method.  Request has a
getManager() method but I get a classCastException if I cast ServletRequest
to Request.

Does anyone know how to do this?

Thanks in advance,
Subir


 <> 



Subir Sengupta (E-mail).vcf
Description: Binary data

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


RE: Log the amount of time taken to complete a request...

2002-05-03 Thread Subir Sengupta

That is the size of the request in bytes.  To clock a request in Tomcat 4
you would have to write a filter.  There is an example filter called,
appropriately enough, ExampleFilter.java that comes with T4.  It does
exactly what you want.

Subir

-Original Message-
From: peter lin [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 03, 2002 9:32 AM
To: Tomcat Users List
Subject: Re: Log the amount of time taken to complete a request...



Hmm I think it's response time.  Here is more access log entries.

127.0.0.1 - - [03/May/2002:12:30:09 -0500] "GET /people.jsp HTTP/1.0"
200 20106
127.0.0.1 - - [03/May/2002:12:30:44 -0500] "GET /people.jsp HTTP/1.0"
200 7168
127.0.0.1 - - [03/May/2002:12:30:44 -0500] "GET /people.jsp HTTP/1.0"
200 7168
127.0.0.1 - - [03/May/2002:12:30:47 -0500] "GET /people.jsp HTTP/1.0"
200 7168
127.0.0.1 - - [03/May/2002:12:30:47 -0500] "GET /people.jsp HTTP/1.0"
200 7168
127.0.0.1 - - [03/May/2002:12:30:47 -0500] "GET /people.jsp HTTP/1.1"
200 20129
127.0.0.1 - - [03/May/2002:12:30:47 -0500] "GET /people.jsp HTTP/1.0"
200 20106
127.0.0.1 - - [03/May/2002:12:30:55 -0500] "GET /people.jsp HTTP/1.0"
200 20106
127.0.0.1 - - [03/May/2002:12:31:02 -0500] "GET /people.jsp HTTP/1.0"
200 8192
127.0.0.1 - - [03/May/2002:12:31:02 -0500] "GET /people.jsp HTTP/1.1"
200 20129
127.0.0.1 - - [03/May/2002:12:31:06 -0500] "GET /people.jsp HTTP/1.0"
200 20106

peter


Christopher Moon wrote:
> 
> I think that is the size in bytes of the request.  If I am wrong that
> would be excellent!
> 
> Thanks
> Chris
> 
> -Original Message-
> From: peter lin [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 03, 2002 10:59 AM
> To: Tomcat Users List
> Subject: Re: Log the amount of time taken to complete a request...
> 
> I thought it already does in the access log.
> 
> 127.0.0.1 - - [11/Apr/2002:14:21:44 -0500] "GET
> /test.jsp?A=me&B=this&C=test HTTP/1.0" 200 17317
> 
> Isn't the number after 200 the response in milliseconds?
> 
> peter
> 
> Christopher Moon wrote:
> >
> > Good Morning,
> >
> > Is it possible for Tomcat to log the amount of taken to complete a
> > request.
> >
> > With Apache you can use %T in your custom log directive.  Is there
> > anything similar in Tomcat?
> >
> > Thanks
> > Chris
> >
> > --
> > To unsubscribe:   
> > For additional commands: 
> > Troubles with the list: 
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: SystemErrLogger and SystemOutLogger

2002-04-26 Thread Subir Sengupta

You can change the directory and file name in catalina.sh like so:

  org.apache.catalina.startup.Bootstrap "$@" start \
  >> "$CATALINA_BASE"/what/ever/directory/whatever.out 2>&1 &

You don't have to change $CATALINA_BASE.  Yes, that would be one more file
your config
script would have to change but AFAIK that's the only way to do it.

Subir

-Original Message-
From: Mark R. Diggory [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 26, 2002 5:49 PM
To: Tomcat Users List
Subject: Re: SystemErrLogger and SystemOutLogger


Thanks,

Yes, I read this numerous times. But, I'd like something simpler than 
manipulating the dtomcat4 script (which is what I want to avoid). I'd 
like a way to set it in the /etc/tomcat4/conf/tomcat4 preferences or in 
server.xml. I'm not looking for a quick fix to configure this on one 
machine, I need to setup a configuration script that sets up certain 
settings in tomcat for our software installation across many many many 
machines. I want to manipulate as few files as possible. If anything I'd 
like to include a  /etc/tomcat4/conf/tomcat4.conf file that covers 
everything and just copy it over to /etc/tomcat4/conf/tomcat4.

It seems a little confusing to have tomcat configured from 3 different 
locations:

/etc/tomcat4/conf/tomcat4
/usr/bin/dtomcat4
/var/tomcat4/conf/server.xml

One never knows what is a $Param one can set in 
/etc/tomcat4/conf/tomcat4.conf or a hand edit that needs to be done in 
/usr/bin/dtomcat4 vs something that can be configured in the server.xml 
file. Seems a little cleaner organization could be used here? Something 
like environmental settings to startup tomcat going in 
/etc/tomcat4/conf/tomcat4 and configuring behavior of tomcat after 
startup to go in server.xml (which would include location of "all" logs 
and such).I'm confused as to why there are SystemErrLogger and 
SystemOutLogger entries I could set in server.xml and yet I can't adjust 
anything like the directories on these entries.

As well, I'm stuck with "$CATALINA_BASE"/logs/catalina.out as the 
location of  catalina out based on the /usr/bin/dtomcat4. Yes I can 
change $CATALINA_BASE, but I'm stuck with /logs/catalina.out

  org.apache.catalina.startup.Bootstrap "$@" start \
  >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &

what if I wanted to just set the location of my catalina.out to be where 
I configured the other logs to be in my server.xml file ( which is 
/var/log/tomcat/ ), I can't really do it without going in and 
manipulating the dtomcat4 script. I'm not really interested in 
manipulating dtomcat4, I really just want to configure tomcat using 
either /etc/tomcat4/conf/tomcat4 or /var/tomcat4/conf/server.xml.

besides, if I set CATALINA_BASE doesn't that adjust everything else 
dynamic like the location of the webapps directory?

It's great to have the ability to adjust the location of the temp 
directory. I just think we could also use such functionality for the 
logs as well (and not have it dependent on CATALINA_BASE).

My 2 cents,
Mark Diggory


Subir Sengupta wrote:

>By default SystemErrLogger and SystemOutLogger go to logs/catalina.out,
>unless you changed the name of the output target in the bin/catalina.sh
>script from catalina.out to something else.  This is explained in the docs
>http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/logger.html
>
>Hope this helps,
>Subir
>
>-Original Message-
>From: Mark Diggory [mailto:[EMAIL PROTECTED]]
>Sent: Friday, April 26, 2002 3:22 PM
>To: [EMAIL PROTECTED]
>Subject: SystemErrLogger and SystemOutLogger
>
>
>I was trying to push all tomcats logging up into a different directory
>than /var/tomcat4/logs for our log managment purposes.
>
>I see I can set directory attributes on all FileLoggers but not on the
>default SystemErrLogger and SystemOutLogger.
>
>Is there a simple way I can do this? I like the way the temp directory
>has becaome configurable in /etc/tomcat4/conf/tomcat4.conf. Having this
>in there as well would be cool too.
>
>-Mark Diggory
>
>
>
>--
>To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>For additional commands: <mailto:[EMAIL PROTECTED]>
>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>For additional commands: <mailto:[EMAIL PROTECTED]>
>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>




--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: SystemErrLogger and SystemOutLogger

2002-04-26 Thread Subir Sengupta

By default SystemErrLogger and SystemOutLogger go to logs/catalina.out,
unless you changed the name of the output target in the bin/catalina.sh
script from catalina.out to something else.  This is explained in the docs
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/logger.html

Hope this helps,
Subir

-Original Message-
From: Mark Diggory [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 26, 2002 3:22 PM
To: [EMAIL PROTECTED]
Subject: SystemErrLogger and SystemOutLogger


I was trying to push all tomcats logging up into a different directory
than /var/tomcat4/logs for our log managment purposes.

I see I can set directory attributes on all FileLoggers but not on the
default SystemErrLogger and SystemOutLogger.

Is there a simple way I can do this? I like the way the temp directory
has becaome configurable in /etc/tomcat4/conf/tomcat4.conf. Having this
in there as well would be cool too.

-Mark Diggory



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Request Interceptor

2002-04-25 Thread Subir Sengupta

Great.

Let me know what you replace request.getFacade()with.

Subir

-Original Message-
From: Venkatesh Sangam [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 25, 2002 12:37 PM
To: Tomcat Users List
Subject: Re: Request Interceptor


hi subir,

Thanks for the solution,
I got the code working.


I was using request.getFacade() to get an instance of httpServletRequest

Thanks,
Venky

  - Original Message - 
  From: Subir Sengupta 
  To: 'Tomcat Users List' 
  Sent: Thursday, April 25, 2002 11:02 AM
  Subject: RE: Request Interceptor


  Here's an example of a filter.  This will run (after you put in the
correct
  package) as is.  It doesn't do anything terribly useful, but it should
show
  you how a filter works.

  package xx.xx.xx;

  import java.io.*;
  import javax.servlet.*;
  import javax.servlet.http.*;

  public class ExampleFilter implements Filter {

private FilterConfig config = null;

public void init(FilterConfig config) throws ServletException {
  this.config = config;
}

public void destroy() {
  config = null;
}

public void doFilter(ServletRequest request, ServletResponse response,
   FilterChain chain) throws IOException,
ServletException
  {
  System.out.println("Increment your counter here");
  chain.doFilter(request, response);
  System.out.println("Decrement your counter here");
}
  }

  In your web.xml add these statements.  Put them before any servlet
elements.

  
  ExampleFilter
  xx.xx.xx.ExampleFilter
  
  
  ExampleFilter
  /*
  

  BTW, what does request.getFacade() do?  I'm converting some Tomcat 3.x
code
  to T4 and it looks like that method doesn't exist in T4.  Since I didn't
  write the T3 code in not sure how to replace it.

  Subir

  -Original Message-
  From: Venkatesh Sangam [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, April 24, 2002 6:03 PM
  To: [EMAIL PROTECTED]
  Subject: RE: Request Interceptor


  Hi Subir,

  I had the following interceptor class for Tomcat 3.2.2

  public class CountRequest extends BaseInterceptor
  {


  static int noOfRequests=0;
  public CountRequest()
  {
  super();
  }


 public int preService(Request request, Response response) {
 try{
HttpServletRequest req =request.getFacade();

  if
  (request.getServletPath().equalsIgnoreCase("/servlet/Read")){
  noOfRequests++;
  System.out.println("/servlet/Read
  "+noOfRequests);

  }

  if
  (request.getServletPath().equalsIgnoreCase("/servlet/LoadTest")) {
  Integer load = new Integer(noOfRequests);
  req.setAttribute("load",load.toString());
  System.out.println("/servlet/LoadTest
  ="+noOfRequests);
  }
 } catch (Exception e){System.out.println("Exception is
  Performance
  Interceptor");}
 return 0;
  }


  /*postService is invoked right after service() is invoked on the
actual
  servlet*/
  public int postService(Request request, Response response) {

  if
  (request.getServletPath().equalsIgnoreCase("/examples/servlet/Read"))
  noOfRequests--;
  return 0;
  }


  }



  I used to increment noOfRequests in preService and decrement it in
  postService. But, How do I do the same in Tomcat 4.0

  Thanks
  Venky












  Original Message Follows
  From: Subir Sengupta <[EMAIL PROTECTED]>
  Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
  To: 'Tomcat Users List' <[EMAIL PROTECTED]>
  Subject: RE: Request Interceptor
  Date: Wed, 24 Apr 2002 17:53:42 -0700

  T4 doesn't have interceptors.  It sounds like you can do what you need to
do
  with a filter.

  Hope that helps,
  Subir

  -Original Message-
  From: Venkatesh Sangam [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, April 24, 2002 5:03 PM
  To: [EMAIL PROTECTED]
  Subject: Request Interceptor


  Hi,
  can any body please tell me where do put my request iterceptor in Tomcat 4
  I could easily do this using Tomcat 3.2.2 in server.xml file.

  I need to intercept request to measure the load in the tomcat server. ie I
  need to count the number of requests at any point in time..

  I already have written the progrom and the interceptor is working fine
with
  Tomcat 3.2.2.
  But Can any body please tell me how do I do the same using Tomcat 4.0.3

  


  Thanks
  Venky


  _
  Send and receive Hotmail on your mobile device: http://mobile.msn.com


  --
  To unsubscribe:   <mailto:[EMAIL PROTECTED]>
  For additional commands: <mailto:[EMAIL PROTECTED]>
  Troubles with the list: <mailto:[EMAIL PROTECTED]>

  --
  To unsubscribe:   <mailto:[EMAIL PROTECTED]>
  For additional commands: <mailto:[EMAIL PROTECTED]>
  Troubles with the list: <mailto:[EMAIL PROTECTED]>




  ...Phir Bhi Dil Hai Hind

RE: Request Interceptor

2002-04-25 Thread Subir Sengupta

Here's an example of a filter.  This will run (after you put in the correct
package) as is.  It doesn't do anything terribly useful, but it should show
you how a filter works.

package xx.xx.xx;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class ExampleFilter implements Filter {

  private FilterConfig config = null;

  public void init(FilterConfig config) throws ServletException {
this.config = config;
  }

  public void destroy() {
config = null;
  }

  public void doFilter(ServletRequest request, ServletResponse response,
 FilterChain chain) throws IOException, ServletException
{
System.out.println("Increment your counter here");
chain.doFilter(request, response);
System.out.println("Decrement your counter here");
  }
}

In your web.xml add these statements.  Put them before any servlet elements.


ExampleFilter
xx.xx.xx.ExampleFilter


ExampleFilter
/*


BTW, what does request.getFacade() do?  I'm converting some Tomcat 3.x code
to T4 and it looks like that method doesn't exist in T4.  Since I didn't
write the T3 code in not sure how to replace it.

Subir

-Original Message-
From: Venkatesh Sangam [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 6:03 PM
To: [EMAIL PROTECTED]
Subject: RE: Request Interceptor


Hi Subir,

I had the following interceptor class for Tomcat 3.2.2

public class CountRequest extends BaseInterceptor
{


static int noOfRequests=0;
public CountRequest()
{
super();
}


   public int preService(Request request, Response response) {
try{
HttpServletRequest req =request.getFacade();

if
(request.getServletPath().equalsIgnoreCase("/servlet/Read")){
noOfRequests++;
System.out.println("/servlet/Read
"+noOfRequests);

}

if
(request.getServletPath().equalsIgnoreCase("/servlet/LoadTest")) {
Integer load = new Integer(noOfRequests);
req.setAttribute("load",load.toString());
System.out.println("/servlet/LoadTest
="+noOfRequests);
}
   } catch (Exception e){System.out.println("Exception is
Performance 
Interceptor");}
return 0;
}


/*postService is invoked right after service() is invoked on the actual 
servlet*/
public int postService(Request request, Response response) {

if
(request.getServletPath().equalsIgnoreCase("/examples/servlet/Read"))
noOfRequests--;
return 0;
}


}



I used to increment noOfRequests in preService and decrement it in 
postService. But, How do I do the same in Tomcat 4.0

Thanks
Venky












Original Message Follows
From: Subir Sengupta <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: 'Tomcat Users List' <[EMAIL PROTECTED]>
Subject: RE: Request Interceptor
Date: Wed, 24 Apr 2002 17:53:42 -0700

T4 doesn't have interceptors.  It sounds like you can do what you need to do
with a filter.

Hope that helps,
Subir

-Original Message-
From: Venkatesh Sangam [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 5:03 PM
To: [EMAIL PROTECTED]
Subject: Request Interceptor


Hi,
can any body please tell me where do put my request iterceptor in Tomcat 4
I could easily do this using Tomcat 3.2.2 in server.xml file.

I need to intercept request to measure the load in the tomcat server. ie I
need to count the number of requests at any point in time..

I already have written the progrom and the interceptor is working fine with
Tomcat 3.2.2.
But Can any body please tell me how do I do the same using Tomcat 4.0.3




Thanks
Venky


_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




...Phir Bhi Dil Hai Hindustani

Venkatesh Sangam,
1207, E 8th Street,
Apt #114,
Tempe, AZ, 85281
Ph:480-736-9392


_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Request Interceptor

2002-04-24 Thread Subir Sengupta

T4 doesn't have interceptors.  It sounds like you can do what you need to do
with a filter.

Hope that helps,
Subir

-Original Message-
From: Venkatesh Sangam [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 5:03 PM
To: [EMAIL PROTECTED]
Subject: Request Interceptor


Hi,
can any body please tell me where do put my request iterceptor in Tomcat 4
I could easily do this using Tomcat 3.2.2 in server.xml file.

I need to intercept request to measure the load in the tomcat server. ie I 
need to count the number of requests at any point in time..

I already have written the progrom and the interceptor is working fine with 
Tomcat 3.2.2.
But Can any body please tell me how do I do the same using Tomcat 4.0.3




Thanks
Venky


_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Newbie question

2002-04-24 Thread Subir Sengupta

No you don't need Apache if you are running T4 in standalone mode. If you
use either Apache 1.3 or 2.x (for 2.x read all the postings on this list)
you will need to use a connector, such as mod_jk to enable Apache to
communicate with Tomcat.

I can't really tell what the problem is from the information you've
provided, but here's what I would do.
- Download and install T4 according to the instructions 
- start it up (from the command line)and see if it works with all the
default settings (don't make any changes to the server.xml or web.xml files)
- run 'ps -aux' and make sure Tomcat came up
- look in the logs ( T4directory/logs/ ) and see if there are any error
messages.

Tomcat should now work fine.  After you get it up with all the default
settings, then you can start making changes to the server.xml files.  If you
make a change and Tomcat doesn't come up, then you know what the problem is.

Good luck,
Subir

-Original Message-
From: Andre [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 1:14 PM
To: Tomcat Users List
Subject: Re: Newbie question


It's Tomcat/4.0.3, and no I can't see anything on http://server:8005.
(that's where my server.xml is configured).
I started tomcat through /etc/rc.d/init.d/tomcat4 start.
Browsing the examples I couldn't see any of them working!
Do I need Apache 2.X?
Thanks again.





- Original Message -
From: "Subir Sengupta" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Wednesday, April 24, 2002 3:58 PM
Subject: RE: Newbie question


> Which version of Tomcat?
>
> You should be able to test Tomcat, in standalone mode by typing in
> localhost:8080 in your browser.  The Tomcat page should come up.  Are you
> not seeing this?  Look at RUNNING.txt in your Tomcat directory, it
explains
> how to setup and test Tomcat.
>
> Hope this helps.
> Subir
>
> -Original Message-
> From: Andre [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 24, 2002 10:57 AM
> To: [EMAIL PROTECTED]
> Subject: Newbie question
>
>
> Hello evryone, I'm new to Java/JSP server configuration and I would like
to
> test my installation to see if it's working properly.
> I installed all required tomcat packages and IBM JDK 1.3.
>
> The system I'm running:
> Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 DAV/1.0.2
> PHP/4.0.4pl1 mod_perl/1.24_01 ApacheJServ/1.1.1 (results from
> http://uptime.netcraft.com/) on a RedHat 7.1 Linux system
>
> Any help would be apreciated.
>
> Thanks in advance,
>
> Andre Rocha
> [EMAIL PROTECTED]
>
>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Newbie question

2002-04-24 Thread Subir Sengupta

Which version of Tomcat?

You should be able to test Tomcat, in standalone mode by typing in
localhost:8080 in your browser.  The Tomcat page should come up.  Are you
not seeing this?  Look at RUNNING.txt in your Tomcat directory, it explains
how to setup and test Tomcat.

Hope this helps.
Subir

-Original Message-
From: Andre [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 10:57 AM
To: [EMAIL PROTECTED]
Subject: Newbie question


Hello evryone, I'm new to Java/JSP server configuration and I would like to
test my installation to see if it's working properly.
I installed all required tomcat packages and IBM JDK 1.3.

The system I'm running:
Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 DAV/1.0.2
PHP/4.0.4pl1 mod_perl/1.24_01 ApacheJServ/1.1.1 (results from
http://uptime.netcraft.com/) on a RedHat 7.1 Linux system

Any help would be apreciated.

Thanks in advance,

Andre Rocha
[EMAIL PROTECTED]



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Application init

2002-04-24 Thread Subir Sengupta

Or you could add a life cycle listener that ran all your initialization
stuff when your app started.  The servlet initialization method will execute
for every context that you have defined.  That may or may not be the
behavior you want.

Subir

-Original Message-
From: juraj Lenharcik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 7:18 AM
To: 'Tomcat Users List'
Subject: AW: Application init


Hi,

create a servlet with an init method like:

 public void init() { 
file = getInitParameter("log4j-init-file");
logfileDestination = getInitParameter("log4j-destination-file");

DO LOG4J stuff
.
  }

and register it in your web.xml:

log4j-init

com.di.config.startup.Log4jInit

log4j-init-file
WEB-INF/classes/log4j.lcf


log4j-destination-file

d:/server/jakarta-tomcat-4.0.2-LE-jdk14/logs/jaas.log

0
that should do the work.

naskledanou...
juraj


-Ursprüngliche Nachricht-
Von: Pekník Jan [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 24. April 2002 16:13
An: 'Tomcat Users List'
Betreff: Application init


Hello, 

I have following problem : 

I have web-application consisting of several JSP, servlets, xml and xsl
files. I'm using LOG4J for logging and JDBC driver for acessing database.
In order to my application work properly, I need to call start-up code
(which set-up LOG4J and build connection pool) before any JSP page or
servlet is opened.
I don't know how to do this if I don't want to test this in the top of every
page / servlet.

Is there any easy solution how achieve this?  

-Jan 

---
Odchozí zpráva neobsahuje viry.
Zkontrolováno antivirovým systémem AVG (http://www.grisoft.cz).
Verze: 6.0.351 / Virová báze: 197 - datum vydání: 19.4. 2002
 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: scaling Tomcat

2002-04-16 Thread Subir Sengupta

You didn't mention what versions of Apache/Tomat or what platform you're
running on.

Here's a couple of links that may help (I haven't seen anything on Tomcat
yet).  

http://dcb.sun.com/practices/howtos/tuning_apache.jsp
http://dcb.sun.com/practices/howtos/optimizingserver.jsp

Most tuning usually happens in your app. Caching, Thread pooling, jdbc
thread pooling etc.  You can also cluster your servers and load balance to
them using something like a Cisco Arrowpoint or similar box.

Also, the Wrox book, Java Servlets 2.3 has a chapter on performance/scaling
(if you're running Tomcat 4.x)

Hope this helps,
Subir



-Original Message-
From: Saddest OfAllKeys [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 16, 2002 6:05 PM
To: [EMAIL PROTECTED]
Subject: scaling Tomcat



hello,

My apologies if these are FAQs. I've searched for
them.

I'm working on a webapp.  My team wants to measure
performance/scale from the get-go.  The plan is to
start with Apache/Tomcat and measure, using commercial
products only when necessary.  An approximate goal is
500 users of the course of a day, with a response time
of 3-5 seconds.

Q1: Can someone point me to info on tweaking Apache
and Tomcat for performance/scale? I have James
Goodwill's Tomcat book and while it is good, it
doesn't address this issue.

Q2: Are there any rules of thumb for the high-end of
Tomcat's ability re: number of users?  I know this is
terribly vague.  FWIW, the webapp is a portal server
and not really dealing with EJB.  It queries some
remote databases via HTTP and other protocols.

Any advice/comments are greatly appreciated.

thanks,
Mike
[EMAIL PROTECTED]

--- [EMAIL PROTECTED] wrote:
> Hi! This is the ezmlm program. I'm managing the
> [EMAIL PROTECTED] mailing list.
> 
> I'm working for my owner, who can be reached
> at [EMAIL PROTECTED]
> 
> Acknowledgment: I have added the address
> 
>[EMAIL PROTECTED]
> 
> to the tomcat-user mailing list.
> 
> Welcome to [EMAIL PROTECTED]!
> 
> Please save this message so that you know the
> address you are
> subscribed under, in case you later want to
> unsubscribe or change your
> subscription address.
> 
> 
> --- Administrative commands for the tomcat-user list
> ---
> 
> I can handle administrative requests automatically.
> Please
> do not send them to the list address! Instead, send
> your message to the correct command address:
> 
> To subscribe to the list, send a message to:
><[EMAIL PROTECTED]>
> 
> To remove your address from the list, send a message
> to:
><[EMAIL PROTECTED]>
> 
> Send mail to the following for info and FAQ for this
> list:
><[EMAIL PROTECTED]>
><[EMAIL PROTECTED]>
> 
> Similar addresses exist for the digest list:
><[EMAIL PROTECTED]>
>   
> <[EMAIL PROTECTED]>
> 
> To get messages 123 through 145 (a maximum of 100
> per request), mail:
><[EMAIL PROTECTED]>
> 
> To get an index with subject and author for messages
> 123-456 , mail:
><[EMAIL PROTECTED]>
> 
> They are always returned as sets of 100, max 2000
> per request,
> so you'll actually get 100-499.
> 
> To receive all messages with the same subject as
> message 12345,
> send an empty message to:
><[EMAIL PROTECTED]>
> 
> The messages do not really need to be empty, but I
> will ignore
> their content. Only the ADDRESS you send to is
> important.
> 
> You can start a subscription for an alternate
> address,
> for example "[EMAIL PROTECTED]", just add a hyphen
> and your
> address (with '=' instead of '@') after the command
> word:
>
<[EMAIL PROTECTED]>
> 
> To stop subscription for this address, mail:
>
<[EMAIL PROTECTED]>
> 
> In both cases, I'll send a confirmation message to
> that address. When
> you receive it, simply reply to it to complete your
> subscription.
> 
> If despite following these instructions, you do not
> get the
> desired results, please contact my owner at
> [EMAIL PROTECTED] Please be
> patient, my owner is a
> lot slower than I am ;-)
> 
> --- Enclosed is a copy of the request I received.
> 
> Return-Path: <[EMAIL PROTECTED]>
> Received: (qmail 9764 invoked from network); 17 Apr
> 2002 00:44:44 -
> Received: from daedalus.apache.org (HELO apache.org)
> (63.251.56.142)
>   by nagoya.betaversion.org with SMTP; 17 Apr 2002
> 00:44:44 -
> Received: (qmail 47437 invoked by uid 500); 17 Apr
> 2002 00:44:35 -
> Delivered-To:
>
apmail-jakarta-tomcat-user-sc.1019004117.gmllnllhdmofiioijmdm-keyofdminor=ya
[EMAIL PROTECTED]
> Received: (qmail 47432 invoked from network); 17 Apr
> 2002 00:44:35 -
> Received: from web14701.mail.yahoo.com
> (216.136.224.118)
>   by daedalus.apache.org with SMTP; 17 Apr 2002
> 00:44:35 -
> Message-ID:
> <[EMAIL PROTECTED]>
> Received: from [63.208.45.233] by
> web14701.mail.yahoo.com via HTTP; Tue, 16 Apr 2002
> 17:44:43 PDT
> Date: Tue, 16 Apr 2002 17:44:43 -0700 (PDT)
> From: Saddest OfAllKeys <[EMAIL PROTECTED]>
> Subject: Re: confirm subscribe to
> [EMAIL PROTECTED]
> To:
>
tomcat-user-sc.1019004117.gmllnllhdmofiioijmdm-

How to use embedded tomcat

2002-04-16 Thread Subir Sengupta

Check out this link at OReilly

http://www.onjava.com/pub/a/onjava/2002/04/03/tomcat.html

Subir




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Initialization in Tomcat 4.0.3

2002-04-16 Thread Subir Sengupta

Thanks Larry,
Thanks Larry.  I created a Context Listener and it worked great.  However I
have a question.  I experimented with putting my initialization stuff in a
servlet with a load-on-startup element of 0.  This seems to work as well.
All initialization was done when the servlet loaded.  So if both methods of
initialization work, which one is recommended and why?

Thanks again,
Subir


-Original Message-
From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 16, 2002 5:15 AM
To: 'Tomcat Users List'
Subject: RE: Initialization in Tomcat 4.0.3


In Tomcat 4.x, this is accomplished by adding a LifecycleListener
to the appropriate container, Engine, Host, etc.  An example of
how something like this is done may be found at:

<http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/host.html#User%20Web
%20Applications>

In this case, the Listener is added to the Host container.  It
adds user home directories as contexts when the Lifecyle.START_EVENT
occurs.  See the org.apache.catalina.startup.UserConfig source
for implementation details.  Hopefully, this will get you started.

Cheers,
Larry

> -Original Message-
> From: Subir Sengupta [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, April 15, 2002 6:08 PM
> To: '[EMAIL PROTECTED]'
> Subject: Initialization in Tomcat 4.0.3
> 
> 
> Hi,
> 
> In Tomcat 3 we initialized stuff with the RequestInterceptor 
> element in
> web.xml like this:
> 
>debug="0"
>   className="org.apache.tomcat.init.Init" />
> 
> Init has a engineInit method that looks like this:
> public final class Init extends BaseInterceptor
> .
> .
> .
> public void engineInit(ContextManager cm) throws TomcatException {
>   CategoryNames.init();
> 
> etc
> 
> How do I the same thing in Tomcat 4.0.3 ?
> 
> Thanks from a Tomcat newbie,
> Subir
> 
> 
> 
> 
> 
> 
>  <> 
> 

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Initialization in Tomcat 4.0.3

2002-04-15 Thread Subir Sengupta

Hi,

In Tomcat 3 we initialized stuff with the RequestInterceptor element in
web.xml like this:



Init has a engineInit method that looks like this:
public final class Init extends BaseInterceptor
.
.
.
public void engineInit(ContextManager cm) throws TomcatException {
  CategoryNames.init();

etc

How do I the same thing in Tomcat 4.0.3 ?

Thanks from a Tomcat newbie,
Subir






 <> 



Subir Sengupta (E-mail).vcf
Description: Binary data

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>