Error Message Explanation

2003-02-04 Thread Hari Venkatesan
Any idea what this error means?
 
1) org.apache.jk.server.JkCoyoteHandler  - Error in action code 
java.net.SocketException: Connection reset by peer: socket write
error
 
2) WARN - Server has closed connection
470508266 [Thread-6] WARN org.apache.jk.common.ChannelSocket  -
Server has closed connection
 
I am using Connection Pools and my timeout is set to 15 seconds. Is the
above error because the server is closing connections upon timeout?
 
Hari



RE: problem connecting to a as400

2003-01-28 Thread Hari Venkatesan
You have to have jt400.jar in Linux box. 

Hari

-Original Message-
From: x x [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 28, 2003 4:56 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: problem connecting to a as400

thanks for your help, thanks a lot. 
I want to know if that toolbox i have to install in
the As/400 or in my linux. cause i want to connect
with JDBC from my Tomcat that is in a linux to a
database DB2 that is in  my AS400

Thanks. 
Fabian 

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: Driver for connecting to a AS/400

2003-01-28 Thread Hari Venkatesan
You have to JT400.jar file to make DB connections to the 400. The Driver
Class name you can use is com.ibm.as400.access.AS400JDBCDriver. Remember
that this driver is type 4 driver. 

You need not make any changes to the as400. You can connect to the
database with your username and password.

Hari

-Original Message-
From: Gustavo Rojas [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 28, 2003 1:44 PM
To: Tomcat Users List
Subject: Driver for connecting to a AS/400


What is the driver that i have to use to connect to a AS400, for make
consults to a database DB2 that is in the AS400.
from a Tomcat 4.1 configured for default, running in a Mandrake linux
8.2.
I have the jt400.jar in $CATALINA_HOME=/common/lib/jt400.jar, some guys
toll us that this is the drivers that i have to use to make a
connection.
and what i have to write in the Class.forname, if i have the correct
driver, I have to make any changes in the as400 or with the username and
password its just fine.


Thanks a lot.


Gustavo



--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: Tomcat 4.1 ignoring -Xmx params

2003-01-28 Thread Hari Venkatesan
How did you find out it is ignoring -Xmx parameter. Initially when you
start up tomcat, it would allocate only the minimum heap that you set in
-Xms.

Hari



>-Original Message-
>From: Christian Cryder [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, January 28, 2003 11:49 AM
>To: Tomcat-User
>Subject: Tomcat 4.1 ignoring -Xmx params
>
>Hey folks, has anyone observed scenarios where Tomcat appears to ignore
>the -Xmx param? We are running 4.1 as a service on Win 2000 Pro, and
have
>manually uninstalled/reinstalled the tomcat service as follows:
>
>to uninstall:
>-
>tomcat.exe -uninstall "Apache Tomcat 4.1"
>
>to install:
>-
>tomcat -install "Apache Tomcat 4.1"
>"E:\sun\j2sdk1.4.1_01\jre\bin\client\jvm.dll" -Xmx256m -Xms128m -
>Djava.class
>.path="D:\Program Files\Apache Group\Tomcat
>4.1\bin\bootstrap.jar" -Dcatalina.home="D:\Program Files\Apache
>Group\Tomcat
>4.1" -Djava.endorsed.dirs="D:\Program Files\Apache Group\Tomcat
>4.1\common\endorsed" -start
>org.apache.catalina.startup.BootstrapService -params start -stop
>org.apache.catalina.startup.BootstrapService -params stop -out
"D:\Program
>Files\Apache Group\Tomcat 4.1\logs\stdout.log" -err "D:\Program
>Files\Apache
>Group\Tomcat 4.1\logs\stderr.log"
>
>What we are seeing here is that everything seems to work just fine, but
>Tomcat does not seem to stop at the 256m max that we are requesting? Is
>this
>to be expected? Or are we doing something stupid?
>
>Thanks much,
>Christian
>--
>Christian Cryder [[EMAIL PROTECTED]]
>Internet Architect, ATMReports.com
>Barracuda - http://barracudamvc.org
>--
>"Coffee? I could quit anytime, just not today"
>
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: IIS and Tomcat basic configuration questions

2003-01-23 Thread Hari Venkatesan
Take a look at this site. It has step by step installation instructions

http://www.onjava.com/pub/ct/33

Hari

-Original Message-
From: Brantley Hobbs [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 23, 2003 10:48 AM
To: [EMAIL PROTECTED]
Subject: IIS and Tomcat basic configuration questions

Hello all.

I'm new to the entire concept of Tomcat and I have a question which I
have not found a clear explanation for.

Does Tomcat have to be installed on the webserver?  In other words, can
I not just install the redirect filter (and not Tomcat, per se) on the
webserver and have it connect (using ajpv13) to a back-end Tomcat
server?  I only want to install the redirect filter on the webserver.
Does a working JVM need to be in place for the filter to work properly?

Brantley Hobbs

--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: Memory Mgmt Tomcat

2003-01-23 Thread Hari Venkatesan
Hai,

Thanks you very much for spending the time and answering some of my
(our) problems in much detail. Appreciate it. I will try to put in my
efforts on the direction you have shown.

Again Appreciate your time

Hari

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 23, 2003 10:24 AM
To: Tomcat Users List
Subject: RE: Memory Mgmt Tomcat

Howdy,
A few things.  First, you original question:

>"To collect data on how long garbage collection is taking add the
>-verbose:gc argument to your CATALINA_OPTS environment variable when
>starting Tomcat.When verbose gc is enabled your
>$CATALINA_BASE/logs/catalina.out log file will include data for every
>garbage collection including how long it took."
>
>Have anybody got to see GC output in catalina.out log? ?

Yes.  Every single time I've followed the above instructions, I see
verbose gc in my catalina.out file.  If I use JDK 1.4 with the
loggc: option, it goes to that file.  If I omit that option and
enable swallowOutput for the Logger in server.xml, the verbose gc
information goes there.  I've had no problems with this at all.  In fact
I've tested this functionality on every point release from 4.0.1 to now.

All my attempts are on linux and Solaris platforms.  I wouldn't run
anything serious on a Windows box any time soon.  It may be that some of
the above doesn't work on windows, or when running tomcat on windows as
a service, which you mentioned is your deployment setup.

>There are a lot of people out
>there who have implemented tomcat in production environment and we as
>starters would like to know how they managed some of the delicate
issues
>like this.

Assuming you mean deployed instead of implemented, I agree.  But I think
the above number is far exceeded by the number of people who believe
there are magic garbage collection tuning settings that'll make all the
GC problems go away.

>Off late there have been many  queries about memory management and the
>reason behind this is because people get bombarded with "out of memory
>error".

Not just of late.  For a long long time now.  And not just on the tomcat
lists either.  It's a difficult topic that many people struggle with.

>now, still without any right answers even after searching the archives.

See above: the right answer is one only you can find for your own
particular app.  There's no magic GC combination that'll perfectly tune
your JVM.  What worked for others may not work for you.

>Different JVM's do memory management in its own way and that is even
>more confusing.

It may be confusing.  But in fact, as someone who's written a JVM,
memory management and efficient collection are distinguishing factors.
It's a key value added if you can do it well: hence JRockit and others.

>You start tomcat with -verbose:gc, you can see GC kicks in even as it

Yup.  All the time.  This is normal and expected.  They're usually
incremental or young generation GCs.

>starts. From what I learnt from java.sun.com, a full GC kicks in only
>after it reaches its max heap. But you can see Full GC's in the verbose
>output even before the JVM reaching its max heap.

No, that's not true at all.  A full GC may kick in long before max heap
is allocated.  In fact, the JVM will usually try to never even get
close.  By default the minimum percentage of the heap it'll try to keep
free is 40%.  You can tune this with XX:MaxHeapFreeRatio= and 
-XX:MinHeapFreeRation=

>By the way I have gone through the entire archive about this topic and
>none of them give a final answer.

Again, what's a final answer?  What sort of answer would you have liked
to see that wasn't in the archives?  It may be that the only "final"
answer is:
- Come up with performance goals
- Come up with performance tests
- Run tests, record results
- If goals are met, stop, else
- Modify one GC parameter
- Run tests, records results
- Repeat until goals are met.

Yoav Shapira
Millennium ChemInformatics

--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: Memory Mgmt Tomcat

2003-01-23 Thread Hari Venkatesan
When you start tomcat4.1.12 on Win2k as a service with verbose:gc, i do
not see the GC output in Catalina.out. I tried and tried and finally
settled down to start tomcat from command line for testing purpose. 

"To collect data on how long garbage collection is taking add the
-verbose:gc argument to your CATALINA_OPTS environment variable when
starting Tomcat.When verbose gc is enabled your
$CATALINA_BASE/logs/catalina.out log file will include data for every
garbage collection including how long it took."

Have anybody got to see GC output in catalina.out log? ?

Hari

-Original Message-
From: Rommel Sharma [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 23, 2003 9:48 AM
To: Tomcat Users List
Subject: RE: Memory Mgmt Tomcat

Hi!
   Well I am also getting the same out of memory errors, FI: I am using
Oracle database.
   I found some info that talks about setting time-out for DB Con
Poolng.
   Will start with this info and see how it helps. Pasting the info
below
for any further analysis and comments by the grp:

"Tomcat runs within a JVM. The JVM periodically performs garbage
collection
(GC) to remove java objects which are no longer being used. When the JVM
performs GC execution of code within Tomcat freezes. If the maximum time
configured for establishment of a dB connection is less than the amount
of
time garbage collection took you can get a db conneciton failure. To
collect
data on how long garbage collection is taking add the -verbose:gc
argument
to your CATALINA_OPTS environment variable when starting Tomcat.When
verbose
gc is enabled your $CATALINA_BASE/logs/catalina.out log file will
include
data for every garbage collection including how long it took.When your
JVM
is tuned correctly 99% of the time a GC will take less than one second.
The
remainder will only take a few seconds. Rarely, if ever should a GC take
more than 10 seconds.Make sure that the db connection timeout is set to
10-15 seconds. For the DBCP you set this using the parameter maxWait."

Thanks,
Rommel.


-Original Message-
From: Hari Venkatesan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 8:00 PM
To: Tomcat Users List
Subject: RE: Memory Mgmt Tomcat


Shapira,

I don't think the question is ridiculous. There are a lot of people out
there who have implemented tomcat in production environment and we as
starters would like to know how they managed some of the delicate issues
like this.

Off late there have been many  queries about memory management and the
reason behind this is because people get bombarded with "out of memory
error".

Personally, I have been researching the same problem for almost a week
now, still without any right answers even after searching the archives.
Different JVM's do memory management in its own way and that is even
more confusing.

You start tomcat with -verbose:gc, you can see GC kicks in even as it
starts. From what I learnt from java.sun.com, a full GC kicks in only
after it reaches its max heap. But you can see Full GC's in the verbose
output even before the JVM reaching its max heap.

This makes you believe that something is wrong somewhere and that is
when people come out here to post their question to get some light from
experienced users of tomcat.

By the way I have gone through the entire archive about this topic and
none of them give a final answer.

Hari


-Original Message-
From: Rommel Sharma [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 9:20 AM
To: Tomcat Users List
Subject: RE: Memory Mgmt Tomcat

Thanks! Thats the lead I was looking for...

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 7:37 PM
To: Tomcat Users List
Subject: RE: Memory Mgmt Tomcat


Howdy,
The reason no one answered your original question is because it's kind
of ridiculous ;)  I don't mean that in an offensive way.  I do mean:

- Java has its own garbage collector.  Tomcat doesn't need to implement
its own.  There is much information on this topic on java.sun.com and
other general java forums.
- Many many many threads have gone on this list regarding garbage
collection and how to tune for it.  Search the list archives for more
details.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Rommel Sharma [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, January 23, 2003 9:11 AM
>To: Tomcat Users List
>Subject: Memory Mgmt Tomcat
>
>Hi!
>   I think the answer give to Nate should help, but just in case some
one
>knows how to do performance tuning of Tomcat when heavy objects are
being
>used, for effective 'memory management' then please put some light on
the
>topic.
>Thanks,
>Rommel.
>
>-Original Message-
>From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, January 23, 2003 7:30 PM
>To: Tomcat Users List
>Subject: RE: Resources for a Context

RE: Memory Mgmt Tomcat

2003-01-23 Thread Hari Venkatesan
Shapira,

I don't think the question is ridiculous. There are a lot of people out
there who have implemented tomcat in production environment and we as
starters would like to know how they managed some of the delicate issues
like this. 

Off late there have been many  queries about memory management and the
reason behind this is because people get bombarded with "out of memory
error". 

Personally, I have been researching the same problem for almost a week
now, still without any right answers even after searching the archives.
Different JVM's do memory management in its own way and that is even
more confusing. 

You start tomcat with -verbose:gc, you can see GC kicks in even as it
starts. From what I learnt from java.sun.com, a full GC kicks in only
after it reaches its max heap. But you can see Full GC's in the verbose
output even before the JVM reaching its max heap. 

This makes you believe that something is wrong somewhere and that is
when people come out here to post their question to get some light from
experienced users of tomcat. 

By the way I have gone through the entire archive about this topic and
none of them give a final answer.

Hari

  
-Original Message-
From: Rommel Sharma [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 23, 2003 9:20 AM
To: Tomcat Users List
Subject: RE: Memory Mgmt Tomcat

Thanks! Thats the lead I was looking for...

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 7:37 PM
To: Tomcat Users List
Subject: RE: Memory Mgmt Tomcat


Howdy,
The reason no one answered your original question is because it's kind
of ridiculous ;)  I don't mean that in an offensive way.  I do mean:

- Java has its own garbage collector.  Tomcat doesn't need to implement
its own.  There is much information on this topic on java.sun.com and
other general java forums.
- Many many many threads have gone on this list regarding garbage
collection and how to tune for it.  Search the list archives for more
details.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Rommel Sharma [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, January 23, 2003 9:11 AM
>To: Tomcat Users List
>Subject: Memory Mgmt Tomcat
>
>Hi!
>   I think the answer give to Nate should help, but just in case some
one
>knows how to do performance tuning of Tomcat when heavy objects are
being
>used, for effective 'memory management' then please put some light on
the
>topic.
>Thanks,
>Rommel.
>
>-Original Message-
>From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, January 23, 2003 7:30 PM
>To: Tomcat Users List
>Subject: RE: Resources for a Context
>
>
>Howdy,
>Can you please illustrate a possible use for this feature before you
>start coding it?  A use case which can't be addressed by the servlet
>spec, that is.  Right now, I doubt such a contribution would be
accepted
>into tomcat's core, so you may not want to waste time writing it at all
>;)
>
>Yoav Shapira
>Millennium ChemInformatics
>
>
>>-Original Message-
>>From: David Keyes [mailto:[EMAIL PROTECTED]]
>>Sent: Wednesday, January 22, 2003 5:10 PM
>>To: Tomcat Users List
>>Subject: RE: Resources for a Context
>>
>>I would be happy to make any modifications that would be required.
>I've
>>spent a bit of time looking around at the source already, but I'm not
>sure
>>what the best approach would be.  It would be nice if it could be done
>in a
>>"plugin" kind of way, but after looking around a bit, it seems that
the
>>concept of a single physical directory as a docbase is pretty
ingrained
>>(comments?).
>>
>>So far, I've looked at the following:
>>
>>1. Writing a new catalina Context implementation
>>2. Writing a new jndi DirContext implementation, that would be
>configurable
>>to take multiple directories
>>
>>Of those two, I think #2 makes the most sense, but I have doubts as to
>>whether it would solve the problem.  What I'm afraid of is that the
>changes
>>required are peppered throughout the Tomcat codebase.  Any pointers
>that
>>you could give me to get me started in the right direction initially
>would
>>be hugely appreciated.
>>
>>The only reason that I'm spending so much energy on this is that for
>very
>>large web applications that are not structured as a webapp, which I
>think
>>is rather common, it would be a HUGE aid in debugging to be able to
>pull
>>something like this off.  The code/compile/debug cycle gets a bit
>>cumbersome when one is constantly redeploying large apps.  I think for
>>deployment the spec works just fine.
>>
>>Thanks again for your help, and all of your excellent work.
>>
>>Dave Keyes
>>
>>-Original Message-
>>From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
>>Sent: Wednesday, January 22, 2003 4:24 PM
>>To: Tomcat Users List
>>Subject: RE: Resources for a Context
>>
>>
>>
>>
>>On Wed, 22 Jan 2003, David Keyes wrote:
>>
>>> Date: Wed, 22 Jan 2003 15:53:22 -0500
>>> From: David Keyes <[EMAIL PROTECTED]>
>>> Reply-To: Tomcat User

RE: Tomcat Out of memory

2003-01-22 Thread Hari Venkatesan
Nate  

Take a look at the following site. It gives you a feeler of how to do
it. Once you run the batch file, it updates the Win2000 registry entries
for you. From there you can play with it. 

http://www.mattkelli.com/tech/tomcat/ntservice.htm

When you follow the instructions, and run the batch file, you would see
something like this in windows registry under 
SYSTEM/CurrentControlSet/Services/Apache-Catalina/Parameters

JVM Option Number 

Check what has been set up under that.

Hari




-Original Message-
From: Nate [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 22, 2003 4:58 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: Tomcat Out of memory

We are using 1.4.0_01, this shouldn't suffer from any of the documented
issues that 1.3.1 had.  Really my question just pertains to the proper
method of passing jvm startup parameters when tomcat is configured to
run as
a service.  Anyone have any input?

- Original Message -
From: "Brandon Cruz" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 4:08 PM
Subject: RE: Tomcat Out of memory


> we have the exact same configuration JDK 1.3.1, Tomcat 4.x, Linux.  We
also
> have 512 allocated, but run out of memory just over 200 MB.  I think
JDK
> 1.3.1 from sun has a memory leak (according to a post yesterday), so
we
are
> going to try to upgrade to IBM's 1.4 JDK and see what happens.
>
> Brandon
>
> -Original Message-
> From: Nate [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 3:46 PM
> To: Tomcat Users List
> Subject: Re: Tomcat Out of memory
>
>
> Thanks for the info, but I think our problem is more related to
allocating
> the amount of memory we need than the -server option.  Also, I'm not
even
> sure that I am setting these in the right place.
>
> - Original Message -
> From: "Claudio Pracilio" <[EMAIL PROTECTED]>
> To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
> Sent: Wednesday, January 22, 2003 3:30 PM
> Subject: RE: Tomcat Out of memory
>
>
> > Hi There,
> >
> > We have had problems with our JVM running out-of-memory on Linux
with
Suns
> > JDK 1.3.1.
> >
> > This was resolved by not using the "-server" option.
> >
> > Not sure what the JVM does differently internally, but using the
default
> > -client option had resolved our problems.
> >
> > Regards,
> >
> > Claudio
> >
> > -Original Message-
> > From: Nate [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 22, 2003 1:09 PM
> > To: Tomcat Users List
> > Subject: Tomcat Out of memory
> >
> >
> > We are running Tomcat 4.0.6 on Windows 2000 server using JDK
1.4.0_01.
> > Tomcat is set to run as a service.  In our catalina.bat file we have
set:
> >
> > JAVA_OPTS= -server -Xms512m -Xmx512m
> >
> > If I am not mistaken, this should start the VM in server mode, and
> allocate
> > 512MB of memory for it to use.  Our application gets an out of
memory
> error
> > when the vm has used about 64MB of memory, well short of what we
have
told
> > it to use.  Am I setting the JVM parameters in the right place, or
is my
> > syntax perhaps incorrect?  When tomcat is run as a service, is the
> > catalina.bat startup script even called?
> >
> > --Nate
> >
> >
> >
> > --
> > 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:



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




RE: Memory Allocation

2003-01-22 Thread Hari Venkatesan
Hi,

I can try with IBM's version and also with sun's JVM1.4.1_01 and let you
know about it.

Thanks for your input. 

Hari




-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 22, 2003 10:36 AM
To: Tomcat Users List
Subject: RE: Memory Allocation

Hi,

>No Realms have been defined. I use Win2k, Tomcat 4.1.12 and JDK
>1.3.1_06.

Have you tried this across different JVM?  I'd be curious about that.

>Without Using jprobe or OptimizeIt is there a way to check how much
>memory has been used.

Runtime.getRuntime().freeMemory();
Runtime.getRuntime().totalMemory();

Yoav Shapira
Millennium ChemInformatics

--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: Memory Allocation

2003-01-22 Thread Hari Venkatesan
Shapira,

Thanks for your suggestion. When you startup Tomcat with -Xms10m and
-Xmx10m it does a lot of Full GC before it can bring up and finally
settles down to use 7.2megs using a debugger.

Without a debugger tomcat still comes up after doing a lot of Full GC's.

I have just one application in my context in my server.xml and have just
2 load-on-startup servlets which is not big (one gets the roles from
ldap server which loads a maximum of 5 roles  and the other starts up
log4j. 

No Realms have been defined. I use Win2k, Tomcat 4.1.12 and JDK
1.3.1_06. 

Without Using jprobe or OptimizeIt is there a way to check how much
memory has been used. 

Hari

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 22, 2003 9:29 AM
To: Tomcat Users List
Subject: RE: Memory Allocation

Howdy,
Whoa there ;)  Be very careful about some things:

- The amount of memory tomcat takes on startup is variable.  This
changes with tomcat version, OS version, JDK version, configured webapps
and their listeners / filters / load-on-startup servlets, any
Loggers/Valves/Realms configured for tomcat in server.xml, etc.  As you
can see this is many variables.

- Using a debugger such as JProbe or OptimizeIt may inflate the memory
usage of a system by a factor of 10 or more.

- What the other guy said about the default heap set at 64MB -- the
default heap MAXIMUM is set as 64MB.  The default minimum is very small,
again depending on JDK version and flags used.  

For an illustration, try the following:
- Set -Xmx10m in your JAVA_OPTS to allow only 10MB on the heap.
- Start tomcat without a debugger.  You shouldn't have a problem.
- Try to start tomcat with a debugger.  See what happens ;)

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Hari Venkatesan [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, January 21, 2003 4:21 PM
>To: [EMAIL PROTECTED]
>Subject: Memory Allocation
>
>Tomcat when starting uses 60M memory in heap. Why is that it is using
so
>much memory in heap. I found this by running jprobe memory debugger. I
>have just one application in the context of server.xml file and don't
>think the entire application gets loaded into memory. After doing a
full
>garbage collection, the heap memory comes down to 11M. Is something
>going wrong or is it the way tomcat behaves?
>
>Hari

--
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 running as an win 2000 service

2003-01-22 Thread Hari Venkatesan
Take a look at the following site. It gives you a feeler of how to do it. Once you run 
the batch file, it updates the Win2000 registry entries for you. From there you can 
play with it. 

http://www.mattkelli.com/tech/tomcat/ntservice.htm

-Original Message-
From: Nicolas Piroué [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 9:47 PM
To: [EMAIL PROTECTED]
Subject: Tomcat running as an win 2000 service

Some help please. How do specify how much memory is allocated to the JVM
when I run tomcat as a service. Thanks.


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




RE: Memory Allocation

2003-01-21 Thread Hari Venkatesan
I have a -Xms set to 128m and -Xmx set to 256. But does tomcat itself
takes 60M of 128M? ? ?

Hari

-Original Message-
From: Tolles, James [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 4:26 PM
To: 'Tomcat Users List'
Subject: RE: Memory Allocation

Its probably set in the jvm - the default heap size set is for 64 meg.
This can be changed using the -Xmx parmeters in the initial call to the
jvm. We set the max heap size for our tomcat to 128M using:
  "-Xmx128M"


-Original Message-
From: Hari Venkatesan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 1:21 PM
To: [EMAIL PROTECTED]
Subject: Memory Allocation


Tomcat when starting uses 60M memory in heap. Why is that it is using so
much memory in heap. I found this by running jprobe memory debugger. I
have just one application in the context of server.xml file and don't
think the entire application gets loaded into memory. After doing a full
garbage collection, the heap memory comes down to 11M. Is something
going wrong or is it the way tomcat behaves? 
 
Hari

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




Memory Allocation

2003-01-21 Thread Hari Venkatesan
Tomcat when starting uses 60M memory in heap. Why is that it is using so
much memory in heap. I found this by running jprobe memory debugger. I
have just one application in the context of server.xml file and don't
think the entire application gets loaded into memory. After doing a full
garbage collection, the heap memory comes down to 11M. Is something
going wrong or is it the way tomcat behaves? 
 
Hari



RE: Startup parameters

2003-01-17 Thread Hari Venkatesan
Setting the parameters in Catalina.bat would not work if you run Tomcat
as a service since you service is calling tomcat.exe directly and not
startup.bat or Catalina.bat. 

But to test out before you start the service you can put the values in
CATALINA_OPTS = -Xms128m -Xmx258 etc and run Catalina.bat. You can also
set the values as Environment Variables and forget about changing it in
Catalina.bat

To Run it as service and with the parameters follow the link

http://www.mattkelli.com/tech/tomcat/ntservice.htm

Hope this helps

Hari

-Original Message-
From: Nathan McMinn [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 17, 2003 5:22 PM
To: Tomcat Users List
Subject: Startup parameters

OK, one quick question that I'm sure anybody here but me can answer.

I am running Tomcat as a service on windows 2000 server.  I want to set
some
JVM parameters when tomcat starts (things like -server, -Xmx, -Xms,
etc).
Where would I go about making these changes?  I've looked through the
catalina.bat file, but is this even executed when tomcat is run as a
service?  according to the services applet in the control panel, the
service
runs tomcat.exe.  Does this in turn call the startup script? Or do I
need to
pass the parameters using -jvm_option to tomcat.exe?  As an aside, is
there
anything that can be done to optimize tomcat for execution on a
multi-processor system?

--Nathan McMinn



--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: Startup parameters

2003-01-17 Thread Hari Venkatesan
Take a look at the following site. It gives you a feeler of how to do
it. Once you run the batch file, it updates the Win2000 registry entries
for you. From there you can play with it. 

http://www.mattkelli.com/tech/tomcat/ntservice.htm

But the only catch running tomcat as service with the start up
parameters is -verbose:gc does not print the Garbage collection entries
in either stdout or stderr. I have'nt figured out where it is printing
yet.

Hari


-Original Message-
From: Nathan McMinn [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 17, 2003 5:22 PM
To: Tomcat Users List
Subject: Startup parameters

OK, one quick question that I'm sure anybody here but me can answer.

I am running Tomcat as a service on windows 2000 server.  I want to set
some
JVM parameters when tomcat starts (things like -server, -Xmx, -Xms,
etc).
Where would I go about making these changes?  I've looked through the
catalina.bat file, but is this even executed when tomcat is run as a
service?  according to the services applet in the control panel, the
service
runs tomcat.exe.  Does this in turn call the startup script? Or do I
need to
pass the parameters using -jvm_option to tomcat.exe?  As an aside, is
there
anything that can be done to optimize tomcat for execution on a
multi-processor system?

--Nathan McMinn



--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




[Off-Topic] Memory ALlocation in Win2K

2003-01-17 Thread Hari Venkatesan
When I start the JVM with -Xms512m, where does the memory gets allocated
from. Is it from System main memory or from the virtual Memory. 
The reason I ask this is when I look at Windows Task manager I could see
a bump in the MEM Usage portion. But the amount of Physical Memory
(Total + Available) does not add up. 
I thought it was allocating from Virtual Memory and hence changed the
physical memory to 64 meg instead of 1024 Meg. Still it does not add up.

 
Can somebody throw some light on this.
 
Hari



RE: Redirecting verbosegc to a file [Off-TOPIC]

2003-01-16 Thread Hari Venkatesan
Thanks. Sure will append OFF-TOPIC.
I am using jdk1.3.1. in W2k. Will try to find out how to redirect the
same

Hari

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 16, 2003 3:18 PM
To: Tomcat Users List
Subject: RE: Redirecting verbosegc to a file 

Hi,
For JDK 1.4, try the -Xloggc: option.  For older JDKs, use native
platform redirection if available or some other system that'll swallow
System.out.  In the future, if you're posting non-tomcat questions to
the tomcat list at all, please add [OFF-TOPIC] to the subject.  Thanks,

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Hari Venkatesan [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, January 16, 2003 3:15 PM
>To: [EMAIL PROTECTED]
>Subject: Redirecting verbosegc to a file
>
>Is there a way to redirect -verbose:gc from displaying in console to a
>log file?
>
>Hari

--
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]>




Redirecting verbosegc to a file

2003-01-16 Thread Hari Venkatesan
Is there a way to redirect -verbose:gc from displaying in console to a
log file?
 
Hari



Tomcat in Server Mode

2003-01-16 Thread Hari Venkatesan
I changed the following settings in setclasspath.bat to start tomcat
server in Server Mode.
 
Set _RUNJAVA="%JAVA_HOME%\bin\java" -server
Set _RUNJAVA="%JAVA_HOME%\bin\javaw" -server
Set _RUNJAVA="%JAVA_HOME%\bin\jdb" -server
 
I have also changed JAVA_HOME/jre/lib/jvm.cfg to put -server at the top
of the list
 
How do we determine if tomcat actually came up using server mode?
 
Hari
 



Garbage Collection - Settings

2003-01-14 Thread Hari Venkatesan
I know somebody answered this question before but could not find it in
the archives.
 
Is there any difference between -Xms64m and -Xms64M
Similarly is there a difference between -Xms1G and -Xms1g
 
Hari



Precompiling JSP - setup

2003-01-14 Thread Hari Venkatesan
Is there any documentation that explains how to setup parameters for
precompiling JSP's when Tomcat Server starts up or can somebody please
explain how to do this?
 
Hari



Garbage Collection

2003-01-13 Thread Hari Venkatesan
Is there a way to find out how often tomcat runs Garbage Collection and
how to optimize it if GC does not happen often
 
Hari



RE: Precompiling JSP

2003-01-13 Thread Hari Venkatesan
Thanks again.

I have connection pooling which works fine. Also I have created SQLPackages and data 
compression to true.

Hari

-Original Message-
From: Reynir Hübner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 13, 2003 12:40 PM
To: Tomcat Users List
Subject: RE: Precompiling JSP

Hi again, 
Few tips : 
Use connection pooling, cache data from database if you can, lazyload data from 
database when that is a good idea etc.

Creating connections to DB2 is not the fastest thing around, so I suspect connection 
pooling may take 2 seconds of that time. 

Hope it helps
-reynir





> -Original Message-
> From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] 
> Sent: 13. janúar 2003 13:48
> To: Tomcat Users List
> Subject: RE: Precompiling JSP
> 
> 
> Thanks Reynir,
> 
> This was exactly I was looking for. Our Jsp's are loading 
> very slow. We are using JDBC connection to DB2/400 and our 
> initial database has only about 10 records. It takes 
> about 7 - 10 seconds for our JSP's to load. 
> 
> Hari
> 
> -Original Message-
> From: Reynir Hübner [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, January 13, 2003 8:28 AM
> To: Tomcat Users List
> Subject: RE: Precompiling JSP
> 
> Hi, 
> 
> In my understanding it really only affects performance. 
> 
> The first request on a jsp always takes longer to execute 
> because at that time it must precompile the jsp. 
> If you run a precompiler (such as jspc) on the jsp pages 
> before you start up the server (or at startup) you will 
> shorten the time of response on the first request of a jsp page.
> 
> If you are dealing with performance there are many other 
> things that you might want to look at. 
> I recommend the following page as a good material on this matter: 
> http://www.javaperformancetuning.com/
> 
> Hope it helps
> 
> [EMAIL PROTECTED]
> 
> 
>  
> 
> > -Original Message-
> > From: Hari Venkatesan [mailto:[EMAIL PROTECTED]]
> > Sent: 13. janúar 2003 13:23
> > To: [EMAIL PROTECTED]
> > Subject: Precompiling JSP
> > 
> > 
> > Is there any definitive advantage of precompiling JSPs' when
> > tomcat server starts UP. Does this have any effect on performance?
> >  
> > Hari
> > 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-> [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]>




RE: Precompiling JSP

2003-01-13 Thread Hari Venkatesan
Thanks Reynir,

This was exactly I was looking for. Our Jsp's are loading very slow. We are using JDBC 
connection to DB2/400 and our initial database has only about 10 records. It takes 
about 7 - 10 seconds for our JSP's to load. 

Hari

-Original Message-
From: Reynir Hübner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 13, 2003 8:28 AM
To: Tomcat Users List
Subject: RE: Precompiling JSP

Hi, 

In my understanding it really only affects performance. 

The first request on a jsp always takes longer to execute because at that time it must 
precompile the jsp. 
If you run a precompiler (such as jspc) on the jsp pages before you start up the 
server (or at startup) you will shorten the time of response on the first request of a 
jsp page.

If you are dealing with performance there are many other things that you might want to 
look at. 
I recommend the following page as a good material on this matter: 
http://www.javaperformancetuning.com/

Hope it helps

[EMAIL PROTECTED]


 

> -Original Message-
> From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] 
> Sent: 13. janúar 2003 13:23
> To: [EMAIL PROTECTED]
> Subject: Precompiling JSP
> 
> 
> Is there any definitive advantage of precompiling JSPs' when 
> tomcat server starts UP. Does this have any effect on performance?
>  
> Hari
> 

--
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]>




Precompiling JSP

2003-01-13 Thread Hari Venkatesan
Is there any definitive advantage of precompiling JSPs' when tomcat
server starts UP. Does this have any effect on performance?
 
Hari



Connection Pool

2003-01-06 Thread Hari Venkatesan
Is there a way to find out the number of active connections in a
connection pool?
 
Hari



Work Directory in Tomcat

2002-12-20 Thread Hari Venkatesan
Can anybody explain the usage of work Directory in Tomcat. I see that
the compiled versions of the JSP's are being stored here. Does the JSP
get loaded from here upon actual execution? IF so what happens if there
is a change in the JSP. 
 
One strange problem is every time I change a JSP, I had to go and remove
the JSP classes from the work directory before I could get to see the
changed version. Any Ideas?
 
Hari



Virtual Host

2002-12-17 Thread Hari Venkatesan
John,

Thanks for all your help on Virtual host setup. I got it setup and works
really good.

Hari

-Original Message-
From: Turner, John [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 17, 2002 10:01 PM
To: 'Tomcat Users List'
Subject: RE: jsps and servlets don't work


Maybe so.  Seems pretty straightforward to me.  I'm sure the dev team
would
welcome a patch.

Since the dev team is focusing on JK2, and ApacheConfig only works for
JK,
I'm not sure they will give it much attention.  Worth a shot, though.

John


-Original Message-
From: Joseph Shraibman [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 17, 2002 7:22 PM
To: Tomcat Users List
Subject: Re: jsps and servlets don't work

Then at least it should put into the generated config file a comment
that
ajp13 should be 
converted into the name of the worker.

Turner, John wrote:
> AFAIK, no.  I believe "ajp13" is hardcoded in the ApacheConfig class,
but
I
> could be wrong.  I guess convenience has its tradeoffs.
> 
> John
> 
> 
> -Original Message-
> From: Joseph Shraibman [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, December 16, 2002 7:36 PM
> To: Tomcat Users List
> Subject: Re: jsps and servlets don't work
> 
> Turner, John wrote:
> 
>>Check the last error message: "wc_get_worker_for_name ajp13".  Your
>>workers.properties file has a worker called "test1" but the worker
being
>>sought is "ajp13".
>>
>>If your JkMount commands look like this:
>>
>>JkMount /*.jsp ajp13
>>
>>Then change the worker name in workers.properties to "ajp13", not
"test1".
>>
> 
> Ah, I was wondering about that. Is there any way to get the
autogenerated
> conf file to 
> have test1 instead of ajp13?
> 


-- 
Joseph Shraibman
[EMAIL PROTECTED]
Increase signal to noise ratio.  http://xis.xtenit.com


--
To unsubscribe, e-mail:

For additional commands, e-mail:


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002
 

--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: Virtual Domains with Tomcat 4.1.12 Standalone

2002-12-17 Thread Hari Venkatesan
Congratulations Norment. R u using IIS?

Hari

-Original Message-
From: J. Norment [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 17, 2002 1:45 PM
To: Tomcat Users List
Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone

Just wanted to let you know: I got it working.  I ended up uninstalling Tomcat 4.1.12 
and installing Tomcat 4.1.17, and it worked almost from the start.  (I'm guessing that 
I somehow corrupted my server.xml file.)  Thanks for all your help!


On Tue, 17 Dec 2002 11:19:56 -0500, Turner, John wrote:
>
>If you post your server.xml, someone will look at it.  I can't
>promise I
>will, as time is everything, but someone will.  If you could remove
>the
>comments from it and post an uncommented version, that would make it
>smaller
>and easier to scan.
>
>John
>
>
>>-Original Message-
>>From: J. Norment [mailto:[EMAIL PROTECTED]]
>>Sent: Tuesday, December 17, 2002 11:12 AM
>>To: Tomcat Users List
>>Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone
>>
>>
>>Got it, John.  Thanks for your time. ( not being sarcastic...
>>forgot to thank you earlier. )
>>( For the record, I only posted the small snippet because
>>that was all that I changed from "out of the box" )
>>
>>I'll try to verify the XML tags now.
>>( I've thought about this before, but I'll look at it again. )
>>
>>I thought that maybe I had something screwy going on with
>>part of the request being blocked, but I honestly don't know
>>that part intimately enough to look at it and verify that
>>everything is coming through ok.
>>
>>
>>On Tue, 17 Dec 2002 11:03:06 -0500, Turner, John wrote:
>>>
>>>No, it is not.  Leave defaultHost alone.
>>>
>>>Setup a Host element for host0.com and host1.com.
>>>
>>>If this is not working, either post your entire server.xml or post
>>>log file
>>>snippets with error messages.  XML files are sensitive to properly
>>>closed
>>>tags and elements...including just a small snippet of your
>>>server.xml file
>>>doesn't let anyone verify that you've positioned and closed the
>>>new
>>>tags
>>>correctly because we can't see any of the other tags.
>>>
>>>My apologies, but this is starting to get fairly tedious.  Adding
>>>a
>>>new Host
>>>element is a trivial exercise, all you have to do is make sure you
>>>position
>>>it correctly and close it correctly.  There's really nothing else
>>>to
>>>do.  If
>>>you have to, copy server.xml to server-work.xml, delete all of the
>>>comments
>>>and other extra information, and work with the resulting smaller
>>>file until
>>>you get the new elements closed and positioned correctly.
>>>Server.xml is no
>>>different than and HTML file...position and close everything
>>>properly, and
>>>it works.
>>>
>>>John
>>>
>>>>-Original Message-
>>>>From: J. Norment [mailto:[EMAIL PROTECTED]]
>>>>Sent: Tuesday, December 17, 2002 10:36 AM
>>>>To: Tomcat Users List
>>>>Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone
>>>>
>>>>
>>>>Hari:
>>>>
>>>>Thanks for the response.
>>>>( For that matter, thanks for everyone's response so far... )
>>>>
>>>>I want the behavior to be:
>>>>
>>>>http://localhost - loads up the default welcome page,
>>>>root/index.jsp
>>>>http://host0.com - loads up host0's index page
>>>>http://host1.com - loads up host1's index page
>>>>
>>>>Is changing the default host part of the solution?
>>>>
>>>>
>>>>
>>>>On Tue, 17 Dec 2002 10:22:20 -0500, Hari Venkatesan wrote:
>>>>>You have two >>>>host. Did you change ">>>>defaultHost="localhost" debug="99">" to reflect "host0.com" in
>>>>>the
>>>>>defaultHost
>>>>>
>>>>>Hari
>>>>>
>>>>>-Original Message-
>>>>>From: J. Norment [mailto:[EMAIL PROTECTED]]
>>>>>Sent: Tuesday, December 17, 2002 10:15 AM
>>>>>To: Tomcat Users List
>>>>>Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone
>>>>>
>>>>>This is the change that I had made to the server.xml file:
>>>&g

RE: Virtual Domains with Tomcat 4.1.12 Standalone

2002-12-17 Thread Hari Venkatesan
Thanks for the reply john. I got it. But there is one small problem yet to resolve. 
When I use http://something.com/{Webapp}/index.jsp, it comes back with a Basic Server 
Authentication window. I don't have any authentication setup in web.xml file. 

I am using IIS and tomcat and have defined virtualhost in server.xml file. If I access 
the server directly by it name, it is showing me the index page but if try with the 
virtualhost, I get authentication for the server. Any ideas?

Hari

-Original Message-
From: Turner, John [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 17, 2002 11:19 AM
To: 'Tomcat Users List'
Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone


Let's put it this way.  If you had to change defaultHost for virtual hosts
to work, then you could never have more than one virtual host, since there
is only one defaultHost.  That's obviously wrong.  Tomcat has the ability to
serve many virtual hosts, not just one. I have several virtual hosts running
on a Sun 420R at the moment, and there's only one defaultHost (and it's set
to localhost).

If you are getting "server not found" then something.com doesn't resolve to
an IP address.  Can you ping something.com?  If not, there's your answer.  

If "something.com" resolved to the IP address where Tomcat was running, and
there was no virtual host defined, then Tomcat would revert to serving the
default context from the default host.  That's what "defaultHost" does.

John

> -Original Message-
> From: Hari Venkatesan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 2002 11:10 AM
> To: Tomcat Users List
> Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone
> 
> 
> If I leave the defaultHost to localhost and have a  name=something.com>, when I type in the url 
> http://something.com/{webapp}/index.jsp, I get a server not 
> found or DNS error. Do I need to define something.com 
> anywhere else in win2000
> 
> Hari
> 
> 
> -Original Message-
> From: Turner, John [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, December 17, 2002 11:04 AM
> To: 'Tomcat Users List'
> Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone
> 
> 
> Changing defaultHost is not the solution.
> 
> John
> 
> 
> > -Original Message-
> > From: Hari Venkatesan [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, December 17, 2002 10:51 AM
> > To: Tomcat Users List
> > Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone
> > 
> > 
> > I really don't know if changing the defaulthost name is the 
> > solution. R u able to serve the pages with the configuration 
> > you have now without changing the defaulthost name or are you 
> > getting a DNS error. 
> > 
> > IF you want to serve pages the way you want it, then each of 
> > the  entries you have in server.xml should have 
> >  defined with its own Web.xml file. 
> > 
> > Hari
> > 
> > -Original Message-
> > From: J. Norment [mailto:[EMAIL PROTECTED]] 
> > Sent: Tuesday, December 17, 2002 10:36 AM
> > To: Tomcat Users List
> > Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone
> > 
> > Hari:
> > 
> > Thanks for the response.
> > ( For that matter, thanks for everyone's response so far... )
> > 
> > I want the behavior to be:
> > 
> > http://localhost - loads up the default welcome page, root/index.jsp
> > http://host0.com - loads up host0's index page
> > http://host1.com - loads up host1's index page
> > 
> > Is changing the default host part of the solution?
> > 
> > 
> > 
> > On Tue, 17 Dec 2002 10:22:20 -0500, Hari Venkatesan wrote:
> > >You have two  > >host. Did you change " > >defaultHost="localhost" debug="99">" to reflect "host0.com" in the
> > >defaultHost
> > >
> > >Hari
> > >
> > >-Original Message-
> > >From: J. Norment [mailto:[EMAIL PROTECTED]]
> > >Sent: Tuesday, December 17, 2002 10:15 AM
> > >To: Tomcat Users List
> > >Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone
> > >
> > >This is the change that I had made to the server.xml file:
> > >
> > >>
> > >> > >>unpackWARs="true" autoDeploy="true">
> > >>
> > >>
> > >>
> > >> > >>unpackWARs="true">
> > >> > >>directory="logs" prefix="host0." suffix=".log" timestamp="true"/>
> > >> &

RE: Virtual Domains with Tomcat 4.1.12 Standalone

2002-12-17 Thread Hari Venkatesan
If I leave the defaultHost to localhost and have a , when I 
type in the url http://something.com/{webapp}/index.jsp, I get a server not found or 
DNS error. Do I need to define something.com anywhere else in win2000

Hari


-Original Message-
From: Turner, John [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 17, 2002 11:04 AM
To: 'Tomcat Users List'
Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone


Changing defaultHost is not the solution.

John


> -Original Message-
> From: Hari Venkatesan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 2002 10:51 AM
> To: Tomcat Users List
> Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone
> 
> 
> I really don't know if changing the defaulthost name is the 
> solution. R u able to serve the pages with the configuration 
> you have now without changing the defaulthost name or are you 
> getting a DNS error. 
> 
> IF you want to serve pages the way you want it, then each of 
> the  entries you have in server.xml should have 
>  defined with its own Web.xml file. 
> 
> Hari
> 
> -Original Message-
> From: J. Norment [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, December 17, 2002 10:36 AM
> To: Tomcat Users List
> Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone
> 
> Hari:
> 
> Thanks for the response.
> ( For that matter, thanks for everyone's response so far... )
> 
> I want the behavior to be:
> 
> http://localhost - loads up the default welcome page, root/index.jsp
> http://host0.com - loads up host0's index page
> http://host1.com - loads up host1's index page
> 
> Is changing the default host part of the solution?
> 
> 
> 
> On Tue, 17 Dec 2002 10:22:20 -0500, Hari Venkatesan wrote:
> >You have two  >host. Did you change " >defaultHost="localhost" debug="99">" to reflect "host0.com" in the
> >defaultHost
> >
> >Hari
> >
> >-Original Message-
> >From: J. Norment [mailto:[EMAIL PROTECTED]]
> >Sent: Tuesday, December 17, 2002 10:15 AM
> >To: Tomcat Users List
> >Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone
> >
> >This is the change that I had made to the server.xml file:
> >
> >>
> >> >>unpackWARs="true" autoDeploy="true">
> >>
> >>
> >>
> >> >>unpackWARs="true">
> >> >>directory="logs" prefix="host0." suffix=".log" timestamp="true"/>
> >> >>reloadable="true"/>
> >> >>reloadable="true"/>
> >>
> >>
> >>
> >
> >Is this is the change that you are referring to in adding the host
> >tag?
> >
> >If that is not working, how would I track down what is broken?
> >(ie, are there log files saying exactly what Tomcat is getting from
> >the request?)
> >
> >As for adding an alias for localhost, wouldn't that mean that only
> >one host was used?
> >Ultimately, I'd like host0.com and host1.com to be different "hosts"
> >for Tomcat.
> >
> >Applying Occam's Razor, I'm pretty sure that something is screwed on
> >my end, but not sure how to track it down, at this point...
> >
> >
> >On Tue, 17 Dec 2002 09:27:14 -0500, Turner, John wrote:
> >>
> >>It has Apache installed, but I just verified this behavior using
> >>http://some.server.com:8080 which bypasses Apache.
> >>
> >>If you need a virtual host setup in Tomcat, modify server.xml and
> >>add a Host
> >>element with a name parameter set to the FQDN that will be in the
> >>URL.
> >>Alternatively, if you want some.server.com to be treated as
> >>localhost, add
> >>an Alias tag to the localhost Host element in server.xml.
> >>
> >>Apache VirtualHost = Tomcat Host (roughly speaking)
> >>
> >>
> >>
> >>...some stuff here like Contexts, etc
> >>
> >>
> >>
> >>The server.xml that comes with Tomcat has what you need already in
> >>it.  The
> >>default server.xml file has a single virtual host (localhost) with a
> >>three
> >>Contexts (admin, manager, examples).  Copy what you need from that.
> >>The
> >>Host element for localhost has a lot of stuff in it, probably stuff
> >>you
> >>don't need.  Just delete most of it, and you should be fine.
> >>Alternatively,
> >>find the localhost Host element in server.xml and change th

RE: Virtual Domains with Tomcat 4.1.12 Standalone

2002-12-17 Thread Hari Venkatesan
I really don't know if changing the defaulthost name is the solution. R u able to 
serve the pages with the configuration you have now without changing the defaulthost 
name or are you getting a DNS error. 

IF you want to serve pages the way you want it, then each of the  entries you 
have in server.xml should have  defined with its own Web.xml file. 

Hari

-Original Message-
From: J. Norment [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 17, 2002 10:36 AM
To: Tomcat Users List
Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone

Hari:

Thanks for the response.
( For that matter, thanks for everyone's response so far... )

I want the behavior to be:

http://localhost - loads up the default welcome page, root/index.jsp
http://host0.com - loads up host0's index page
http://host1.com - loads up host1's index page

Is changing the default host part of the solution?



On Tue, 17 Dec 2002 10:22:20 -0500, Hari Venkatesan wrote:
>You have two host. Did you change "defaultHost="localhost" debug="99">" to reflect "host0.com" in the
>defaultHost
>
>Hari
>
>-Original Message-
>From: J. Norment [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, December 17, 2002 10:15 AM
>To: Tomcat Users List
>Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone
>
>This is the change that I had made to the server.xml file:
>
>>
>>>unpackWARs="true" autoDeploy="true">
>>
>>
>>
>>>unpackWARs="true">
>>>directory="logs" prefix="host0." suffix=".log" timestamp="true"/>
>>>reloadable="true"/>
>>>reloadable="true"/>
>>
>>
>>
>
>Is this is the change that you are referring to in adding the host
>tag?
>
>If that is not working, how would I track down what is broken?
>(ie, are there log files saying exactly what Tomcat is getting from
>the request?)
>
>As for adding an alias for localhost, wouldn't that mean that only
>one host was used?
>Ultimately, I'd like host0.com and host1.com to be different "hosts"
>for Tomcat.
>
>Applying Occam's Razor, I'm pretty sure that something is screwed on
>my end, but not sure how to track it down, at this point...
>
>
>On Tue, 17 Dec 2002 09:27:14 -0500, Turner, John wrote:
>>
>>It has Apache installed, but I just verified this behavior using
>>http://some.server.com:8080 which bypasses Apache.
>>
>>If you need a virtual host setup in Tomcat, modify server.xml and
>>add a Host
>>element with a name parameter set to the FQDN that will be in the
>>URL.
>>Alternatively, if you want some.server.com to be treated as
>>localhost, add
>>an Alias tag to the localhost Host element in server.xml.
>>
>>Apache VirtualHost = Tomcat Host (roughly speaking)
>>
>>
>>
>>...some stuff here like Contexts, etc
>>
>>
>>
>>The server.xml that comes with Tomcat has what you need already in
>>it.  The
>>default server.xml file has a single virtual host (localhost) with a
>>three
>>Contexts (admin, manager, examples).  Copy what you need from that.
>>The
>>Host element for localhost has a lot of stuff in it, probably stuff
>>you
>>don't need.  Just delete most of it, and you should be fine.
>>Alternatively,
>>find the localhost Host element in server.xml and change the name
>>parameter
>>from "localhost" to "your.server.com", restart Tomcat, and test it
>>out and
>>see if the behavior is what you want, then just copy that.
>>
>>John
>>
>>>-Original Message-
>>>From: J. Norment [mailto:[EMAIL PROTECTED]]
>>>Sent: Tuesday, December 17, 2002 9:20 AM
>>>To: Tomcat Users List
>>>Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone
>>>
>>>
>>>That sounds almost exactly like what I'm trying to do.  Does
>>>your test box setup also have Apache installed?  If not, what
>>>did you do to get some.server.com showing up?
>>>
>>>
>>>On Tue, 17 Dec 2002 09:14:08 -0500, Turner, John wrote:
>>>>
>>>>Sorry, maybe someone else can answer your question.  I'm just not
>>>>understanding the problem.  I have a RH 7.3 test box setup, with
>>>>two
>>>>virtual
>>>>hosts (one is localhost, the other is some.server.com), and the
>>>>welcome
>>>>files display correctly.  If it isn't working for you, I would
>>>>suggest that
>>>>the issue is with your virtual hosting configuration, not your
>>>>welcome
>>>>file/index.html configuration.
>>>>
>>>>John
>>>>
>>
>>--
>>To unsubscribe, e-mail:   <mailto:tomcat-user-
>>[EMAIL PROTECTED]>
>>For additional commands, e-mail: <mailto:tomcat-user-
>>[EMAIL PROTECTED]>
>>
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:tomcat-user-
>[EMAIL PROTECTED]>
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:tomcat-user-
>[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]>




RE: Virtual Domains with Tomcat 4.1.12 Standalone

2002-12-17 Thread Hari Venkatesan
You have two " to reflect "host0.com" 
in the defaultHost

Hari

-Original Message-
From: J. Norment [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 17, 2002 10:15 AM
To: Tomcat Users List
Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone

This is the change that I had made to the server.xml file:

>
>autoDeploy="true">
>
>
>
>
>prefix="host0." suffix=".log" timestamp="true"/>
>
>
>
>
>

Is this is the change that you are referring to in adding the host tag?

If that is not working, how would I track down what is broken?
(ie, are there log files saying exactly what Tomcat is getting from the request?)

As for adding an alias for localhost, wouldn't that mean that only one host was used?
Ultimately, I'd like host0.com and host1.com to be different "hosts" for Tomcat.

Applying Occam's Razor, I'm pretty sure that something is screwed on my end, but not 
sure how to track it down, at this point...


On Tue, 17 Dec 2002 09:27:14 -0500, Turner, John wrote:
>
>It has Apache installed, but I just verified this behavior using
>http://some.server.com:8080 which bypasses Apache.
>
>If you need a virtual host setup in Tomcat, modify server.xml and
>add a Host
>element with a name parameter set to the FQDN that will be in the
>URL.
>Alternatively, if you want some.server.com to be treated as
>localhost, add
>an Alias tag to the localhost Host element in server.xml.
>
>Apache VirtualHost = Tomcat Host (roughly speaking)
>
>
>
>...some stuff here like Contexts, etc
>
>
>
>The server.xml that comes with Tomcat has what you need already in
>it.  The
>default server.xml file has a single virtual host (localhost) with a
>three
>Contexts (admin, manager, examples).  Copy what you need from that.
>The
>Host element for localhost has a lot of stuff in it, probably stuff
>you
>don't need.  Just delete most of it, and you should be fine.
>Alternatively,
>find the localhost Host element in server.xml and change the name
>parameter
>from "localhost" to "your.server.com", restart Tomcat, and test it
>out and
>see if the behavior is what you want, then just copy that.
>
>John
>
>>-Original Message-
>>From: J. Norment [mailto:[EMAIL PROTECTED]]
>>Sent: Tuesday, December 17, 2002 9:20 AM
>>To: Tomcat Users List
>>Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone
>>
>>
>>That sounds almost exactly like what I'm trying to do.  Does
>>your test box setup also have Apache installed?  If not, what
>>did you do to get some.server.com showing up?
>>
>>
>>On Tue, 17 Dec 2002 09:14:08 -0500, Turner, John wrote:
>>>
>>>Sorry, maybe someone else can answer your question.  I'm just not
>>>understanding the problem.  I have a RH 7.3 test box setup, with
>>>two
>>>virtual
>>>hosts (one is localhost, the other is some.server.com), and the
>>>welcome
>>>files display correctly.  If it isn't working for you, I would
>>>suggest that
>>>the issue is with your virtual hosting configuration, not your
>>>welcome
>>>file/index.html configuration.
>>>
>>>John
>>>
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>
>



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


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




Tomcat/IIS and Virtual Host

2002-12-16 Thread Hari Venkatesan
Is there any documentation that explains virtual hosting using IIS and
tomcat
 
Hari



Multiple Instances

2002-12-12 Thread Hari Venkatesan


I remember somebody in the group saying that they have multiple
instances in production. How do you run multiple instances of tomcat as
a service in WIN2000

Each of the instance will have a separate server.xml file and
startup.bat

Hari

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




RE: Request/Connection Timeout

2002-12-11 Thread Hari Venkatesan
In Server.xml file you have connection time out for each of the
connector class. Also if you have configured connection pools in
server.xml you can increase  the maxwait parameter value.

Hari

-Original Message-
From: GUNTURU, SRINIVAS [AG-Contractor/1000]
[mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, December 11, 2002 10:36 AM
To: 'Tomcat Users List'
Subject: RE: Request/Connection Timeout

Thanks for the quick response Hari.  But, It's not the session that is
timing out.  It is the request that is timing out though the server is
still
working on the request.  Hope this helps.

-Original Message-----
From: Hari Venkatesan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 9:34 AM
To: Tomcat Users List
Subject: RE: Request/Connection Timeout


You can set session time outs in Web.xml file

Hari

-Original Message-
From: GUNTURU, SRINIVAS [AG-Contractor/1000]
[mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, December 11, 2002 10:28 AM
To: '[EMAIL PROTECTED]'
Subject: Request/Connection Timeout

Hi,

We are using Tomcat 4.0.4 on Apache.  Right now when we have a request
that
takes longer than 300 seconds(5 minutes), connections are timing out and
we
are getting various errors.  How do we go about increasing this timeout
so
that the request does not timeout.  Unfortunately, The analysis that
runs on
the server is very computational intensive and we have done a lot of
tuning
and most of the times it does run under 5 minutes however depending on
server load and database load we do run over 5 minutes frequently and
error
out.  Ideally, we would like to not have this restriction.  I have
searched
in the archives and Tomcat documentation and have not found anything.

Thanks for your help.

Srinivas

--
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]>


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




RE: Request/Connection Timeout

2002-12-11 Thread Hari Venkatesan
You can set session time outs in Web.xml file

Hari

-Original Message-
From: GUNTURU, SRINIVAS [AG-Contractor/1000]
[mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, December 11, 2002 10:28 AM
To: '[EMAIL PROTECTED]'
Subject: Request/Connection Timeout

Hi,

We are using Tomcat 4.0.4 on Apache.  Right now when we have a request
that
takes longer than 300 seconds(5 minutes), connections are timing out and
we
are getting various errors.  How do we go about increasing this timeout
so
that the request does not timeout.  Unfortunately, The analysis that
runs on
the server is very computational intensive and we have done a lot of
tuning
and most of the times it does run under 5 minutes however depending on
server load and database load we do run over 5 minutes frequently and
error
out.  Ideally, we would like to not have this restriction.  I have
searched
in the archives and Tomcat documentation and have not found anything.

Thanks for your help.

Srinivas

--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




IIS webserver and JK2

2002-12-10 Thread Hari Venkatesan
Formbased authentication does not work if IIS is configured with Tomcat
but works with normal HTTP server. Can somebody throw some light?
I get 404 error stating j_security_check resource not available.
 
This is the same with /examples/jsp/security/protected/login.jsp too!
 
Hari



FormBased Authentication

2002-12-10 Thread Hari Venkatesan


I have IIS 5.0 configured with Tomcat 4.1.12. My form based
authentication is failing to find j_security_check and comes back with
resource not available. 

The same code when executed with normal http server works. 

Any ideas? ?

Hari

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




RE: Server.xml

2002-12-10 Thread Hari Venkatesan
Jake

Should I uncomment the the following lines to make it work with IIS



Hari

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 10, 2002 1:40 PM
To: Tomcat Users List
Subject: Re: Server.xml

Hello Hari,

That's just a matter of the docs being not quite up-to-date.  The
Coyote connector is the connector for both http and jk (jk and jk2).
The other stuff is deprecated, although it still works just fine.

Jake

Tuesday, December 10, 2002, 12:24:23 PM, you wrote:



HV> Can somebody explain why in the default server.xml file we have 

HV>  port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true"
HV> redirectPort="8443" acceptCount="10" debug="0"
connectionTimeout="2"
HV> useURIValidationHack="false"/>

HV> and 

HV>  port="8009" minProcessors="5" maxProcessors="75"
enableLookups="true"
HV> redirectPort="8443" acceptCount="10" debug="0"
connectionTimeout="2"
HV> useURIValidationHack="false"
HV> protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>

HV> but AJPconnector that listens on port 8009 has been commented out. 

HV> Also when the server starts, we get an INFO message "ajp13 listening
on
HV> tcp port 8009.

HV> I am trying to configure IIS and to redirect and having problems.
The
HV> documentation says that I need the following on server.xml file

HV> port="8009" minProcessors="5" maxProcessors="75"
HV>acceptCount="10" debug="0"/>

HV> Should I then comment out the previous connectors and have only
HV> AjpConnector

HV> Please help

HV> Hari

HV> --
HV> To unsubscribe, e-mail:

HV> For additional commands, e-mail:




-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




Server.xml

2002-12-10 Thread Hari Venkatesan


Can somebody explain why in the default server.xml file we have 



and 



but AJPconnector that listens on port 8009 has been commented out. 

Also when the server starts, we get an INFO message "ajp13 listening on
tcp port 8009.

I am trying to configure IIS and to redirect and having problems. The
documentation says that I need the following on server.xml file



Should I then comment out the previous connectors and have only
AjpConnector

Please help

Hari

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




RE: XML vs JSP Syntax: Looks like a bug

2002-12-10 Thread Hari Venkatesan
Try replacing the  to <% 
It might work.

Hari 

-Original Message-
From: Doug Blackburn [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 10, 2002 12:29 PM
To: Tomcat Users List
Subject: RE: XML vs JSP Syntax: Looks like a bug

Why does it compile when I take out the for loop?

-Original Message-
From: Hari Venkatesan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 12:20 PM
To: Tomcat Users List
Subject: RE: XML vs JSP Syntax: Looks like a bug


It is not a problem with Tomcat. Your JSP is not getting compiled
correctly into a servlet class.

" org.apache.jasper.JasperException: Unable to compile class for JSP"

"org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.j
ava:479)"

Your compilation is failing at line 479.


  int count = 0;
  for (int j = 0; j <= 10; j++) {
count = j;
  }


Should this be scriplet or <%

Take a look at your jsp and see if all opening tags and closing tags
exist.

Hari

-Original Message-
From: Doug Blackburn [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 12:14 PM
To: Tomcat Users List
Subject: JSP: XML vs JSP Syntax: Looks like a bug

The complete code for two very simple jsp's are below. They both do the
same
thing, display a value. The problem is that (2) gets an internal error
upon
request (error message follows code). (1) works fine.

If I take the for loop out of (2) and set the integer to some value, the
request is processed and the value is displayed correctly. Tomcat does
not
seem to be able to handle a for loop in a scriptlet tag, but is able to
handle it in jsp syntax. This looks like a bug.

Since I am new to Tomcat I thought I would send out the email to see if
there is something I have neglected before submitting a bug report.

Any comments would be appreciated.
Thanks
Doug


(1)JSP SYNTAX
-
<%
  int count = 0;
  for (int j = 0; j <= 10; j++) {
count = j;
  }
%>

<%= "The count is " + count %>

-
(2)XML SYNTAX
-
http://java.sun.com/JSP/Page";
  version="1.2">




  int count = 0;
  for (int j = 0; j <= 10; j++) {
count = j;
  }



"The count is " + count






---
ERROR MESSAGE
-

HTTP Status 500 -





type Exception report

message

description The server encountered an internal error () that prevented
it
from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
va:4
79)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:1
84)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:239
6)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
 

RE: XML vs JSP Syntax: Looks like a bug

2002-12-10 Thread Hari Venkatesan
It is not a problem with Tomcat. Your JSP is not getting compiled
correctly into a servlet class. 

" org.apache.jasper.JasperException: Unable to compile class for JSP"

"org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.j
ava:479)"

Your compilation is failing at line 479.


  int count = 0;
  for (int j = 0; j <= 10; j++) {
count = j;
  }


Should this be scriplet or <%

Take a look at your jsp and see if all opening tags and closing tags
exist.

Hari

-Original Message-
From: Doug Blackburn [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 10, 2002 12:14 PM
To: Tomcat Users List
Subject: JSP: XML vs JSP Syntax: Looks like a bug

The complete code for two very simple jsp's are below. They both do the
same
thing, display a value. The problem is that (2) gets an internal error
upon
request (error message follows code). (1) works fine.

If I take the for loop out of (2) and set the integer to some value, the
request is processed and the value is displayed correctly. Tomcat does
not
seem to be able to handle a for loop in a scriptlet tag, but is able to
handle it in jsp syntax. This looks like a bug.

Since I am new to Tomcat I thought I would send out the email to see if
there is something I have neglected before submitting a bug report.

Any comments would be appreciated.
Thanks
Doug


(1)JSP SYNTAX
-
<%
  int count = 0;
  for (int j = 0; j <= 10; j++) {
count = j;
  }
%>

<%= "The count is " + count %>

-
(2)XML SYNTAX
-
http://java.sun.com/JSP/Page";
  version="1.2">




  int count = 0;
  for (int j = 0; j <= 10; j++) {
count = j;
  }



"The count is " + count






---
ERROR MESSAGE
-

HTTP Status 500 -





type Exception report

message

description The server encountered an internal error () that prevented
it
from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
va:4
79)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:1
84)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:239
6)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.c

RE: Connection Pooling Help

2002-12-09 Thread Hari Venkatesan

Try changing the following parameter value in server.xml file 

jdbc:as400://10.0.0.1

jdbc:as400://{name of your machine}  instead of the ip
address of the as400

Hari

-Original Message-
From: Kevin Passey [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 8:40 AM
To: 'Tomcat Users List'
Subject: RE: Connection Pooling Help

Eric,

It's the same - DS == null. :-(

Thanks anyway.

Kevin

-Original Message-
From: Roberts, Eric [mailto:[EMAIL PROTECTED]]
Sent: 09 December 2002 13:33
To: Tomcat Users List
Subject: RE: Connection Pooling Help


Kevin,

Try:

  Context ctx = new InitialContext();
Context envCtx = (Context) ctx.lookup("java:/comp/env/");
DataSource ds = (DataSource) envCtx.lookup("/jdbc/shiltonDB");


-Original Message-
From: Kevin Passey [mailto:[EMAIL PROTECTED]]
Sent: Montag, 09. Dezember 2002 14:25
To: Tomcat Users List (E-mail)
Subject: Connection Pooling Help


Hi,

Can somebody point out my mistake for me - I'm starting to bang my
head..

I am trying to get connection pooling working on my AS/400 using the
Commons-DBCP.

I have placed this JAR in /common/lib along with the
JT400.JAR

I have added the context entries to my server.xml file - thus:-



   

   
  
 factory

 
org.apache.commons.dbcp.BasicDataSourceFactory
  

  
 maxActive

 100
  

  
 maxIdle

 3
  

  
 maxWait

 100
  

  
 username

 INTERNET
  

  
 password

 INTERNET
  

  
 driverClassName

 com.ibm.as400.access.AS400JDBCDriver
  

  
 url

 jdbc:as400://10.0.0.1
  
   


I have added this to my WEB-INF web.xml file:-





Resource reference to a factory for java.sql.Connection

instances that may be used for talking to a particular

database that is configured in the server.xml file.





jdbc/shiltonDB





javax.sql.DataSource





Container





And I have this java program to test the connection

import javax.naming.*;
import javax.sql.*;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletOutputStream;
import java.sql.*;

public class DBCPServlet extends HttpServlet {

   public void doGet(HttpServletRequest req,
 HttpServletResponse res) {

  try {
 ServletOutputStream out = res.getOutputStream();
 out.println("");
 out.println("Using Tomcat Connection Pooling with
DBCP");

 Context ctx = new InitialContext();
 if (ctx == null)
out.println("Something is wrong with Tomcat");

 DataSource ds = (DataSource)
ctx.lookup("java:comp/env/jdbc/shiltonDB");

 if (ds != null) {
Connection conn = ds.getConnection();

if (conn != null) {
   out.println("Got Connection: " + conn.toString() +
"");
   Statement stmt = conn.createStatement();
   String sql = "select * from BSSTYL";
   ResultSet rst = stmt.executeQuery(sql);
   if (rst.next()) {
  out.println("Value of HDCUST on first record:
"+
rst.getString("dbfield1")+ "");
   }
   out.println("This was our little database-access
servlet...");
   conn.close();
}
 }
  } catch (Exception e) {
 e.printStackTrace();
  }
   }

   /**
* if somebody does a http-post, we do an interal dispatch to doGet()
*/
   public void doPost(HttpServletRequest req,
  HttpServletResponse res) {
  doGet(req, res);
   }
}

"ds" is alway null - what am I missing.

Thanks in advance.



Kevin 

--
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: out of Context

2002-12-05 Thread Hari Venkatesan
David,

Sorry for my ignorance. I don't understand what you are trying to say.

Hari

-Original Message-
From: David Brown [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 05, 2002 2:41 PM
To: Tomcat Users List
Subject: Re: out of Context

Hari Venkatesan writes: 

> David, 
> 
> Thanks for the input. We have all the users in LDAP (Active
Directory).
> But for this specific application, we have roles defined and I need to
> retrieve the roles for the user and store them in session bean. For
this
> I need the userid from windows. Since the user has already been
> authenticated against LDAP to signon to windows, I don't want to
> authenticate him again by making him enter his id again. 
> 
> Hari 
> 
> -Original Message-
> From: David Brown [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, December 05, 2002 2:27 PM
> To: Tomcat Users List
> Subject: Re: out of Context 
> 
> Hari Venkatesan writes:  
> 
>> Yes, I am using realm. But actually I don't want the user to type in
> the
>> userid. I want to use the same id that he types in when he logs on to
>> windows. I am creating an Intranet application and want to use the
> same
>> id that the user logs in signing on to the network.  
>> 
>> Hari  
>> 
>> -Original Message-
>> From: David Brown [mailto:[EMAIL PROTECTED]] 
>> Sent: Thursday, December 05, 2002 1:54 PM
>> To: [EMAIL PROTECTED]
>> Subject: Re: out of Context  
>> 
>> Hari Venkatesan writes:   
>> 
>>>
>>> 
>>> Is there a way to retrieve windows userid from the client side using
>>> java or javascript?   
>>> 
>>> Hari   
>>> 
>>> --
>>> To unsubscribe, e-mail:
>> <mailto:[EMAIL PROTECTED]>
>>> For additional commands, e-mail:
>> <mailto:[EMAIL PROTECTED]> 
>>> 
>>
>> 
>> Hello Hari, i u r using realm and form based login this works 4 me:
>> String user = request.getUserPrincipal().getName();
>> hope this helps, david.   
>> 
>> --
>> 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]> 
>> 
>   
> 
> Hello Hari, it is probably not practical to try and fetch the windoz
> userid. 
> u best bet may be to put everything into a LDAP database centralized
to 
> everything else: windoz, tc etc. hope this helps, david.  
> 
> 
> --
> 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]> 
> 
 

 

Hello Hari, well since u r running LDAP just have a central (or director

type) servlet running that authenticates the users as they login from
LDAP 
and uses the tc SingleSignon. this way that don't get prompted again.
what r 
the holes in this idea? thanx, david.

--
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: out of Context

2002-12-05 Thread Hari Venkatesan
David,

Thanks for the input. We have all the users in LDAP (Active Directory).
But for this specific application, we have roles defined and I need to
retrieve the roles for the user and store them in session bean. For this
I need the userid from windows. Since the user has already been
authenticated against LDAP to signon to windows, I don't want to
authenticate him again by making him enter his id again.

Hari

-Original Message-
From: David Brown [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 05, 2002 2:27 PM
To: Tomcat Users List
Subject: Re: out of Context

Hari Venkatesan writes: 

> Yes, I am using realm. But actually I don't want the user to type in
the
> userid. I want to use the same id that he types in when he logs on to
> windows. I am creating an Intranet application and want to use the
same
> id that the user logs in signing on to the network. 
> 
> Hari 
> 
> -Original Message-
> From: David Brown [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, December 05, 2002 1:54 PM
> To: [EMAIL PROTECTED]
> Subject: Re: out of Context 
> 
> Hari Venkatesan writes:  
> 
>>   
>> 
>> Is there a way to retrieve windows userid from the client side using
>> java or javascript?  
>> 
>> Hari  
>> 
>> --
>> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]> 
>> 
>   
> 
> Hello Hari, i u r using realm and form based login this works 4 me:
> String user = request.getUserPrincipal().getName();
> hope this helps, david.  
> 
> --
> 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]> 
> 
 

Hello Hari, it is probably not practical to try and fetch the windoz
userid. 
u best bet may be to put everything into a LDAP database centralized to 
everything else: windoz, tc etc. hope this helps, david. 


--
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: out of Context

2002-12-05 Thread Hari Venkatesan
Yes, I am using realm. But actually I don't want the user to type in the
userid. I want to use the same id that he types in when he logs on to
windows. I am creating an Intranet application and want to use the same
id that the user logs in signing on to the network.

Hari

-Original Message-
From: David Brown [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 05, 2002 1:54 PM
To: [EMAIL PROTECTED]
Subject: Re: out of Context

Hari Venkatesan writes: 

>  
> 
> Is there a way to retrieve windows userid from the client side using
> java or javascript? 
> 
> Hari 
> 
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]> 
> 
 

Hello Hari, i u r using realm and form based login this works 4 me:
String user = request.getUserPrincipal().getName();
hope this helps, david. 

--
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]>




Deploying Applets in JSP

2002-12-05 Thread Hari Venkatesan
Is it possible to deploy applets in JSP in Tomcat4.1.12?

Can somebody guide me on how we can do it.

Hari



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




out of Context

2002-12-04 Thread Hari Venkatesan


Is there a way to retrieve windows userid from the client side using
java or javascript?

Hari

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




RE: JDBCRealm/Form login get current user ?(hope Craig is listening).

2002-12-02 Thread Hari Venkatesan
You can create a bean that would store the user in the session after he
is authenticated. 

I hope you have login.jsp which would get the user id and password for
authentication. Once the user is authenticated there would be a
re-direction page (welcome-page in web.xml file).

If you are using struts then this welcome-page can be an action class
that would do a request.getUserPrincipal().getName() from the http
request and store it in a session bean. 

If you are not using Struts then you can call a servlet that would do
the same request.getUserPrincipal().getName() and store it in a session
bean 

Hari


-Original Message-
From: David Brown [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 02, 2002 3:08 PM
To: [EMAIL PROTECTED]
Subject: JDBCRealm/Form login get current user ?(hope Craig is
listening).


Hello tc-users and Craig McClanahan, i have been very successfull and
lucky 
developing protected webapps using form-based login and JDBCRealm for
the 
oracle database. WooHoo! i have searched the source JDBCRealm and
RealmBase 
and cannot come up any ideas on how to determine who is currently logged
in 
and using the "protected" webapp locations. the users, roles, and
user_roles 
tables are working perfectly. Anyone w/ ideas on how to do a so-called: 
getUser or getCurrentLogin programmatically? maybe there is some
server.xml 
config i could do. any and all ideas, suggestion, rants and raves
welcomed. 
thanx, david.

--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: ldap authenitcation

2002-11-26 Thread Hari Venkatesan
Did you check Catalina_log in /logs directory

Hari

-Original Message-
From: Charlene Mitchell [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, November 26, 2002 3:46 AM
To: Tomcat Users List
Subject: Re: ldap authenitcation

Hi,

Is it just not possible to authenticate against LDAP?

If not can someone help explain how to set the
debugging mode of TomCat to verbose because I'm seeing
nothing relevant in the logs.

sigh

please help!

Charlene

 --- Charlene Mitchell <[EMAIL PROTECTED]>
wrote: > Hi,
> 
> No success so far :-(
> 
> Surely I can't be the only person trying to do
> something so fundamental?
> 
> How can I guarantee that I see even a failure in the
> log files? Seeing nothing at all seems very weird.
> 
> Thanks
> 
> Charlene
> 
>  --- Charlene Mitchell <[EMAIL PROTECTED]>
> wrote: > Hi,
> > 
> > How do I authenticate against an LDAP directory
> > using
> > TomCat 4.1.2?
> > 
> > In my web.xml I have a resource that requires form
> > authentication as follows:
> >
> > FORM
> >
> > java:/jaas/LDAPLogin
> > 
> > 
> >
> > /login
> >
> > /login-fail
> >   
> > 
> > 
> > I have read the JNDI Realm how-to and added the
> > following few lines to my server.xml file.
> >> className="org.apache.catalina.realm.JNDIRealm"
> > debug="99"
> > connectionURL="ldap://ldapmachine:389";
> > userPattern="uid={0},ou=Users,o=myOrg.com"
> > roleBase="ou=Groups,0=myOrg.com"
> > roleName="cn"
> > roleSearch="(uniqueMember={0})"/>
> > 
> > When I access a restricted URL the login page
> > appears
> > and I type in my credentials, but when I submit
> (to:
> > j_security_check) 
> > I automatically get redirected to my login-fail
> page
> > in a matter of nano-seconds (this in itself
> suggests
> > that it is not working!).
> > 
> > When I look in the TomCat log files I cannot see
> any
> > references to any attempts to contact my LDAP
> > directory.
> > And when I look in the LDAP access log I cannot
> see
> > any attempt to be contacted either.
> > 
> > What step have I missed out or got wrong?
> > 
> > Many thanks in advance
> > 
> > Charlene
> > 
> > __
> > Do You Yahoo!?
> > Everything you'll ever need on one web page
> > from News and Sport to Email and Music Charts
> > http://uk.my.yahoo.com
> > 
> > --
> > To unsubscribe, e-mail:  
> >
> 
> > For additional commands, e-mail:
> > 
> >  
> 
> __
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
>  

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




Multiple instanceq

2002-11-25 Thread Hari Venkatesan


Have anybody tried creating multiple tomcat instances. Is there any
documentation that explains this step by step?

Hari

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




Off Topic _ J_security_check

2002-11-13 Thread Hari Venkatesan


Have anybody tried calling j_security_check from a servlet rather than
calling from a form. 

Hari


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




RE: tomcat configuration for a newbie

2002-11-06 Thread Hari Venkatesan
Try this


helloworld
/helloworld
  

http://localhost:8080/phpserver/helloworld

Hari Venkatesan
Performance Food Group
Phone : 804 484 6263


-Original Message-
From: Arthur Danekyants [mailto:ADanekyants@;ctdi.com] 
Sent: Wednesday, November 06, 2002 4:31 PM
To: 'Tomcat Users List'
Subject: RE: tomcat configuration for a newbie

try localhost:8080, which is a default for Tomcat

-Original Message-
From: ben f [mailto:ben_m_f@;yahoo.co.uk]
Sent: Wednesday, November 06, 2002 10:06 AM
To: [EMAIL PROTECTED]
Subject: tomcat configuration for a newbie



Hi

I am trying to get tomcat to work but unfortunately I am not getting
far.

Tomcat version is 4.1.12

I have created a directory under webapps called phpserver. This
directory is intended to serve php pages using php as a servlet from an
NT 4.0 machine. I will go onto that once I have the basic config up and
running.

I've written a web.xml file and put it under phpserver\WEB-INF:



  
php
net.php.servlet
  

  
helloworld
HelloWorldExample
  

  
php
*.php
  

  
helloworld
/phpserver
  



I've added the following context to the default server.xml under conf\:


  

I copied the example HelloWorldExample.class across to the directorty
\webapps\phpserver\WEB-INF\classes and restarted tomcat.

I then entered the URL
http://localhost/phpserver/servlet/HelloWorldExample into my browser but
I get a 404 resource not found.

%TOMCAT_HOME%, %JAVA_HOME% and %CATALINA_HOME% are to my knowledge all
correct.

I've tried permutations on a theme for the entries in server.xml and
web.xml (under phpserver\WEB-INF) but I've hit a brick wall here. I have
read many docs (official and not official) and have learnt a lot but
somewhere I'm missing something obvisous.

Can anyone please help me out with this issue??

Thanks

Ben




-
Get a bigger mailbox -- choose a size that fits your needs.


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


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




RE: JNDI results in Cannot Load JDBC Driver Class

2002-11-04 Thread Hari Venkatesan
Sorry for the late reply

Firstly you have define your datasource for the application in the
context path. I believe this has to be defined for each and every
application. The following is one sample







factory

org.apache.commons.dbcp.BasicDataSourceFactory



username





password





driverClassName

com.ibm.as400.access.AS400JDBCDriver


url

jdbc:as400://RICWC01



maxActive

10



maxIdle
5



maxWait

1




Secondly in your web.xml file'


jdbc/AS400DS
javax.sql.DataSource
Container


In your java program reference the datasource using JNDI Context Factory

private static String dsName="java:comp/env/jdbc/AS400DS";

try
{
ctx = new InitialContext();
ds = (DataSource) ctx.lookup(dsName);

}

This is all I did. I works fine.

Hari Venkatesan
Performance Food Group
Phone : 804 484 6263


-Original Message-
From: Brian Kautz [mailto:BKautz@;arnoldlogistics.com] 
Sent: Monday, November 04, 2002 12:34 PM
To: Tomcat Users List
Subject: RE: JNDI results in Cannot Load JDBC Driver Class


Sorry, yes, 4.1.12.

Brian




|-+--->
| |   "Hari   |
| |   Venkatesan" |
| | |
| |   |
| |   11/04/2002 11:10|
| |   AM  |
| |   Please respond  |
| |   to "Tomcat Users|
| |   List"   |
| |   |
|-+--->
 
>---
|
  |
|
  |To:  "Tomcat Users List" <[EMAIL PROTECTED]>
|
  |cc:
|
  |Subject: RE: JNDI results in Cannot Load JDBC Driver Class
|
 
>---
----|




Which version of tomcat R u using?? 4.1.12 ? ?

Hari Venkatesan
Performance Food Group
Phone : 804 484 6263


-Original Message-
From: Brian Kautz [mailto:BKautz@;arnoldlogistics.com]
Sent: Monday, November 04, 2002 10:48 AM
To: [EMAIL PROTECTED]
Subject: JNDI results in Cannot Load JDBC Driver Class

I have used connection pools with the mySQL database without difficulty.

Now I wish to use connection pools with the
com.ibm.as400.access.AS400JDBCDriver() driver.  I can use this driver
for
direct connections without any problem, but when I try to use it in a
connection pool I get the error Cannot load JDBC driver class
'com.ibm.as400.access.AS400JDBCDriver()'.

I have the jt400.jar file in the tomcat CATALINA_HOME/common/lib
directory,
just like I do with my mySQL jar.  Again, I know it is accessible by
Tomcat, since a direct call from a servlet (non-connection pool) works
just
fine with no errors.

Any suggestions on what may cause this exception and the remedies I
should
look into?

Here's some other details.

My test servlet looks like this (important info only).  The first
(non
pool) example works fine.  The second fails:

  try {
out.println("OK Here we go trying a regular
connection");
// Load the AS/400 Toolbox for Java JDBC driver.
DriverManager.registerDriver(new
com.ibm.as400.access.AS400JDBCDriver());

// Get a connection to the database.
// Note the use of PROPERTIES to specify the date format
used.
// Using the iso format keeps errors from generating on
*loval
dates
connection = DriverManager.getCo

RE: JNDI results in Cannot Load JDBC Driver Class

2002-11-04 Thread Hari Venkatesan
Which version of tomcat R u using?? 4.1.12 ? ?

Hari Venkatesan
Performance Food Group
Phone : 804 484 6263


-Original Message-
From: Brian Kautz [mailto:BKautz@;arnoldlogistics.com] 
Sent: Monday, November 04, 2002 10:48 AM
To: [EMAIL PROTECTED]
Subject: JNDI results in Cannot Load JDBC Driver Class

I have used connection pools with the mySQL database without difficulty.

Now I wish to use connection pools with the
com.ibm.as400.access.AS400JDBCDriver() driver.  I can use this driver
for
direct connections without any problem, but when I try to use it in a
connection pool I get the error Cannot load JDBC driver class
'com.ibm.as400.access.AS400JDBCDriver()'.

I have the jt400.jar file in the tomcat CATALINA_HOME/common/lib
directory,
just like I do with my mySQL jar.  Again, I know it is accessible by
Tomcat, since a direct call from a servlet (non-connection pool) works
just
fine with no errors.

Any suggestions on what may cause this exception and the remedies I
should
look into?

Here's some other details.

My test servlet looks like this (important info only).  The first
(non
pool) example works fine.  The second fails:

  try {
out.println("OK Here we go trying a regular
connection");
// Load the AS/400 Toolbox for Java JDBC driver.
DriverManager.registerDriver(new
com.ibm.as400.access.AS400JDBCDriver());

// Get a connection to the database.
// Note the use of PROPERTIES to specify the date format
used.
// Using the iso format keeps errors from generating on
*loval
dates
connection = DriverManager.getConnection
("jdbc:as400://mysys;date format=iso;libraries=har harwhs;translate
binary=true","user","pass");

//... use this connection to access the database ...
Statement stmt = connection.createStatement();
queryRS = stmt.executeQuery(qry+user+"\'");

queryRS.next();
out.println("The count is..."
+(queryRS.getBigDecimal(1).intValue()));
connection.close();

  } catch (Exception e) {
// Should do output to STDERR here
System.out.println("ERROR when connecting to database: "
+
e.getMessage());
connection = null;
  }


  try{
out.println("OK Here we go trying pool");
// Obtain our environment naming context
Context initCtx = new InitialContext();
DataSource ds = (DataSource) initCtx.lookup
("java:comp/env/jdbc/hardata");

// Allocate and use a connection from the pool
Connection conn = ds.getConnection();

//... use this connection to access the database ...
Statement stmt = conn.createStatement();
queryRS = stmt.executeQuery(qry+user+"\'");

queryRS.next();
out.println("The count is..."
+(queryRS.getBigDecimal(1).intValue()));
conn.close();
  } catch (Exception e) {
out.println("ERROR!"+e.getMessage());
  }
  out.println("Done with pooling");
  out.flush();
  out.close();


My Resource entry under the Context entry in server.xml is:

  
  

  validationQuery
  


  maxWait
  5000


  maxActive
  15


  password
  xxx


  url
  jdbc:as400://mysys;date
format=iso;libraries=har harwhs;translate binary=true


  driverClassName

com.ibm.as400.access.AS400JDBCDriver()


  maxIdle
  5


  username
  xxx

  

And my WEB.XML:

  

  Connection to Har Data

jdbc/h

RE: Not able to see server-side messages

2002-11-01 Thread Hari Venkatesan
The window that you see is the Console. The log files would be in
C:\Tomcat4.1.12\logs.  

Hari Venkatesan
Performance Food Group
Phone : 804 484 6263


-Original Message-
From: pkrishnaswami [mailto:pkrishna@;learnframe.com] 
Sent: Friday, November 01, 2002 4:31 PM
To: 'Tomcat Users List'
Subject: RE: Not able to see server-side messages

Yes, I got it to maximize but this looks like a Java Swing application.
Does the TOMCAT server write its log messages to any log file? Is there
a Java Console where we can see the server-side println?

Prabhakar

-Original Message-----
From: Hari Venkatesan [mailto:hvenkatesan@;pfgc.com]
Sent: Friday, November 01, 2002 2:18 PM
To: Tomcat Users List
Subject: RE: Not able to see server-side messages


Right click right on the top bar where you see C:\Tomcat\ etc., (ie
where you see the maximize, minimize, close (x) buttons). 

Hari Venkatesan
Performance Food Group
Phone : 804 484 6263


-Original Message-
From: pkrishnaswami [mailto:pkrishna@;learnframe.com] 
Sent: Friday, November 01, 2002 4:15 PM
To: 'Tomcat Users List'
Subject: RE: Not able to see server-side messages

 I agree System.out.println will work if its a normal Dos window. Here
it seems to be a Java Gui application which seems to startup and becomes
a minimized icon in the task bar. Right-clicking the icon does not show
a properties option.

Prabhakar

-Original Message-
From: Hari Venkatesan [mailto:hvenkatesan@;pfgc.com]
Sent: Friday, November 01, 2002 1:48 PM
To: Tomcat Users List
Subject: RE: Not able to see server-side messages


Try System.out.println. To maximize the window, right click the window
and you can define the properties

Hari Venkatesan
Performance Food Group
Phone : 804 484 6263


-Original Message-
From: pkrishnaswami [mailto:pkrishna@;learnframe.com] 
Sent: Friday, November 01, 2002 3:46 PM
To: 'Tomcat Users List'
Subject: Not able to see server-side messages


Is there a way to see print messages from Servlets\JSP in a TOMCAT env.
Currently, when I startup TOMCAT in Windows 2000, the application runs
in a
small window which can't be maximized.

Prabhakar


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


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


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


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




RE: Not able to see server-side messages

2002-11-01 Thread Hari Venkatesan
Right click right on the top bar where you see C:\Tomcat\ etc., (ie
where you see the maximize, minimize, close (x) buttons). 

Hari Venkatesan
Performance Food Group
Phone : 804 484 6263


-Original Message-
From: pkrishnaswami [mailto:pkrishna@;learnframe.com] 
Sent: Friday, November 01, 2002 4:15 PM
To: 'Tomcat Users List'
Subject: RE: Not able to see server-side messages

 I agree System.out.println will work if its a normal Dos window. Here
it seems to be a Java Gui application which seems to startup and becomes
a minimized icon in the task bar. Right-clicking the icon does not show
a properties option.

Prabhakar

-Original Message-----
From: Hari Venkatesan [mailto:hvenkatesan@;pfgc.com]
Sent: Friday, November 01, 2002 1:48 PM
To: Tomcat Users List
Subject: RE: Not able to see server-side messages


Try System.out.println. To maximize the window, right click the window
and you can define the properties

Hari Venkatesan
Performance Food Group
Phone : 804 484 6263


-Original Message-
From: pkrishnaswami [mailto:pkrishna@;learnframe.com] 
Sent: Friday, November 01, 2002 3:46 PM
To: 'Tomcat Users List'
Subject: Not able to see server-side messages


Is there a way to see print messages from Servlets\JSP in a TOMCAT env.
Currently, when I startup TOMCAT in Windows 2000, the application runs
in a
small window which can't be maximized.

Prabhakar


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


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


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




RE: Strange JDBC Error

2002-11-01 Thread Hari Venkatesan
Did you define the datasource in web.xml? ?

Hari Venkatesan
Performance Food Group
Phone : 804 484 6263


-Original Message-
From: John Mattos [mailto:mattosj@;yahoo.com] 
Sent: Friday, November 01, 2002 3:52 PM
To: Tomcat Users List
Subject: Strange JDBC Error


I'm using a JDBC Datasource with Tomcat 4.1.12 as follows.

Server.xml snippet:

  
  

  validationQuery
  select top 100 * from Subscriber


  url
 
jdbc:microsoft:sqlserver://vc34:1433;databaseName=TibcoClearHouse



  password
  tibco_user


  maxActive
  10


  maxWait
  5000


  driverClassName
 
com.microsoft.jdbcx.sqlserver.SQLServerDataSource


  username
  tibco_user


  maxIdle
  2

  

END OF Server.xml Snippet

When I cause a database access within my application, I get the
following horrifying result. It's the "Error Establishing Socket" error
that's worrying me, as I'm using the native Microsoft SQL Server
Drivers. The ones in my lib directory are msutil.jar, msutil.jar, and
mssqlserver.jar

Any thoughts?

John

java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error
establishing socket.
at
com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
at com.microsoft.jdbc.sqlserver.tds.TDSConnection.(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
Source)
at
com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
Source)
at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at
com.thoughtworks.util.pool.JDCConnectionPool.getConnection(JDCConnection
Pool.java:174)
at
com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnectionFo
rTibco(ConnectionFactory.java:59)
at
com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnection(C
onnectionFactory.java:40)
at
com.thoughtworks.clearinghouse.util.DatabaseUtility.getUserByName(Databa
seUtility.java:123)
at
com.thoughtworks.clearinghouse.web.service.UserProfileService.validateUs
erNamePassword(UserProfileService.jav
a:16)
at
com.thoughtworks.clearinghouse.web.servlet.LogonAction.actionExecuted(Lo
gonAction.java:48)
at
com.thoughtworks.clearinghouse.web.servlet.AbstractAction.execute(Abstra
ctAction.java:38)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:437)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
264)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:239
6)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPi

RE: Not able to see server-side messages

2002-11-01 Thread Hari Venkatesan
Try System.out.println. To maximize the window, right click the window
and you can define the properties

Hari Venkatesan
Performance Food Group
Phone : 804 484 6263


-Original Message-
From: pkrishnaswami [mailto:pkrishna@;learnframe.com] 
Sent: Friday, November 01, 2002 3:46 PM
To: 'Tomcat Users List'
Subject: Not able to see server-side messages


Is there a way to see print messages from Servlets\JSP in a TOMCAT env.
Currently, when I startup TOMCAT in Windows 2000, the application runs
in a
small window which can't be maximized.

Prabhakar


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


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




Tomcat 4.1.12 on Dual Processor NT Box

2002-11-01 Thread Hari Venkatesan
We are planning to setup Tomcat 4.1.12 in a dual processor NT box. Are
there any special configurations issues that I need to address and any
tips that would avoid surprises. 
 
 
By the way I am new to Tomcat and setting up of App servers.
 
You inputs and advice would be appreciated
 
 
Hari Venkatesan
Performance Food Group
Phone : 804 484 6263