RE: Tomcat 4 and Log4J

2001-09-18 Thread Aravind Naidu


Have you tried putting the log4j.jar in the jre/lib/ext directory of the JDK
?

-- Aravind


-Original Message-
From: Jiger Java [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 18 September 2001 14:51
To: [EMAIL PROTECTED]
Subject: Re: Tomcat 4 and Log4J


Hi Craig,
  Things are working now. What I did was to put log4j.properties in
WEB-INF/classes  log4j.jar in WEB-INF/lib. But as u will agree this is not
optimum since I will then have to put log4j.jar in all WEbapps. So I moved
log4j.jar into common/lib then problems start. If I put log4j.jar in
$CATALINA_HOME/lib  log4j.properties in $CATALINA_HOME/classes then also it
works but then now my log4j.properties is shared across all webapps  I cant
have individual .properties files. Any idea how I can have one log4j.jar but
individual log4j.properties per webapp. No putting log4j.jar in common/lib 
.properties in WEB-INF/classes does not work.

Awating ur reply,
Thanks,
Jiger


From: Craig R. McClanahan [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Tomcat 4 and Log4J
Date: Mon, 17

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




RE: The pitfalls in restarting tomcat

2001-09-09 Thread Aravind Naidu


or you can use (if you are on Linux that is) the command
 pstree -p to easily view the parent process for Tomcat.

-- Aravind

-Original Message-
From: Pier Fumagalli [mailto:[EMAIL PROTECTED]]
Sent: Monday, 10 September 2001 11:49
To: [EMAIL PROTECTED]
Subject: Re: The pitfalls in restarting tomcat


Jeff Turner [EMAIL PROTECTED] wrote:

 With Tomcat 3.3, it is very easy to confuse Tomcat into thinking that it
 has shut down (the ajp12.id file does not exist), but it actually
 running. In this (common) situation, there is no way to kill tomcat
 other than killing the processes ('killall java'). Killing tomcat in
 this way is *very* dangerous, because it sometimes leaves threads in the
 state described by 'man ps' as:
 
 D   uninterruptible sleep (usually IO)

Of course you don't have to killall, but kill only the parent process Java,
the real process, as all the others are just threads... (Linux sucks on
that)

Pier



forward from servlet to JSP got slow

2001-09-07 Thread Aravind Naidu

Hi,
Environment is Tomcat 3.2.3 on Linux.

All of a sudden the forward from a servlet to a JSP page got very slow. It
is weird in that we have 2 servers in a load balance pool and it started
happening on 1 server and while debugging it, I stoped and started the other
one and it started happening in the other also.

Any clues ? It eventually gets there but it takes about 15 seconds.

The code is like this.
getServletContext().getRequestDispatcher(nextPage).forward(req, res);


-- Aravind





More info. RE: forward from servlet to JSP got slow

2001-09-07 Thread Aravind Naidu

I have more info. Turned all debug values on in Tomcat and this is the
trace. As one can see there is 5 sec gap between the last 2 lines, and I
have no idea what goes on there.


2001-09-07 21:38:02 - ContextManager: SimpleMapper1: SM: Found extension
mapping
 jsp(org.apache.jasper.servlet.JspServlet/null)
2001-09-07 21:38:02 - ContextManager: SimpleMapper1: SM: After mapping R(  +
/le
on/menu-look1.jsp + null) jsp(org.apache.jasper.servlet.JspServlet/null)
2001-09-07 21:38:02 - ContextManager: After processing: R(  +
/leon/menu-look1.j
sp + null)
2001-09-07 21:38:02 - Ctx(  ): Get real path /leon/menu-look1.jsp
/opt/tomcat/we
bapps/ROOT/leon/menu-look1.jsp /opt/tomcat/webapps/ROOT
2001-09-07 21:38:02 - Ctx(  ): Get real path /leon/menu-look1.jsp
/opt/tomcat/we
bapps/ROOT/leon/menu-look1.jsp /opt/tomcat/webapps/ROOT
2001-09-07 21:38:02 - Ctx(  ): Get real path /leon/menu-look1.jsp
/opt/tomcat/we
bapps/ROOT/leon/menu-look1.jsp /opt/tomcat/webapps/ROOT
2001-09-07 21:38:07 - ContextManager: SimpleRealm: Verify user=null
pass=null


-- Aravind


-Original Message-
From: Aravind Naidu [mailto:[EMAIL PROTECTED]]
Sent: Friday, 7 September 2001 19:34
To: [EMAIL PROTECTED]
Subject: forward from servlet to JSP got slow


Hi,
Environment is Tomcat 3.2.3 on Linux.

All of a sudden the forward from a servlet to a JSP page got very slow. It
is weird in that we have 2 servers in a load balance pool and it started
happening on 1 server and while debugging it, I stoped and started the other
one and it started happening in the other also.

Any clues ? It eventually gets there but it takes about 15 seconds.

The code is like this.
getServletContext().getRequestDispatcher(nextPage).forward(req, res);


-- Aravind




RE: COMPAQ V300

2001-09-05 Thread Aravind Naidu


Sorry... Not to start an OS war or something like that.

(As mentioned before it could be a JDK problem)
We have Tomcat 3.2.3 running on RedHat 7.1 with IBM JDK 1.3 (latest) quite
nicely thank you. It was a default Linux install with no tuning applied and
we have stress tested it successfully for 100 concurrent users.

... and we have been running Linux for 4 years without a break.

-- Aravind


-Original Message-
From: Pier Fumagalli [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 5 September 2001 20:28
To: [EMAIL PROTECTED]
Subject: Re: COMPAQ V300


Joe  Sutherland (UKI) [EMAIL PROTECTED] wrote:

 Hi Guys,

 I'm adding more info to my own message (does this seem silly or what?)..
 I've just loaded RH6.2 onto the same COMPAQ V300 and TOMCAT (3.2.2)
works...
 so I can now isolate the problem as something RH 7.1 specific...

 Rgds

 Joe Sutherland

I only had problems with RH71... RH62 is somehow better (even if it's crappy
still) and more compatible with stuff... I suggest dropping Linux in
favour of some real OS... Kinda like Solaris 8-7/01 for x86... NEVER EVER
(In almost 2 years now) had an OS-related problem with it...

You install it, and if it works the first time, out of the box (ok, it's
picky about RAM timings) it works forever until your hardware doesn't break
down.

Pier




RE: how to make a servlet as the home page

2001-08-26 Thread Aravind Naidu


Create an index.html with the following text

HTML
HEAD
meta http-equiv=REFRESH CONTENT=0; URL=/servlet/com.acme.XYZServlet
/HEAD
/HTML

Ensure that the servlet handles doGet(...)

-- Aravind


- Original Message -
From: naveen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, August 26, 2001 9:29 PM
Subject: how to make a servlet as the home page


 hi ,
 I am using tomcat and apache, I want to make a servlet as the home page of
 my web site,
 when i access http://www.mysite.com/, a servlet needs to be called and the
 most important thing in this is I need to access HTTP variables like
Remote
 Host, etc.
 thanks in advance






RE: Tomcat Performance

2001-08-24 Thread Aravind Naidu


Maybe it has got something to do with a crappy OS ! Sorry. could'nt resist

On RH 7.1 linux, the IBM JDK 1.3 (latest build) runs like a scaled cat. 

-- Aravind


-Original Message-
From: Hari [mailto:[EMAIL PROTECTED]]
Sent: Friday, 24 August 2001 20:20
To: [EMAIL PROTECTED]
Subject: Tomcat Performance


Hi,

Which JDK gives best performance for TOMCAT 3.2 on Win2k  Linux?  I heard
that IBM jdk will give higher performance but when I run Tomcat  using IBM
Jdk I feel it is slower than Sun's (on Windows 2000).

Kindly advice me in this regard.

- Hari.

=
Hariharasubramanian.R
Developer, iEvents,
Kumaran Systems (Betawave Solutions)
www.kumaran.com
www.betawavesolutions.com
Reinforcing Your Business
Ph: 0091-44-620 2079, 4967 (Extn: 318/328)
E-Mail: [EMAIL PROTECTED]



RE: OutOfMemory - Set Java Heap Size?

2001-08-24 Thread Aravind Naidu

You can use  -Xms128m -Xmx256m which means the heap will start at 128m and
grow to 256m, but you are better off testing your app first (use verboseGC)
to check the memory usage and then setting both parameters to the same no.
(i.e.) -Xms256m -Xmx256m or to a value suitable to your app usage and you
will avoid a delay when the copy occurs after the intial setting.

I would also suggest that you need to tune up your process, file, inode
limits at the OS front. If you are going to run 7 instances of Tomcat on a
512mb machine, you will run out of these fast.

If you are running 2.2.x kernel series, it is a wee bit more complicated.
2.4.x series, you are better off.

Plenty of stuff on the web on this, but a good point to start is
http://people.redhat.com/alikins/system_tuning.html

-- Aravind


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Craig R. McClanahan
Sent: Saturday, 25 August 2001 11:42
To: Tomcat Users List; Max Hugen
Subject: Re: OutOfMemory - Set Java Heap Size?


The java command line option you want is actually -Xmx256m to set the
maximum heap size.  To set this, you can establish an environment variable
named TOMCAT_OPTS (Tomcat 3.x) or CATALINA_OPTS (Tomcat 4.x) that contains
the command line options to be sent to the JVM.  For example:

  export TOMCAT_OPTS=-Xmx256m
  $TOMCAT_HOME/bin/tomcat.sh start

Craig McClanahan


On Sat, 25 Aug 2001, Max Hugen wrote:

 Date: Sat, 25 Aug 2001 13:00:41 +1000
 From: Max Hugen [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED], Max Hugen
[EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: OutOfMemory - Set Java Heap Size?

 I run Linux/Apache/Tomcat plus Oracle on a server with 512Mb of memory. I
 have successfully implemented a couple of Internet applications using JSP,
 Servlets (plus Oracle) etc.

 For each application (and client) I start a new Tomcat session, using a
 custom server.xml for each one. All was ok, until I tried increasing
Tomcat
 sessions from 6 to 7, then I received the java.lang.OutOfMemoryError when
 starting the Tomcat sessions.

 I've read through many of the posts on this subject, some of which suggest
 to increase the heap size. Unfortunately, I'm a newbie to Java (and
Linux
 and JSP and Oracle g) so I don't know how to either check this heap
size,
 nor how to permanently set it to a value via a script using a switch
 like -Xms256m.

 The script I use to start Tomcat follows, plus the console output. Could
 anyone advise how to set the heap please?


 Many thanks,

 Max Hugen   [EMAIL PROTECTED]
 Hugen Enterprises Pty Ltd, Sydney, Australia
 www.hugen.com.au
 Internet Application Developers

 Script Start
 echo Tomcat Startup ~
 echo Start an instance of Tomcat for hugen
 /usr/local/tomcat/bin/startup.sh -f /usr/local/tomcat/conf/server_he.xml
 echo Start an instance of Tomcat for yass3i
 /usr/local/tomcat/bin/startup.sh -f
/usr/local/tomcat/conf/server_yass3i.xml
 echo Start an instance of Tomcat for isp
 /usr/local/tomcat/bin/startup.sh -f /usr/local/tomcat/conf/server_isp.xml
 echo Start an instance of Tomcat for im2000i
 /usr/local/tomcat/bin/startup.sh -f
 /usr/local/tomcat/conf/server_im2000i.xml
 echo Start an instance of Tomcat for secure
 /usr/local/tomcat/bin/startup.sh -f
/usr/local/tomcat/conf/server_secure.xml
 echo Start an instance of Tomcat for aedo
 /usr/local/tomcat/bin/startup.sh -f /usr/local/tomcat/conf/server_aedo.xml
 echo Start an instance of Tomcat for ncap
 /usr/local/tomcat/bin/startup.sh -f /usr/local/tomcat/conf/server_ncap.xml
 # Give Tomcat time to start before restarting Apache.
 echo Waiting 45 secs...
 sleep 45
 # Restart Apache to register Tomcat properly.
 echo Restart Apache
 /etc/rc.d/init.d/httpd stop
 /etc/rc.d/init.d/httpd start
 sleep 2
 echo Ok, we should be in business!
 Script End

 Console Output Start
 Starting tomcat. Check logs/tomcat.log for error messages
 Starting tomcat. Check logs/tomcat.log for error messages
 Starting tomcat. Check logs/tomcat.log for error messages
 Starting tomcat. Check logs/tomcat.log for error messages
 Starting tomcat. Check logs/tomcat.log for error messages
 Starting tomcat. Check logs/tomcat.log for error messages
 Starting tomcat. Check logs/tomcat.log for error messages

 Restart Apache

 Exception in thread main java.lang.OutOfMemoryError: unable to create
new
 native thread
 at java.lang.Thread.start(Native Method)
 at

org.apache.tomcat.util.ThreadPool$ControlRunnable.init(ThreadPool.java:465
 )
 at
 org.apache.tomcat.util.ThreadPool.openThreads(ThreadPool.java:360)
 at org.apache.tomcat.util.ThreadPool.start(ThreadPool.java:148)
 at

org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java
 :245)
 at

org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:188)
 at
 org.apache.tomcat.core.ContextManager.start(ContextManager.java:527)
 at 

mod_jk.log messages

2001-08-19 Thread Aravind Naidu


I have got TC 3.2.3 with AJP13 connector to Apache on RedHat 7.1
Everything is working fine.

I have these messages in the log file for mod_jk

[jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL
par
ameter
[jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free,
NULL p
arameters


What are they ?

-- Aravind




RE: IBM JDK

2001-08-14 Thread Aravind Naidu


Works great, similar environment to yours, except I am using the IBM HTTP
Server (modifid Apache) v1.3.19

My tests have shown that the IBM JDK is way faster than Sun's for my
application scenarios and you can also look at the Volano benchmarks.

Aravind

-Original Message-
From: Mike McGuinness [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 15 August 2001 00:21
To: [EMAIL PROTECTED]
Subject: IBM JDK


Has anyone tried IBM jdk/runtime environment on Linux with Tomcat 3.2.3?

I'v got sun jdk 1.3, running on Red Hat 7.1, with apache 1.3.20, and
tomcat 3.2.3.
I was wondering how or if IBM's jdk/runtime works.

Mike




Tuning Tomcat

2001-08-12 Thread Aravind Naidu

Hi,

Is there a guideline/doc on tuning Tomcat and it's connectors, (i.e.) Ajp13,
mod_jk etc.  I can see that there are parameters for max_threads etc. but
what is ideal and what are the defaults ?

My current config.
Redhat 7.1,  IBM JDK 1.3, TC 3.2.3, IBM HTTP Server 1.3.19
with mod_jk

The reason I am asking is that sometimes there are slight hesitations when
delivering a page. It is on a local LAN, so bandwidth is not a problem.

-- Aravind





big5 problem with Tomcat on RedHat 7.1

2001-08-04 Thread Aravind Naidu


This may not be Tomcat's problem but I am hoping someone will point me in
the right direction.

I have 2 installations, one Tomcat 3.2.1 on RedHat 6.2 and the other Tomcat
3.2.3 on RedHat 7.1

I have a JSP file with the following tag
META http-equiv=Content-Style-Type content=text/css charset=big5

The RedHat 6.2 machine delivers Big5 characters properly, while the RedHat
7.1's Tomcat server does not.

Environment is that Tomcat is standalone and the JDK is IBM 1.3

-- Aravind





Solved (was: RE: big5 problem with Tomcat on RedHat 7.1)

2001-08-04 Thread Aravind Naidu

Solved the problem. For others interested.
By default Tomcat 3.2.1 uses a 8859-1 and 3.2.3 ISO-8859-1 and just
explicitly setting the page directive in the JSP overcame the problem.

%@ page contentType=text/html; charset=big5 %

-- Aravind


-Original Message-
From: Aravind Naidu [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 4 August 2001 21:42
To: [EMAIL PROTECTED]
Subject: big5 problem with Tomcat on RedHat 7.1



This may not be Tomcat's problem but I am hoping someone will point me in
the right direction.

I have 2 installations, one Tomcat 3.2.1 on RedHat 6.2 and the other Tomcat
3.2.3 on RedHat 7.1

I have a JSP file with the following tag
META http-equiv=Content-Style-Type content=text/css charset=big5

The RedHat 6.2 machine delivers Big5 characters properly, while the RedHat
7.1's Tomcat server does not.

Environment is that Tomcat is standalone and the JDK is IBM 1.3

-- Aravind




RE: VOTE: HTML in Messages and politeness (Was: Re: jdbc odbc bridgeon linux)

2001-07-29 Thread Aravind Naidu


+1





RE: TOMCAT VISUAL AGE

2001-07-09 Thread Aravind Naidu


Even better.
IBM has a Tomcat test environment package available for free It replaces
the websphere test environment and works very well

http://www7.software.ibm.com/vad.nsf/FrameData/Master?OpenDocumentTitle=Ove
rviewFSet=1Doc3=4556Doc4=4567


Been using it for dev, testing and debugging and works like a charm.

-- Aravind


-Original Message-
From: Emir Alikadic (ADNOC IST) [mailto:[EMAIL PROTECTED]]
Sent: Monday, 9 July 2001 17:53
To: [EMAIL PROTECTED]
Subject: RE: TOMCAT  VISUAL AGE


1. Look in your TOMCAT_HOME/lib
2. Unjar == Unpack

Hint: Use JDK's jar utility (it's in JAVA_HOME/bin) to unpack JARs, WARs, or
EARs. Type jar at command prompt (without any parameters) to get usage
help.

Cheerioh!


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 1:37 PM
To: [EMAIL PROTECTED]
Subject: TOMCAT  VISUAL AGE


Hello,
I have Visual Age Installed, and I am trying to Install and Integrate
Tomcat.

I have one or two issues:

Firstly according to documentation



 Apache Tomcat Servlet and JSP Development with VisualAge for Java



http://www7.software.ibm.com/vad.nsf/data/document2389?OpenDocumentp=1BCT=
1Footer=1


 8. Create a new subdirectory called C:
 \IBMVJava\ide\project_resources\Tomcat Version 3\classes (in your
 VisualAge for Java installation directory). Unjar the contents of the
 following four JAR files from Tomcat into this classes subdirectory,
 maintaining the package-directory structures when you unjar:
  webserver.jar  ant.jar jasper.jar servlet.jar xml.jar





However i cannot find these jar files in the TOMCAT downloads?? anyone know
where i can find them?
Also what exactly does unjar mean??

Tnx
Sean




How large can a session object be ?

2001-07-02 Thread Aravind Naidu


How large can a session object go in Tomcat ?

-- Aravind




Tomcat in production

2001-05-17 Thread Aravind Naidu

Hi All,
We have been using Tomcat for development and are quite happy with it.

I would like to know any success/failure(?) stories of Tomcat as a
production servlet/JSP engine.

-- Aravind