FW: tomcat 8080 thread not reduced

2017-01-13 Thread smith
 

 

From: smith [mailto:smith@zoom.us] 
Sent: Tuesday, January 10, 2017 9:57 AM
To: 'users'
Subject: tomcat 8080 thread not reduced

 

Hi,

 

We have installed Apache Tomcat/8.0.14, and found that after one period of 
time, the thread count for 8080(our port published) goes to 120 and never 
reduced even the busy count is only 3-4. 

Why? Tomcat8 not reduced the thread pool even the thread is idle, and the 
minSpareThreads for tomcat8 default is only 10.

When will the thread reduce?

 

 

Best regards

Smith

 



RE: FW: tomcat 8080 thread not reduced

2017-01-13 Thread smith
The server.xml:





  
  
  
  
  
  
  
  

  
  


  

  
  





















  
  

  
  


  

  









  

  


-Original Message-
From: André Warnier (tomcat) [mailto:a...@ice-sa.com] 
Sent: Friday, January 13, 2017 10:42 AM
To: users@tomcat.apache.org
Subject: Re: FW: tomcat 8080 thread not reduced

On 13.01.2017 09:38, smith wrote:
>
>
>
>
> From: smith [mailto:smith@zoom.us]
> Sent: Tuesday, January 10, 2017 9:57 AM
> To: 'users'
> Subject: tomcat 8080 thread not reduced
>
>
>
> Hi,
>
>
>
> We have installed Apache Tomcat/8.0.14, and found that after one period of 
> time, the thread count for 8080(our port published) goes to 120 and never 
> reduced even the busy count is only 3-4.
>
> Why? Tomcat8 not reduced the thread pool even the thread is idle, and the 
> minSpareThreads for tomcat8 default is only 10.
>
> When will the thread reduce?
>
>
>
>
>
> Best regards
>
> Smith
>
>

Hi.

Please copy/paste your complete server.xml configuration file (confidential 
things removed), so that we could have a useful look at it.
Please edit *only* the confidential things, not entire sections. Often, the 
issue is in the details.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: FW: tomcat 8080 thread not reduced

2017-01-16 Thread smith
Busy one is process customer request, do not know what non-busy one is doing, 
always keep 120 for many days. I don't think 20s timeout will not cause so long 
connection

-smith

-Original Message-
From: André Warnier (tomcat) [mailto:a...@ice-sa.com] 
Sent: Monday, January 16, 2017 8:33 AM
To: users@tomcat.apache.org
Subject: Re: FW: tomcat 8080 thread not reduced

On 16.01.2017 03:41, Smith Hua wrote:
>
> actually there is not much busy threads, less tahn 10,so i think this 
> parameter may has nothing to do with this

It depends on what you call "busy". What are the busy ones doing ? and what are 
the non-busy ones doing ?


> --
> 从myMail的Android专用app所发送 星期一, 16 一月 2017, 03:01上午 +08:00 发件人 André Warnier 
> (tomcat)  a...@ice-sa.com :
>
>> Hi.
>>
>> I can find nothing really wrong in your configuration below.
>> But, what happens if in this section :
>>
>>   >  >   > maxThreads="300" connectionTimeout="2"
>>   > redirectPort="8443" />
>>
>> you change the connectionTimeout to 3000 (= 3 seconds, instead of the above 
>> 20 seconds) ?
>>
>> Do you still see the number of threads remaining at the maximum ?
>>
>> See :  
>> http://tomcat.apache.org/tomcat-8.0-doc/config/http.html#Standard_Implementation
>> --> connectionTimeout
>> and the fact that it is also the default for
>> keepAliveTimeout
>>
>>
>> On 14.01.2017 07:30, smith wrote:
>>> The server.xml:
>>>
>>> 
>>> 
>>> 
>>> 
>>> >> />
>>> 
>>> 
>>> >> SSLEngine="on" />
>>> 
>>> >> className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
>>> >> className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
>>> >> className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
>>>
>>> 
>>> 
>>>   
>>>   >> type="org.apache.catalina.UserDatabase"
>>> description="User database that can be updated and saved"
>>> 
>>> factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
>>> pathname="conf/tomcat-users.xml" />
>>> 
>>>
>>> 
>>> 
>>>
>>>   
>>>   
>>>
>>>
>>>   
>>>   >>  maxThreads="300" connectionTimeout="2"
>>>  redirectPort="8443" />
>>>   
>>>   
>>>   
>>>   
>>>
>>>   
>>>   
>>>
>>>
>>>   
>>>
>>>   
>>>   
>>>
>>> 
>>> 
>>>
>>> 
>>> 
>>>   
>>>   >>  resourceName="UserDatabase"/>
>>> 
>>>
>>> >>   unpackWARs="true" autoDeploy="true">
>>>
>>>   
>>>   
>>>
>>>   
>>>
>>> >> directory="logs"
>>>  prefix="localhost_access_log" suffix=".txt"
>>>      pattern="%h,%t,%m,%U,%H,%s,%B,%D,%{User-Agent}i" />
>>>
>>>   >> docBase="//t" sessionCookieName="" />
>>> 
>>>   
>>> 
>>> 
>>>
>>> -Original Message-
>>> From: André Warnier (tomcat) [mailto:a...@ice-sa.com]
>>> Sent: Friday, January 13, 2017 10:42 AM
>>> To:  users@tomcat.apache.org
>>> Subject: Re: FW: tomcat 8080 thread not reduced
>>>
>>> On 13.01.2017 09:38, smith wrote:
>>>>
>>>>
>>>>
>>>>
>>>> From: smith [mailto:smith@zoom.us]
>>>> Sent: Tuesday, January 10, 2017 9:57 AM
>>>> To: 'users'
>>>> Subject: tomcat 8080 thread not reduced
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>>
>>>>
>>>> We have installed Apache Tomcat/8.0.14, and found that after one period of 
>>>> t

RE: FW: tomcat 8080 thread not reduced

2017-01-16 Thread smith
We has same problem on dev env that no any traffic to the serive, will try on 
dev first

-Original Message-
From: André Warnier (tomcat) [mailto:a...@ice-sa.com] 
Sent: Monday, January 16, 2017 10:08 AM
To: users@tomcat.apache.org
Subject: Re: FW: tomcat 8080 thread not reduced

On 16.01.2017 09:50, smith wrote:
> Busy one is process customer request, do not know what non-busy one is 
> doing, always keep 120 for many days. I don't think 20s timeout will 
> not cause so long connection
>
> -smith

And did you actually try it ?

We do not know your website or your application, so we cannot tell how many 
clients there are, what these clients are really requesting, how many requests 
each client is sending before going away, etc.

KeepAlive means that when a client has sent its /last/ request and received the 
response, one thread is going to remain "not free" (but doing nothing) for the 
duration of the KeepAlive timeout. This thread will keep waiting, for 
KeepAliveTimeout seconds, just in case the client would still send another 
request (which it may never do, depending on the application).

Imagine that your application is so that the average client
- connects to your site
- sends a single HTTP request, which gets processed in 0.1 s
- receives the response
- and then goes away
and that the above sequence happens once every second, from different clients.
After one second, there will be one thread waiting for another 19 seconds 
before becoming free (and potentially destroyed or re-used). After 2 seconds, 
there will be 2 such threads. After 3 seconds, 3 threads. And so on. After 20 
seconds, the first thread will be freed, but there will be 19 other threads 
still waiting, and one new thread just created.
If everything stays perfectly regular like that, your will have /permanently/ 
20 threads in existence, even if the minimum is 10.
If you change the above so that there is a new client every 0.5 s, you will 
have permanently 40 threads (of which only 2 maximum are really doing 
something).

The point is : KeepAlive is not "bad", and in some cases having a relatively 
long KeepAliveTimeout is the right thing to do.  Also, having a high number of 
threads sitting idle is not necessarily a problem.
Your own scenario is probably not like the above perfectly regular and 
irrealistic one above. But there may be a perfectly logical reason why you have 
so many threads on average, and I am just trying to give you ideas for finding 
out the reason.


>
> -Original Message-
> From: André Warnier (tomcat) [mailto:a...@ice-sa.com]
> Sent: Monday, January 16, 2017 8:33 AM
> To: users@tomcat.apache.org
> Subject: Re: FW: tomcat 8080 thread not reduced
>
> On 16.01.2017 03:41, Smith Hua wrote:
>>
>> actually there is not much busy threads, less tahn 10,so i think this 
>> parameter may has nothing to do with this
>
> It depends on what you call "busy". What are the busy ones doing ? and what 
> are the non-busy ones doing ?
>
>
>> --
>> 从myMail的Android专用app所发送 星期一, 16 一月 2017, 03:01上午 +08:00 发件人 André Warnier 
>> (tomcat)  a...@ice-sa.com :
>>
>>> Hi.
>>>
>>> I can find nothing really wrong in your configuration below.
>>> But, what happens if in this section :
>>>
>>>>  >>> maxThreads="300" connectionTimeout="2"
>>>> redirectPort="8443" />
>>>
>>> you change the connectionTimeout to 3000 (= 3 seconds, instead of the above 
>>> 20 seconds) ?
>>>
>>> Do you still see the number of threads remaining at the maximum ?
>>>
>>> See :  
>>> http://tomcat.apache.org/tomcat-8.0-doc/config/http.html#Standard_Im
>>> plementation
>>> --> connectionTimeout
>>> and the fact that it is also the default for keepAliveTimeout
>>>
>>>
>>> On 14.01.2017 07:30, smith wrote:
>>>> The server.xml:
>>>>
>>>> 
>>>> 
>>>> 
>>>> 
>>>>  >>> className="org.apache.catalina.startup.VersionLoggerListener" />
>>>>  
>>>>  
>>>>  >>> SSLEngine="on" />
>>>>  
>>>>  >>> className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
>>>>  >>> className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
>>>>  &g

RE: FW: tomcat 8080 thread not reduced

2017-01-16 Thread smith
Yes, I think thread count should be reduced when those threads are idle

Is this right? Or it will not reduced?

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Monday, January 16, 2017 2:20 PM
To: Tomcat Users List
Subject: Re: FW: tomcat 8080 thread not reduced

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Smith,

There are your only active s:

On 1/14/17 1:30 AM, smith wrote:
>  connectionTimeout="2" redirectPort="8443" />
> 
> [snip]
> 
> 

You have not changed any settings from the default. What makes you think that 
your thread count should be reduced when those threads are idle?

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYfNaBAAoJEBzwKT+lPKRY3ZsP+wdrzjUHAVPoF8KXIAj+vz0O
lZ0zXBC2XID9Bh6dQRKvW+9k/RQRCuOrnZ+Z4qVdeo9jdtQMPGkQcpr5mw3m7rCZ
XefMU8KBsSl/31lBhl8ajxAUqpTx37dSUV6mUFVtVVEZdp2/+3Jy1slmEuO7+COJ
wUYtD7y4yk9oitxj0S3Omeglo+g00yJmTVgEJClCF19wYIn0uSfwZFgOpkftj2HO
ct1ndMa5WIUQYtQ6ueiOgIoZb4aEhhS69JilN0GZ1WZpdTUCj04bosnOJ94w8fPi
1+z/5GCAPVhLBYN+LTr/03EoC9u+gm7163+eIbGK8g/1GiNqY+m6plI7LMGaNy0j
3pfgitcK2Mte4w2T0yJpe87lwNOCrkVL4oXCmOGx8b/P5f9M2MukKTIfmRsT7Q/G
u4skc+LYCxVwIqsND/4DuBatAx8FSzi3UebHIJoBVOe22b6zPYKGaXUBo530dAvK
iVnBgzxIOvQuQr1pD6ylRjCmrmooIH6P8iknHX2DrKyaqEcdnR0g/iJnfuGeW+JO
VrbTWEcb29IrKsn4WGuglALijl+I1UCEvru5aTlvkXyWhePK1wlHYaupy69sy3a/
5z4LJdOebtN3QFr2I6hM54L0+bjjwCznlVa8b/6ky84ya/7tzWGoHqpqYod46HZZ
7E1OkTnDk67xhmh7iXbB
=e2NW
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: FW: tomcat 8080 thread not reduced

2017-01-16 Thread smith
Yes, I also think it should act like this, but it did not.

-Original Message-
From: André Warnier (tomcat) [mailto:a...@ice-sa.com] 
Sent: Monday, January 16, 2017 2:33 PM
To: users@tomcat.apache.org
Subject: Re: FW: tomcat 8080 thread not reduced

On 16.01.2017 15:19, Christopher Schultz wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Smith,
>
> There are your only active s:
>
> On 1/14/17 1:30 AM, smith wrote:
>> > connectionTimeout="2" redirectPort="8443" />
>>
>> [snip]
>>
>> 
>
> You have not changed any settings from the default. What makes you 
> think that your thread count should be reduced when those threads are 
> idle?

Hi.  (André responding for "smith")

Maybe this :
http://tomcat.apache.org/tomcat-8.0-doc/config/http.html#Standard_Implementation
--> minSpareThreads
?
(That's also the way I understand this : inactive threads disappear after a 
while, down to the number mentioned here - which is 10 by default. Not so ?)

>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJYfNaBAAoJEBzwKT+lPKRY3ZsP+wdrzjUHAVPoF8KXIAj+vz0O
> lZ0zXBC2XID9Bh6dQRKvW+9k/RQRCuOrnZ+Z4qVdeo9jdtQMPGkQcpr5mw3m7rCZ
> XefMU8KBsSl/31lBhl8ajxAUqpTx37dSUV6mUFVtVVEZdp2/+3Jy1slmEuO7+COJ
> wUYtD7y4yk9oitxj0S3Omeglo+g00yJmTVgEJClCF19wYIn0uSfwZFgOpkftj2HO
> ct1ndMa5WIUQYtQ6ueiOgIoZb4aEhhS69JilN0GZ1WZpdTUCj04bosnOJ94w8fPi
> 1+z/5GCAPVhLBYN+LTr/03EoC9u+gm7163+eIbGK8g/1GiNqY+m6plI7LMGaNy0j
> 3pfgitcK2Mte4w2T0yJpe87lwNOCrkVL4oXCmOGx8b/P5f9M2MukKTIfmRsT7Q/G
> u4skc+LYCxVwIqsND/4DuBatAx8FSzi3UebHIJoBVOe22b6zPYKGaXUBo530dAvK
> iVnBgzxIOvQuQr1pD6ylRjCmrmooIH6P8iknHX2DrKyaqEcdnR0g/iJnfuGeW+JO
> VrbTWEcb29IrKsn4WGuglALijl+I1UCEvru5aTlvkXyWhePK1wlHYaupy69sy3a/
> 5z4LJdOebtN3QFr2I6hM54L0+bjjwCznlVa8b/6ky84ya/7tzWGoHqpqYod46HZZ
> 7E1OkTnDk67xhmh7iXbB
> =e2NW
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: FW: tomcat 8080 thread not reduced

2017-01-17 Thread smith
Thanks chris

So the tomcat default executor will not reduce the thread count until it reach 
to the max configuration? Will it reduce when it reach to max?
And why the default not reduce the thread?

-Smith

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Tuesday, January 17, 2017 7:18 PM
To: Tomcat Users List
Subject: Re: FW: tomcat 8080 thread not reduced

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Smith,

On 1/16/17 8:22 PM, smith wrote:
> Yes, I think thread count should be reduced when those threads are 
> idle
> 
> Is this right? Or it will not reduced?

Id you want Tomcat to reduce the number of idle threads, you'll need to 
explicitly configure an  and use that with your  .

- -chris

> -Original Message- From: Christopher Schultz 
> [mailto:ch...@christopherschultz.net] Sent: Monday, January 16,
> 2017 2:20 PM To: Tomcat Users List Subject: Re: FW: tomcat 8080 thread 
> not reduced
> 
> Smith,
> 
> There are your only active s:
> 
> On 1/14/17 1:30 AM, smith wrote:
>> > connectionTimeout="2" redirectPort="8443" />
> 
>> [snip]
> 
>> 
> 
> You have not changed any settings from the default. What makes you 
> think that your thread count should be reduced when those threads are 
> idle?
> 
> -chris
> 
> -
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 
> -
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYfm4EAAoJEBzwKT+lPKRY7RkP/1Pd1MNlaCCLGAX/vVXPTsTi
ZO+zBM888owqJNcMgtoZnXHdJQnsX2ulfeFLJGEXtBby1L8zR/E+B2/lXFjlU2Bj
h3PHPKH3w7Lj/pKnWUoErSCiqKhIIg3XsfBZfIaHE+jSBvibO30luzUwbLWXgTkb
0sK/tmdvoautPEyXSo0X9bg0FCrFnmbv3pJhCz4kUPtpLKXb9ffQchitCshqu96d
jZF5RgAqP2U9j5au0GKsHwAbDVXdM/qd04DbJjcS19LIsRYXCrUvMduRYVaiA5KK
PbV9slZ23hLDrqI3nE/jR5MATl2HzeqLs7sVpYMWhWgMYst1cgFvIQVnVjKa1uah
CTlHhBYbzrtYHnZBdKcBN1wpMnpnM6HM9CZCyRvrG4AqUvmKhQx/OHoUbP8DH8uc
8JRgTskpYO2MESsiDAVRBIe1MN/jm/YbZVRikooCA5JgVUNQf9k2CyZy9oDqz25d
dAiMwKdZ8ZS6bhglGx2SJm9pePM+Kt5N9TiUE+TkTOsoLmqgiSm5SAXOuQMLzfI4
a1LMR72GDogxckMmumfjSRwwvkoEGqR6VrQ8dzfp+mhaYysRgHAbzxAe4ZWCl9Bz
7UFn8cHCMjNHOwBFbkcuuCXoaUpfLE4spauFiU8FFnkmrvs/BWiXTplh596fgzsE
MzaClwNfP/RGKNqi4fsc
=W1gG
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Re: FW: tomcat 8080 thread not reduced

2017-01-17 Thread smith
Thanks, Philippe

But we never monitored tomcat busy thread count high (we monitored one minutes 
interval through nagios to get tomcat manager result, not high than 10). This 
is strange

-Original Message-
From: Philippe Busque [mailto:pbus...@mediagrif.com] 
Sent: Monday, January 16, 2017 8:09 PM
To: users@tomcat.apache.org
Subject: Re: Re: FW: tomcat 8080 thread not reduced

We're having a similar issues with our numberous Tomcat instances.

Our connector config look like this.

 


Sometime, the number of active connection would jump very high (up to 190), due 
to some external issues (database lock, etc) and threads would accumulate.

Even though a connectionTimeout is set, and therefor set keepAliveTimeout as 
the same value,  threads are never released once the problem is  resolved until 
Tomcat is restarted.  We would end up with maybe 5-10 busy workers, but 190 
idle workers/ threads

I think the issue is related to how the StandardThreadExecutor is implemented. 
The StandardThreadExecutor is a front for the default Java ThreadPoolExecutor.  
If I'm not mistaken, ThreadPoolExecutor is distributing work in round robin 
fashion among all defined workers, rather than sticking to the core threads.


As a result, should a website has any constant traffic (Apache AJP ping, load 
balancer monitoring, normal traffic, etc), all thread will be hit at least once 
within the configured  keepAliveTimeout, reseting it. So unless the 
keepAliveTimeout is set to a very low value, which defeat the purpose, thread 
will never be released .


This is what I've come to suspect from looking at the StandardThreadExecutor, 
but never really had the opportunity to do deeper test with load.
But from Tomcat 6 to tomcat 8, we were never able to  decrease the number of 
'idle' workers back from the highest value it had reached.


Le 2017-01-16 à 05:24, André Warnier (tomcat) a écrit :
> On 16.01.2017 11:10, smith wrote:
>> We has same problem on dev env that no any traffic to the serive,
>
> Ah. That is /new/ information, which may change the suggestions below.
> It looks like you should really find out what these threads are doing, 
> probably by doing a few thread dumps.
> See here e.g. :
> http://stackoverflow.com/questions/18573411/tomcat-thread-dump
>
> Again : we do not know your application, so we can only make guesses 
> based on the information that you provide.
>
>  will try on dev first
>>
>> -Original Message-
>> From: André Warnier (tomcat) [mailto:a...@ice-sa.com]
>> Sent: Monday, January 16, 2017 10:08 AM
>> To: users@tomcat.apache.org
>> Subject: Re: FW: tomcat 8080 thread not reduced
>>
>> On 16.01.2017 09:50, smith wrote:
>>> Busy one is process customer request, do not know what non-busy one 
>>> is doing, always keep 120 for many days. I don't think 20s timeout 
>>> will not cause so long connection
>>>
>>> -smith
>>
>> And did you actually try it ?
>>
>> We do not know your website or your application, so we cannot tell 
>> how many clients there are, what these clients are really requesting, 
>> how many requests each client is sending before going away, etc.
>>
>> KeepAlive means that when a client has sent its /last/ request and 
>> received the response, one thread is going to remain "not free" (but 
>> doing nothing) for the duration of the KeepAlive timeout. This thread 
>> will keep waiting, for KeepAliveTimeout seconds, just in case the 
>> client would still send another request (which it may never do, 
>> depending on the application).
>>
>> Imagine that your application is so that the average client
>> - connects to your site
>> - sends a single HTTP request, which gets processed in 0.1 s
>> - receives the response
>> - and then goes away
>> and that the above sequence happens once every second, from different 
>> clients.
>> After one second, there will be one thread waiting for another 19 
>> seconds before becoming free (and potentially destroyed or re-used).
>> After 2 seconds, there will be 2 such threads. After 3 seconds, 3 
>> threads. And so on. After 20 seconds, the first thread will be freed, 
>> but there will be 19 other threads still waiting, and one new thread 
>> just created.
>> If everything stays perfectly regular like that, your will have 
>> /permanently/ 20 threads in existence, even if the minimum is 10.
>> If you change the above so that there is a new client every 0.5 s, 
>> you will have permanently 40 threads (of which only 2 maximum are 
>> really doing something).
>>
>> The point is : KeepAlive is not "bad", and in some cases having a 
>> relatively l

RE: FW: tomcat 8080 thread not reduced

2017-01-18 Thread smith
Hi, André
My case is same, my tomcat also has load balancer in front and it has health 
check to tomcat

-Original Message-
From: André Warnier (tomcat) [mailto:a...@ice-sa.com] 
Sent: Wednesday, January 18, 2017 9:41 AM
To: users@tomcat.apache.org
Subject: Re: FW: tomcat 8080 thread not reduced

Hi.

I believe that what Philippe mentions below is somewhat different : in his 
configuration, there is apparently a front-end httpd server, which communicates 
with Tomcat via AJP and the tomcat AJP Connector.
In such a case, the "mod_jk" or "mod_proxy_ajp" connector module inside of 
httpd, creates a series of connections to the back-end tomcat, and keeps these 
connections alive in a pool of connections, according to rules which are 
different, than what applies to your case (which consists of direct HTTP 
connections from browsers, to the tomcat HTTP connector).
So Philippe's case introduces probably an additional level of complexity into 
the equation.
semi-graphically :

smith case :

client <- HTTP -> tomcat HTTP connector - tomcat thread

Philippe's case :

client <- HTTP -> apache httpd + ajp module <- AJP -> tomcat AJP connector - 
tomcat thread

The real question is :

The tomcat 8.0 HTTP Connector documentation
(http://tomcat.apache.org/tomcat-8.0-doc/config/http.html) mentions a series of 
attributes/parameters (maxThreads, minSpareThreads, connectionTimeout,
keepAliveTimeout,..) which, together, would lead one to believe that tomcat is 
managing the number of threads dynamically (increasing the number of threads 
(up to maxThreads) when needed to process simultaneous requests, and decreasing 
the number of threads again (down to minSpareThreads) when less requests are 
being processed).

According to observations however (and to Chris' comments), that does not seem 
to be the case : once the number of threads has grown to a certain number, it 
never goes down back down again.
It has to be said that the above interpretation was mine, and the current 
documentation of the HTTP Connector never says explicitly that, on its own, it 
manages the number of threads dynamically. But it *does* mention a 
minSpareThreads parameter.

On the other hand, when you use an Executor 
(http://tomcat.apache.org/tomcat-8.0-doc/config/executor.html), then the 
documentation states explicitly that the number of threads *is* dynamically 
managed, up and down.

I found something else which seems to explain the riddle :

http://tomcat.apache.org/migration-6.html#Connector_thread_pools
That section explicitly says that since tomcat 6.0, for a Connector without an 
Executor, the number of threads always grows, and never decreases. And it also 
explicitly says that the Connector's "minSpareThreads" attribute will be 
ignored.

So in fact the only thing wrong, is the online documentation for the Connectors 
: the minSpareThreads attribute should be removed (since it is anyway ignored).
That seems to have been an oversight ever since tomcat 6.0.

As far as I am concerned thus, the mystery is solved.

One question which is a bit left open is :

What - if any - is the real advantage/disadvantage of having perhaps maxThreads 
idle threads, as opposed to using an Executor to manage the number of threads 
dynamically ?
But that is probably the kind of question to which the appropriate answer is : 
"it depends.."




On 18.01.2017 07:33, smith wrote:
> Thanks, Philippe
>
> But we never monitored tomcat busy thread count high (we monitored one 
> minutes interval through nagios to get tomcat manager result, not high than 
> 10). This is strange
>
> -Original Message-
> From: Philippe Busque [mailto:pbus...@mediagrif.com]
> Sent: Monday, January 16, 2017 8:09 PM
> To: users@tomcat.apache.org
> Subject: Re: Re: FW: tomcat 8080 thread not reduced
>
> We're having a similar issues with our numberous Tomcat instances.
>
> Our connector config look like this.
>
>enableLookups="false" redirectPort="8443" acceptCount="100"
> connectionTimeout="2"  URIEncoding="UTF-8" />
>
>
> Sometime, the number of active connection would jump very high (up to 190), 
> due to some external issues (database lock, etc) and threads would accumulate.
>
> Even though a connectionTimeout is set, and therefor set keepAliveTimeout as 
> the same value,  threads are never released once the problem is  resolved 
> until Tomcat is restarted.  We would end up with maybe 5-10 busy workers, but 
> 190 idle workers/ threads
>
> I think the issue is related to how the StandardThreadExecutor is 
> implemented. The StandardThreadExecutor is a front for the default Java 
> ThreadPoolExecutor.  If I'm not mistaken, ThreadPoolExecutor is distributing 
> work in round robin fashion among all defined workers,

RE: FW: tomcat 8080 thread not reduced

2017-01-18 Thread smith
Hi, André 

Thanks for the great explanation. So the current thread count will grow always 
until it reaches to the max configuration.

I have another strange thing:
We never monitored tomcat busy thread count high (we monitored one minutes 
interval through Nagios to get tomcat manager result, not high than 10). So if 
the threads grows, it should monitored the busy thread count reach that high(or 
some lower). So I'm still not understand when the current thread count will 
grow while current busy thread has not change a lot.



-Original Message-
From: André Warnier (tomcat) [mailto:a...@ice-sa.com] 
Sent: Wednesday, January 18, 2017 9:41 AM
To: users@tomcat.apache.org
Subject: Re: FW: tomcat 8080 thread not reduced

Hi.

I believe that what Philippe mentions below is somewhat different : in his 
configuration, there is apparently a front-end httpd server, which communicates 
with Tomcat via AJP and the tomcat AJP Connector.
In such a case, the "mod_jk" or "mod_proxy_ajp" connector module inside of 
httpd, creates a series of connections to the back-end tomcat, and keeps these 
connections alive in a pool of connections, according to rules which are 
different, than what applies to your case (which consists of direct HTTP 
connections from browsers, to the tomcat HTTP connector).
So Philippe's case introduces probably an additional level of complexity into 
the equation.
semi-graphically :

smith case :

client <- HTTP -> tomcat HTTP connector - tomcat thread

Philippe's case :

client <- HTTP -> apache httpd + ajp module <- AJP -> tomcat AJP connector - 
tomcat thread

The real question is :

The tomcat 8.0 HTTP Connector documentation
(http://tomcat.apache.org/tomcat-8.0-doc/config/http.html) mentions a series of 
attributes/parameters (maxThreads, minSpareThreads, connectionTimeout,
keepAliveTimeout,..) which, together, would lead one to believe that tomcat is 
managing the number of threads dynamically (increasing the number of threads 
(up to maxThreads) when needed to process simultaneous requests, and decreasing 
the number of threads again (down to minSpareThreads) when less requests are 
being processed).

According to observations however (and to Chris' comments), that does not seem 
to be the case : once the number of threads has grown to a certain number, it 
never goes down back down again.
It has to be said that the above interpretation was mine, and the current 
documentation of the HTTP Connector never says explicitly that, on its own, it 
manages the number of threads dynamically. But it *does* mention a 
minSpareThreads parameter.

On the other hand, when you use an Executor 
(http://tomcat.apache.org/tomcat-8.0-doc/config/executor.html), then the 
documentation states explicitly that the number of threads *is* dynamically 
managed, up and down.

I found something else which seems to explain the riddle :

http://tomcat.apache.org/migration-6.html#Connector_thread_pools
That section explicitly says that since tomcat 6.0, for a Connector without an 
Executor, the number of threads always grows, and never decreases. And it also 
explicitly says that the Connector's "minSpareThreads" attribute will be 
ignored.

So in fact the only thing wrong, is the online documentation for the Connectors 
: the minSpareThreads attribute should be removed (since it is anyway ignored).
That seems to have been an oversight ever since tomcat 6.0.

As far as I am concerned thus, the mystery is solved.

One question which is a bit left open is :

What - if any - is the real advantage/disadvantage of having perhaps maxThreads 
idle threads, as opposed to using an Executor to manage the number of threads 
dynamically ?
But that is probably the kind of question to which the appropriate answer is : 
"it depends.."




On 18.01.2017 07:33, smith wrote:
> Thanks, Philippe
>
> But we never monitored tomcat busy thread count high (we monitored one 
> minutes interval through nagios to get tomcat manager result, not high than 
> 10). This is strange
>
> -Original Message-
> From: Philippe Busque [mailto:pbus...@mediagrif.com]
> Sent: Monday, January 16, 2017 8:09 PM
> To: users@tomcat.apache.org
> Subject: Re: Re: FW: tomcat 8080 thread not reduced
>
> We're having a similar issues with our numberous Tomcat instances.
>
> Our connector config look like this.
>
>enableLookups="false" redirectPort="8443" acceptCount="100"
> connectionTimeout="2"  URIEncoding="UTF-8" />
>
>
> Sometime, the number of active connection would jump very high (up to 190), 
> due to some external issues (database lock, etc) and threads would accumulate.
>
> Even though a connectionTimeout is set, and therefor set keepAliveTimeout as 
> the same value,  threads are never released once the prob

RE: FW: tomcat 8080 thread not reduced

2017-01-18 Thread smith
Hi, Christopher

I don't care if the threads will be reduced, I just want to know why. And we 
want to use the account to determine when the tomcat capacity is not enough 
that we need to add max configuration or add new tomcat servers.

Since not use the , the busy thread account also cannot tell us the 
correct active threads count. In another email thread, you said if use 
, it will tell us the right active thread count not just busy count, 
right?

-smith

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Wednesday, January 18, 2017 3:28 PM
To: Tomcat Users List
Subject: Re: FW: tomcat 8080 thread not reduced

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Smith,

On 1/18/17 12:47 AM, smith wrote:
> So the tomcat default executor will not reduce the thread count until 
> it reach to the max configuration?

By default, you get a thread pool that isn't as smart as an executor.

> Will it reduce when it reach to max?

Not unless you use an .

> And why the default not reduce the thread?

Because it didn't do so in the past, before  was introduced.

I'm curious: if you are willing to have e.g. 200 threads available at any time 
during the life of the JVM, why does it matter if those threads are reduced 
during times of inactivity?

I think of threads as a resource like memory, where if you are going to 
allocate X resources, you may as well allocate X resources and be done with it. 
Growing and shrinking pools of things just adds complexity and reduces 
performance.

Idle threads are "free" other than using a little bit of memory. So why is it 
so important for those threads to stop when they don't have any work for a 
while?

- -chris

> -Original Message- From: Christopher Schultz 
> [mailto:ch...@christopherschultz.net] Sent: Tuesday, January 17,
> 2017 7:18 PM To: Tomcat Users List Subject: Re: FW: tomcat 8080 thread 
> not reduced
> 
> Smith,
> 
> On 1/16/17 8:22 PM, smith wrote:
>> Yes, I think thread count should be reduced when those threads are 
>> idle
> 
>> Is this right? Or it will not reduced?
> 
> Id you want Tomcat to reduce the number of idle threads, you'll need 
> to explicitly configure an  and use that with your 
>  .
> 
> -chris
> 
>> -Original Message- From: Christopher Schultz 
>> [mailto:ch...@christopherschultz.net] Sent: Monday, January 16,
>> 2017 2:20 PM To: Tomcat Users List Subject: Re: FW: tomcat 8080 
>> thread not reduced
> 
>> Smith,
> 
>> There are your only active s:
> 
>> On 1/14/17 1:30 AM, smith wrote:
>>> >> connectionTimeout="2" redirectPort="8443" />
> 
>>> [snip]
> 
>>> >> />
> 
>> You have not changed any settings from the default. What makes you 
>> think that your thread count should be reduced when those threads are 
>> idle?
> 
>> -chris
> 
>> -
>
>> 
> 
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 
>> -
>
>> 
> 
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> -
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 
> -
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYf4mVAAoJEBzwKT+lPKRYE1cQALnUh2se9iXDJB3r/1TiHfiy
RCEnqgjeYKaVyO0wBvG5PqyXGwedsh2i2TzuUW5zHXEi5qZhr91oZ/sEG8yOpdfv
zOb9ZeFpWJpkVuj/pa2kjszEs+gpUhth4+45ou7N9WAAkDsl4oWpHzC2aEWbNByf
u9gkt8yq5ZSccFP7/Xb7GhcjIKYpK+qK/1/U+vD9eC6sFuzpewC7+aZ1FwpQ7/6L
DlbqGRM3Uj0Yvft6YNfrmN5SY8VY4shv0f/b83tmaH8Bz2bgGhhqddAm/vSpDu44
67YU55m36NL9hTbiS4E/CnLCnZxsY7+RtR4Xz2g51KN7+OoKZIgQN7XzHYhQbTZS
NPZG1ejkE6s0R8oIjYHAO8cucSGshD7de42mdq6wrrxDrSodm29zUWS8TEgOkUBp
kuX7MzpmZt0s5YjSjwMLWXpWlmrVvbxawGNgZCFmz/At9FPt+BboymzsWQSEA+wQ
QgJHjXzp5iSskYxYdIPFCb+nhAk0AAqWG4NQs0KMRsGTqnwYYnCVT/YF2Se2kTpv
eUqlwI2rjPXiW2tKuDm+ZMENu6EbySSyngq7Ad0paIq4qXXp0QcGCN9SWSRgt6/g
YePmBR37SLKOrrkfWPFS/NRLEZg/pWhEcKVMuCDJSF/kGOca4AytQsJiZ66k0ecM
Jklop2vxVLIm1rEdO/m2
=ks8D
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: FW: tomcat 8080 thread not reduced

2017-01-19 Thread smith
Hi, chris:

>"busy" is the same as "active".
When not use , our busy thread always keep under 10 while the 
currentThreadCount keeps high (these are get from tomcat manager), So we really 
don't know how many threads are truly free. How many are in keepAlivedStatus


-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Thursday, January 19, 2017 4:38 PM
To: Tomcat Users List
Subject: Re: FW: tomcat 8080 thread not reduced

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Smith,

On 1/18/17 8:25 PM, smith wrote:
> I don't care if the threads will be reduced, I just want to know why.

Okay.

> And we want to use the account to determine when the tomcat capacity 
> is not enough that we need to add max configuration or add new tomcat 
> servers.

Set your initial and max threads to the same value (pool size =
constant) and then monitor the "active count" with a Nagios warning at e.g. 80% 
usage.

> Since not use the , the busy thread account also cannot tell 
> us the correct active threads count.

"busy" is the same as "active".

> In another email thread, you said if use , it will tell us 
> the right active thread count not just busy count, right?

I would always use an  for at least two different reasons:

1. Thread management (e.g. reducing threads if necessary) 2. Shared 
thread-pools (no need to have port 8080 and 8443 with separate pools)

- -chris

> -Original Message- From: Christopher Schultz 
> [mailto:ch...@christopherschultz.net] Sent: Wednesday, January 18,
> 2017 3:28 PM To: Tomcat Users List Subject: Re: FW: tomcat 8080 thread 
> not reduced
> 
> Smith,
> 
> On 1/18/17 12:47 AM, smith wrote:
>> So the tomcat default executor will not reduce the thread count until 
>> it reach to the max configuration?
> 
> By default, you get a thread pool that isn't as smart as an executor.
> 
>> Will it reduce when it reach to max?
> 
> Not unless you use an .
> 
>> And why the default not reduce the thread?
> 
> Because it didn't do so in the past, before  was introduced.
> 
> I'm curious: if you are willing to have e.g. 200 threads available at 
> any time during the life of the JVM, why does it matter if those 
> threads are reduced during times of inactivity?
> 
> I think of threads as a resource like memory, where if you are going 
> to allocate X resources, you may as well allocate X resources and be 
> done with it. Growing and shrinking pools of things just adds 
> complexity and reduces performance.
> 
> Idle threads are "free" other than using a little bit of memory.
> So why is it so important for those threads to stop when they don't 
> have any work for a while?
> 
> -chris
> 
>> -Original Message- From: Christopher Schultz 
>> [mailto:ch...@christopherschultz.net] Sent: Tuesday, January 17,
>>  2017 7:18 PM To: Tomcat Users List Subject: Re: FW: tomcat 8080 
>> thread not reduced
> 
>> Smith,
> 
>> On 1/16/17 8:22 PM, smith wrote:
>>> Yes, I think thread count should be reduced when those threads are 
>>> idle
> 
>>> Is this right? Or it will not reduced?
> 
>> Id you want Tomcat to reduce the number of idle threads, you'll need 
>> to explicitly configure an  and use that with your  
>>  .
> 
>> -chris
> 
>>> -Original Message- From: Christopher Schultz 
>>> [mailto:ch...@christopherschultz.net] Sent: Monday, January 16,
>>>  2017 2:20 PM To: Tomcat Users List Subject: Re: FW: tomcat
>>> 8080 thread not reduced
> 
>>> Smith,
> 
>>> There are your only active s:
> 
>>> On 1/14/17 1:30 AM, smith wrote:
>>>> >>> connectionTimeout="2" redirectPort="8443" />
> 
>>>> [snip]
> 
>>>> >>>  />
> 
>>> You have not changed any settings from the default. What makes you 
>>> think that your thread count should be reduced when those threads 
>>> are idle?
> 
>>> -chris
> 
>>> 
- -
>
>>>
>>> 
>>> 
> 
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 
>>> 
- -
>
>>>
>>> 
>>> 
> 
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: use

RE: FW: tomcat 8080 thread not reduced

2017-01-21 Thread smith
Hi, Chris

We don't just care about free, we care about active too. We know how many free 
also means how many are active

We are using HTTP

Let's me take one example from manager status: (this is the manager output)
Max threads: 200 Current thread count: 23 Current thread busy: 1 Keeped alive 
sockets count: 1

Current thread count: 23 I want to know if these 23 threads are free to use, or 
they are active, cannot accept new connection? Here are Keeped alive sockets 
count, it's only 1, is this 1 for the busy thread or a thread in 23?

-Smith

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Friday, January 20, 2017 10:29 PM
To: Tomcat Users List
Subject: Re: FW: tomcat 8080 thread not reduced

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Smith,

On 1/19/17 9:59 PM, smith wrote:
>> "busy" is the same as "active".
> 
> When not use , our busy thread always keep under 10 while 
> the currentThreadCount keeps high (these are get from tomcat manager), 
> So we really don't know how many threads are truly free.

Why do you care how many are free? Isn't it more important to know how many are 
active? For example, I run my app servers with maxThreads="150" for the most 
part. Then, I have Nagios notify me if the "active count" goes above 135 
(that's 90% of my maxThreads).

Nagios, like many monitoring systems, won't scream the first time it sees 
something. Instead, it will check again a few times before complaining. That 
means that as long as I don't see any significant duration where the active 
thread count exceeds 135, I don't get any alarms going off.

And I don't care how many "free" threads I have. I've decided that I want "150 
and NO MORE". Nothing else matters except the active count.
I don't happen to allow the thread pool to re-size downward (fewer threads), 
but if I did, I wouldn't have to change my monitoring at all. What? The active 
count is 10 and the total pool size is 20? I don't care. Wake me up when the 
active thread count stays high for a while, indicating to me that we are 
getting hammered.

> How many are in keepAlivedStatus

Use NIO and forget about it.

Besides, you are using *AJP*. Every thread is *always* in a keepalive state. So 
keepalive == idle as far as Tomcat is concerned.

If you were using HTTP, then keepalive would be an issue (and NIO would be the 
answer), but you aren't, so it's not.

- -chris

> -Original Message- From: Christopher Schultz 
> [mailto:ch...@christopherschultz.net] Sent: Thursday, January 19,
> 2017 4:38 PM To: Tomcat Users List Subject: Re: FW: tomcat 8080 thread 
> not reduced
> 
> Smith,
> 
> On 1/18/17 8:25 PM, smith wrote:
>> I don't care if the threads will be reduced, I just want to know why.
> 
> Okay.
> 
>> And we want to use the account to determine when the tomcat capacity 
>> is not enough that we need to add max configuration or add new tomcat 
>> servers.
> 
> Set your initial and max threads to the same value (pool size =
> constant) and then monitor the "active count" with a Nagios warning at 
> e.g. 80% usage.
> 
>> Since not use the , the busy thread account also cannot 
>> tell us the correct active threads count.
> 
> "busy" is the same as "active".
> 
>> In another email thread, you said if use , it will tell us 
>> the right active thread count not just busy count, right?
> 
> I would always use an  for at least two different
> reasons:
> 
> 1. Thread management (e.g. reducing threads if necessary) 2. Shared 
> thread-pools (no need to have port 8080 and 8443 with separate
> pools)
> 
> -chris
> 
>> -Original Message- From: Christopher Schultz 
>> [mailto:ch...@christopherschultz.net] Sent: Wednesday, January 18, 
>> 2017 3:28 PM To: Tomcat Users List Subject: Re: FW: tomcat
>> 8080 thread not reduced
> 
>> Smith,
> 
>> On 1/18/17 12:47 AM, smith wrote:
>>> So the tomcat default executor will not reduce the thread count 
>>> until it reach to the max configuration?
> 
>> By default, you get a thread pool that isn't as smart as an executor.
> 
>>> Will it reduce when it reach to max?
> 
>> Not unless you use an .
> 
>>> And why the default not reduce the thread?
> 
>> Because it didn't do so in the past, before  was 
>> introduced.
> 
>> I'm curious: if you are willing to have e.g. 200 threads available at 
>> any time during the life of the JVM, why does it matter if those 
>> threads are reduced during times of inactivity?
> 
>> I think of threads as a resource like memor

RE: JMX currentThreadsBusy less than connections/requests when use APR connector

2017-03-08 Thread smith
Our production usage also has same phenomenon that my "currentThreadsBusy" 
always not high (3-5), but my "currentThreadCount" will go to 200-300 
sometimes. I know that at some busy time, more threads will be created, so the 
thread pool get high, but at the same time, the busy threads will also 
increase, but I never catch when it also went high.

-Original Message-
From: Suvendu Sekhar Mondal [mailto:suv3...@gmail.com] 
Sent: Wednesday, March 08, 2017 1:43 PM
To: Tomcat Users List
Subject: Re: JMX currentThreadsBusy less than connections/requests when use APR 
connector

Linbo,

"currentThreadsBusy" is number of busy threads. These are the threads are being 
actively use. If you are seeing this count > 0 for long time(depending on your 
application type), then most likely you have "hung thread". In that case thread 
dump analysis will show you root of the problem.

"currentThreadCount" is current threads in thread pool. To track thread pool 
usage, you can use this counter.

Thanks!
Suvendu

On Wed, Mar 8, 2017 at 8:44 AM, linbo liao  wrote:
> Hi,
>
> I setup local environment to test Tomcat monitor.
>
> The Environment:
>
> Tomcat: 8.5.5
> VM: Ubuntu 14.04.1 LTS
> HTTP PORT: 8080
> IP: 10.211.55.4
>
> Tomcat use APR connector, I test the tomcat via ab command, find JMX 
> currentThreadsBusy < 10 all of the time.
>
> ab -n 10 -c 100 10.211.55.4:8080/
>>
>
> I tried to search the reason but without the result. For BIO each 
> thread to handle one connection, so currentThreadsBusy can show the 
> performance of tomcat.
>
> But for APR connector, what's the meaning of currentThreadsBusy?
>
> Thanks in advance.
>
> Thanks,
> Linbo

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Template tool

2006-06-14 Thread David Smith
Freemarker can.  Very versitile for both web output as well as email and 
other templating purposes.


--David

Leonel wrote:


On 6/14/06, MW Janssen <[EMAIL PROTECTED]> wrote:


i use velocity..

Maarten




thanks

does it can handle  templates   from   String  or  has to be  
templates on file


thanks again


leonel

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Http11AprProtocol took 2 hr to init on http-443

2006-06-19 Thread David Smith
Looks to me more like port 80 is taking 2+ hours to initialize, not 
443.  My guess is tomcat is waiting for something -- possibly a system 
service.  At anyrate, I don't experience that here on any version of 
tomcat or JDK.


--David

Jeff Chuang wrote:


Hi,

After starting tomcat from jsvc as service, it took 7840217 ms to 
initialize Http11AprProtocol on http-443, during which port 80 was 
blocked. There was no error found in jsvc debug info, neither was 
catalina.out. After initialization on port 443, everything works(both 
ports 80 and 443). It occurs every service restart. Is anyone 
experiencing this problem? Any common would be appreciated.


Jeff

System info:
Hardware platform: AMD Opteron Dual core 165 on Tyan 2865 board with 
1G memory

OS: Linux FC-5-x86_64
JDK: Sun 1.5.0_07-b03
Openssl:0.9.8b
Apr: 1.2.7
Tomcat: 5.5.17



catalina.out:

Jun 19, 2006 1:43:28 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Jun 19, 2006 3:54:05 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-443
Jun 19, 2006 3:54:05 PM org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Jun 19, 2006 3:54:05 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 7840217 ms
Jun 19, 2006 3:54:06 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 19, 2006 3:54:06 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
Jun 19, 2006 3:54:06 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jun 19, 2006 3:54:09 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jun 19, 2006 3:54:09 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jun 19, 2006 3:54:09 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: 
[org.apache.webapp.balancer.RuleChain: 
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: 
News / Redirect URL: http://www.cnn.com], 
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param 
name: paramName / Target param value: paramValue / Redirect URL: 
http://www.yahoo.com], 
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: 
http://jakarta.apache.org]]

Jun 19, 2006 3:54:10 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jun 19, 2006 3:54:10 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jun 19, 2006 3:54:10 PM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Jun 19, 2006 3:54:10 PM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-443
Jun 19, 2006 3:54:10 PM org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Jun 19, 2006 3:54:10 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jun 19, 2006 3:54:11 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5291 ms


SSL connector in server.xml:

maxThreads="150" minSpareThreads="25" 
maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true" 
debug="0" scheme="https"
secure="true" acceptCount="100" SSLEngine="on" 
SSLCertificateFile="/data/CA/mycert.crt"
SSLCertificateKeyFile="/data/CA/mykey.key" 
SSLPassword="mypassword" />



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pdf documents

2006-06-20 Thread David Smith
I would recommend a servlet that streams the files from some configured 
absolute path(s) to the client.  It's reasonably simple and allows you 
some degree of control over what is delivered.  Map the servlet to *.pdf 
in your web.xml to make it respond to all requests for pdfs.


--David

Bob Wyatt wrote:


For the client side, sure.
I already know it works if I copy the pdf file under my tomcat
application... I just don't want to move hundreds of files there...

Regards,

Bob

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 20, 2006 07:30

To: Tomcat Users List
Subject: Re: pdf documents

Those files are in a proprietary format..you'll need to go to adobe and get 
the PDF plugin/viewer for display-

M-
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: "Suba Suresh" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Monday, June 19, 2006 10:28 PM
Subject: Re: pdf documents


 

I have the same problem as Bob but files mapping into different file 
systems. I also tried the context mapping as you (Mark)had suggested with 
app.xml file. I will read about the link config tomorrow and try it. Any 
help would be appreciated.


thanks,
suba suresh.

Bob Wyatt wrote:
   


Mark,

No... Didn't know about it...
Now that I know about it (Thank You), I'm not sure of what really needs 
to
be done... No where under $CATALINA_HOME do I have a defaultcontext.xml, 
context.xml,

or similarly named file. All of my similarly named files are *.html files
 



 


or
directories, as follows:

#pwd
/usr/local/jakarta-tomcat-5
# find . -name \*context\* -print
./server/webapps/admin/context
./server/webapps/admin/defaultcontext
./webapps/tomcat-docs/config/printer/context.html
./webapps/tomcat-docs/config/printer/defaultcontext.html
./webapps/tomcat-docs/config/context.html
./webapps/tomcat-docs/config/defaultcontext.html
./webapps/wade2/scripts/contextmenu.css

So I'm not sure what to do - any advice?

Regards,

Bob
-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Monday, June 19, 2006 
21:13

To: Tomcat Users List
Subject: Re: pdf documents

Bob Wyatt wrote:

 


I have a directory that contains hundreds of pdf files.

I have Tomcat 5.0.28 running on AIX 5.2.

Under the webapps/appname directory, if I create a symbolic link to the
   


pdf

 


files, they will not display.
   


Have you enabled linking? See the allowLinking property at
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


   



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pdf documents

2006-06-20 Thread David Smith
I can put something together, but not until tonight -- it'll take too 
long to do at work.  In the meantime, feel free to google.  This is such 
a simple item I'm sure someone has done it before and posted their 
experiences.


--David

Suba Suresh wrote:

I am in the same boat as Bob. I already have a servlet displaying the 
filenames to select from. My servlet is mapped to a different name in 
web.xml file. How should I proceed. Should I have another new servlet? 
What about for different file formats. Should it also be mapped?


thanks,
suba suresh.

David Smith wrote:

I would recommend a servlet that streams the files from some 
configured absolute path(s) to the client.  It's reasonably simple 
and allows you some degree of control over what is delivered.  Map 
the servlet to *.pdf in your web.xml to make it respond to all 
requests for pdfs.


--David

Bob Wyatt wrote:


For the client side, sure.
I already know it works if I copy the pdf file under my tomcat
application... I just don't want to move hundreds of files there...

Regards,

Bob

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 
20, 2006 07:30

To: Tomcat Users List
Subject: Re: pdf documents

Those files are in a proprietary format..you'll need to go to adobe 
and get the PDF plugin/viewer for display-

M-
This email message and any files transmitted with it contain 
confidential
information intended only for the person(s) to whom this email 
message is
addressed.  If you have received this email message in error, please 
notify

the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - From: "Suba Suresh" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Monday, June 19, 2006 10:28 PM
Subject: Re: pdf documents


 

I have the same problem as Bob but files mapping into different 
file systems. I also tried the context mapping as you (Mark)had 
suggested with app.xml file. I will read about the link config 
tomorrow and try it. Any help would be appreciated.


thanks,
suba suresh.

Bob Wyatt wrote:
 


Mark,

No... Didn't know about it...
Now that I know about it (Thank You), I'm not sure of what really 
needs to
be done... No where under $CATALINA_HOME do I have a 
defaultcontext.xml, context.xml,
or similarly named file. All of my similarly named files are 
*.html files






 


or
directories, as follows:

#pwd
/usr/local/jakarta-tomcat-5
# find . -name \*context\* -print
./server/webapps/admin/context
./server/webapps/admin/defaultcontext
./webapps/tomcat-docs/config/printer/context.html
./webapps/tomcat-docs/config/printer/defaultcontext.html
./webapps/tomcat-docs/config/context.html
./webapps/tomcat-docs/config/defaultcontext.html
./webapps/wade2/scripts/contextmenu.css

So I'm not sure what to do - any advice?

Regards,

Bob
-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Monday, June 19, 
2006 21:13

To: Tomcat Users List
Subject: Re: pdf documents

Bob Wyatt wrote:

   


I have a directory that contains hundreds of pdf files.

I have Tomcat 5.0.28 running on AIX 5.2.

Under the webapps/appname directory, if I create a symbolic link 
to the
  



pdf

   


files, they will not display.
  



Have you enabled linking? See the allowLinking property at
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [

How to access server configuration from a servlet

2006-06-20 Thread Smith Ran

I have a Tomcat 5.0 server running on a 1.4 JRE

I was wondering if there was any way to access server configuration (in
server.xml etc.) from a servlet?

Is there a way to determine where the server is installed on the system
etc.?

I would like to basically determine the server's SSL keystore and password.
Any help would be greatly appreciated.
Thanks.


Re: How does Tomcat detect whether a browser accepts cookies

2006-06-21 Thread David Smith
On first response, Tomcat both set's a cookie JSESSIONID and appends the 
same to the page links (when properly coded). If the cookie comes back 
on the next request, url rewriting is dropped in favor of the cookie. No 
magic, tomcat just covers all it's bases up front.


See HttpServletResponse.encodeURL(String) in the servlet spec for more info.

-- David

Garey Mills wrote:

David -

Tomcat uses cookies to establish a session with the browser. If it
can't use cookies, it uses URL rewriting. So whenever someone uses my app,
Tomcat tries to set a cookie. 


If it was the case that Tomcat didn't know whether the browser
accepted cookies until after it tried to set one at the first access,
users of browsers that did not accept cookies would not have a session
that recorded their first access. I don't think that would be considered
acceptable, so I assume that Tomcat knows, before my app is reached,
whether the browser accepts cookies. But is my assumption correct, I don't
know. That is what I am asking.




Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, David Kerber wrote:

  
Why would it try until your app tells it to?  AFAIK (admittedly, not 
very far; I don't use cookies)  think it needs to be handled by your app.



Garey Mills wrote:



David -

Well, okay then, but how can my app find out what Tomcat knows
about whether the browser accepts cookies or not? And when does Tomcat
try? Before control is passed to my app?

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, David Kerber wrote:

 

  
I think what he's getting at is that Tomcat (or any other web server) 
cannot tell how a browser is set wrt cookies without trying to set one 
and then seeing if it's there.


Garey Mills wrote:

   



Martin -

I guess I'm being obtuse, but WHAT won't work? What I want to know
is how Tomcat detects whether the browser accepts cookies, that is,
whether it is set to accept cookies or not?

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, Martin Gainty wrote:



 

  

Garey-

Unfortunately that wont work if your Browser disallows cookies
If its IE 
Check out the IE options-


Tools
Internet Options
Privacy
Advanced
look at "switched on Always allow Session Cookies"

HTH,

Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Garey Mills" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Wednesday, June 21, 2006 12:50 PM
Subject: Re: How does Tomcat detect whether a browser accepts cookies


  

   



Leon -

Thank you for your response, but I don't understand it. I have a
key question: 


how does Tomcat detect that a browser does not accept cookies?


There are a number of different ways to detect it inside my
application, but all of them seem to need a roundtrip to the browser. If,
as I suspect, Tomcat can tell without the redirect, I would like to use
Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use
Tomcat's knowledge, so that I don't have to duplicate the work inside my
app.

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, Leon Rosenberg wrote:



 

  

You could check for your cookie in first request and if not present
just set the cookie in the  request and redirect to another page which
reads  the cookie (btw, it can also be done with javascript without
user-visible-reload). The difference to your approach that each user
will be redirected exactly once, since you are checking for your
cookie in first request and it should remain persistent for next
visits.

regards
Leon

On 6/21/06, Garey Mills <[EMAIL PROTECTED]> wrote:
  

   



Hi -

  I have an application that does not work correctly when the
browser does not accept cookies. I added some code that rewrites the query
string the first time the app is entered to include a new parameter and
then redirects to the app. I watch for that parameter and if I find it I
check whether the session id is from a cookie. If it isn't I put up a
"Sorry, you need cookies message" and exit.

  This solution is not optimal, since I am seeing a blank page the
first time I try to get into the application.

  So my question is: Tomcat must ascertain whether the browser
accepts cookies in order to decide whether to use cookies or URL
rewriting. How does it do it? and can I check Tomcat to fin

Re: Trouble with Admin WebApp

2006-06-23 Thread David Smith
Wrong place to install the admin webapp.  The webapp itself needs to be 
in $CATALINA_HOME/server/webapps right next to the manager webapp.  
admin.xml is correctly placed.


--David

Armour David wrote:


Hi

I am running Windows 2000.  I have installed Tomcat 5.5.17.  I am
running Java Version: build 1.5.0_06-b05.

I ran the Windows executable for the installation.  The default home
page comes up.  I have added an administrative account.  The Tomcat
Manager web application runs properly.

I downloaded the admin webapp.  I copied the admin directory under the
webapps of the Tomcat install.  I also added the admin.xml to
conf/Catalina/localhost directory.

The logs show the following error:

Jun 23, 2006 8:43:59 AM org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
Jun 23, 2006 8:43:59 AM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Jun 23, 2006 8:43:59 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/admin] startup failed due to previous errors
Jun 23, 2006 8:43:59 AM org.apache.catalina.core.StandardContext stop
INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin]
has not been started
Jun 23, 2006 8:45:06 AM org.apache.coyote.http11.Http11BaseProtocol
pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Jun 23, 2006 8:45:07 AM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Jun 23, 2006 8:45:07 AM org.apache.coyote.http11.Http11BaseProtocol
destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Jun 23, 2006 8:45:07 AM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: Failed shutdown of Apache Portable Runtime
Jun 23, 2006 8:45:14 AM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance
in production environments was not found on the java.library.path:
C:\apps\apache\Tomcat
5.5\bin;.;C:\WINNT\system32;C:\WINNT;C:\WINNT\system32;C:\WINNT;C:\WINNT
\System32\Wbem;C:\WINNT\system32\;C:\WINNT\system32\Wbem;C:\Program
Files\IBM\SQLLIB\BIN;C:\Program Files\IBM\SQLLIB\FUNCTION;C:\Program
Files\IBM\SQLLIB\samples\repl;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM
\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\Program
Files\Microsoft SQL Server\80\Tools\BINN;C:\Program
Files\Subversion\bin;C:\Program Files\Microsoft SQL
Server\80\Tools\Binn\;C:\j2sdk1.4.2_11\bin;C:\apps\apache-ant-1.6.5\bin;
C:\Program Files\Altiris\Software Virtualization Agent\;C:\Program
Files\InstallShield\AdminStudio\5.5\ConflictSolver\;C:\Program
Files\ActivCard\SecureLogin Single Sign-On\
Jun 23, 2006 8:45:14 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jun 23, 2006 8:45:14 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 843 ms
Jun 23, 2006 8:45:14 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 23, 2006 8:45:14 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
Jun 23, 2006 8:45:14 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\apps\apache\Tomcat
5.5\server\webapps\admin does not exist or is not a readable directory
at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.jav
a:140)
at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.
java:3814)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3985
)
at
org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:10
89)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1202)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)

The Manager application shows the admin as deployed but not started.
Also, in the Manager application all the other webapps have a live
Reload link, while the admin applications Reload link is not enabled.
What is wrong here?

David Armour

Java Application Architect

Winterthur U.S. Holdings, Inc.
[EMAIL PROTECTED]
608-837-4562 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: When we restarted tomcat, we are getting the below error while connecting to MySql database

2006-06-26 Thread David Smith

Take a look at the user accounts in MySQL.  Some things to consider:

1. MySQL authenticates clients based on the host as well as username and 
password.  Login to mysql manually and run this:


use mysql ;
select user, host from user where user='root' ;

If the host column has '%' or 'localhost.localdomain', it should work.


2. Using the root account in a webapp is not recommended.

--David

[EMAIL PROTECTED] wrote:


Hi,


When we restarted tomcat, we are getting the below error while
connecting to MySql database:


-

Catalina.start: LifecycleException: Exception opening database
connection: java.sql.SQLException: Access denied for user
'root'@'localhost.localdomain' (using password: YES)

LifecycleException: Exception opening database connection:
java.sql.SQLException: Accessdenied for user
'root'@'localhost.localdomain' (using password: YES)

-


Any work-around for the problem ?


Thanks in advance.


RK

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: log4j warning: Please initialize the log4j system properly

2006-06-26 Thread David Smith

[CATALINA_HOME]/common/classes/log4j.properties:

log4j.rootLogger=ERROR, R 
log4j.appender.R=org.apache.log4j.RollingFileAppender 
log4j.appender.R.File=C:\Program Files\Apache Software Foundation\Tomcat
5.5\logs\tomcat.log 
log4j.appender.R.MaxFileSize=10MB 
log4j.appender.R.MaxBackupIndex=10 
log4j.appender.R.layout=org.apache.log4j.PatternLayout 
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n

log4j.logger.org.apache.catalina=DEBUG, R



You might want to drop the space after the comma in log4j.rootLogger and 
log4j.logger.org.apache.catalina

example: log4j.rootLogger=ERROR,R

Also '\' is an escape character, so you'll want to double up them to get 
a \ in the file path in log4j.appender.R.File.
example: log4j.appender.R.File=C:\\Program Files\\Apache Software 
Foundation\\Tomcat\\5.5\\logs\\tomcat.log



--David


JS Portal Support wrote:


Hi,

Just upgraded to Tomcat 5.5. In order to see what's happening at the context
level I need to see the internal logging of Tomcat. My logs are not working.

[CATALINA_HOME]/logs/stdout.log:

log4j:WARN No appenders could be found for logger
(org.apache.catalina.startup.TldConfig).
log4j:WARN Please initialize the log4j system properly.

[CATALINA_HOME]/logs/stderr.log:

log4j:WARN No appenders could be found for logger
(org.apache.catalina.startup.Embedded).
log4j:WARN Please initialize the log4j system properly.

Can anyone point me to a direction? I have no clue what is wrong, and all
the posts I have found all suggest to place the log4j.properties in the
common/classes dir. I have done this and it is not working.

[CATALINA_HOME]/common/classes/log4j.properties:

log4j.rootLogger=ERROR, R 
log4j.appender.R=org.apache.log4j.RollingFileAppender 
log4j.appender.R.File=C:\Program Files\Apache Software Foundation\Tomcat
5.5\logs\tomcat.log 
log4j.appender.R.MaxFileSize=10MB 
log4j.appender.R.MaxBackupIndex=10 
log4j.appender.R.layout=org.apache.log4j.PatternLayout 
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n

log4j.logger.org.apache.catalina=DEBUG, R

I hope someone has a clue. Best regrads,
Joost


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: what happens with the content.xml file

2006-06-26 Thread David Smith
I'm not going to claim agreement with the developers on the behavior of 
the deploy path.  I will say you could put version info into a 
 element of the WEB-INF/web.xml file if that's you're goal 
and it'll show up in the manager webapp without butchering your url.


--David

tom ot wrote:


Hi Pid,
thanks again for your answer. I'm not sure, but is the way I'd like to 
deploy my .war files so abnormal? :-) or how do you all know what 
version of an application actually is deployed?


Btw, I'm not sure but was that in Tomcat 5.0 different, because I 
asked a kollegue of mine if he has an idea how to do that and he 
deployed it on Tomcat 5.0 and it worked.


And another 2 questions: what do you mean by symlinks/url?
And how can I get in contact to "someone more knowledgable"? ;-)

Thanks again.
Tom




From: Pid <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: Tomcat Users List 
Subject: Re: what happens with the content.xml file
Date: Fri, 23 Jun 2006 09:58:46 +0100

It *is* loading the context.xml attributes from the war; except: the
name of the deployed context.xml file is dependant on the name of the
war, and as the path is dependant on name of the deployed context 
file...


E.g.

"hostfiles/trumpet2.2.war" deploys, it's "META-INF/context.xml" is
copied to "conf/Catalina/host/trumpet2.2.xml", and the app is made
available at "http://host/trumpet2.2/";.

So because you've renamed the .war, you've renamed the deployed path.
It'd be easier to leave it as 'probe.war'.

You could try symlinks/url mapping to get /probe/ to map to 
/probe_ver_num/.


The context path attribute behaves in a pretty restrictive way.  I'm not
sure what the thinking behind it is/was - maybe someone more
knowledgable can help.



tom ot wrote:
> Hi pid,
> thanks for your answer. I have another question in the link you posted
> some lines above there is written:
>
> See Automatic Application Deployment for more information. This method
> allows dynamic reconfiguration of the web application, since the main
> conf/server.xml file cannot be reloaded without restarting Tomcat.
> Please note that for tomcat 5, unlike tomcat 4.x, it is NOT 
recommended

> to place  elements directly in the server.xml file.  Instead,
> put them in the META-INF/context.xml directory of your WAR file or the
> conf directory as described above.
>
> I don't want to violate the recommandation of putting context tags 
into

> the server.xml. Is there another way to tell tomcat to take the
> context.xml attributes from the .war file? Maybe some reconfigurations
> on the tomcat (not the default configuration...).
>
> Thanks in advance for your answer.
>
> Kind regards
> Tom
>
>
>> Read the docs:
>>
>> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
>>
>> Context path attribute: "The value of this field must not be set 
except
>> when statically defining a Context in server.xml, as it will be 
*infered

>> from the filenames* used for either the .xml context file or the
>> docBase."
>>
>>
>>
>>
>> > Hi folks,
>> >
>> > I'm quiet new to tomcat, but there is already a thing I can't
>> understand:
>> >
>> > I have downloaded the Lambda Probe application version 1.5.0.3. 
I've

>> got
>>
>> > the .war file called probe.war.
>> > The only thing I did is to rename the file to probe_1.5.0.3.war and
>> > deployed it to my tomcat 5.5.17 (I downloaded the tomcat 
.zip-file and

>> > started the startup script - no configuration was changed).
>> >
>> > I put my probe_1.5.0.3.war into the folder 
$CATALINA_HOME\webapps. What

>> i
>> > identified, what was happening now is:
>> >
>> > - The .war file was unpacked to 
$CATALINA_HOME\webapps\probe_1.5.0.3

>> with
>> > all its content
>> > - The META-INF/context.xml File (that was in the .war file) is
>> copied to
>>
>> > $CATALINA_HOME\conf\Catalina\localhost\probe_1.5.0.3.xml
>> > - The application is started.
>> >
>> > What I was wondering is, that the URL what my application is 
listening

>> on
>> > is
>> > http://localhost:8080/probe_1.5.0.3
>> >
>> > Does anyone know what I have to do, that my application listens 
to the

>> > following urls (only one at the time):
>> > http://localhost:8080/probe or even http://localhost:8080/tom/probe
>> >
>> > As I read the documentation, it should work with setting the path
>> > attribute in the context.xml File in the .war file...but i can 
change

>> that
>> > path attribute to what I want, my applications still listens to:
>> > http://localhost:8080/probe_1.5.0.3
>> >
>> > Thanks for your help...hope to get an answer soon.
>> >
>> > Kind regards
>> > Tom
>> >
>> > Please reply to my e-mail adress directly too!
>
> _
> Die Vielfalt der Optionen lässt Sie im Internet erfolgreich
> recherchieren. http://search.msn.ch/
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional

Re: many No Referrers in logs

2006-06-26 Thread David Smith
That usually indicates a direct access either by typing in the URL or 
using a bookmark.


--David

Robert Kudyba wrote:


We have our server.xml file set w/ the following entry:
Valve className="org.apache.catalina.valves.AccessLogValve"
directory="../logs" prefix="ws_access_log." suffix=".txt" pattern="combined"

However, there are still many log entries showing no referrers. Some are
from user spiders such as the following:
203.65.62.122 - - [03/Jun/2006:11:44:14 -0500] "GET
//cgi-bin/openwebmail/userstat.pl HTTP/1.1" 404 1051 "-" "Mozilla/4.0
(compatible; MSIE 6.0; Windows 98)"
203.65.62.122 - - [03/Jun/2006:11:44:18 -0500] "GET
//openwebmail/cgi-bin/userstat.pl HTTP/1.1" 404 1051 "-" "Mozilla/4.0
(compatible; MSIE 6.0; Windows 98)"
81.56.248.160 - - [28/May/2006:01:46:22 -0500] "GET
/include/javascript/images/layout HTTP/1.1" 404 1051 "-" "Java/1.5.0_06"
68.142.250.92 - - [31/May/2006:00:06:22 -0500] "GET /robots.txt HTTP/1.0"
404 985 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp;
http://help.yahoo.com/help/us/ysearch/slurp)"

So should we assume that if there is no referrer logged than the user was
just using links within the site?

Thanks,

Rob


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Out of Memory Error

2006-06-26 Thread Gordon Smith
I'd suggest that you try the following JVM options in your Tomcat JAVA_OPTS
environment variable (before deploying these changes in production, test
these options in an isolated environment with stress testing tools if at all
possible):

JAVA_OPTS= -Xms1024m -Xmx1024m -verbose:gc  -server 

- By making -Xms and -Xmx the same, you will minimize CPU cycles spent on
growing the block of memory allocated to the Tomcat JVM by the OS.  If you
have more memory available, use it for Tomcat, so long as you allow
sufficient "headroom" for other services you may be running, as well as the
OS itself.  Test to determine how high you can safely go with these parms.

- The -verbose:gc option will output statistics to the Tomcat console that
will tell you the "before" and "after" memory stats behind JVM garbage
collection operations.  Use the "after" number to determine approximately
how much RAM the Tomcat JVM is consuming at a given moment.  Much of the
time, the JVM does not use all the memory shown by the Windows Task Manager
as being in use.

- As I understand it, the -server option is generally recommended when using
Tomcat in a server environment.

That aside, buy enough (>=2G) RAM so that you can take advantage of a larger
memory allocation.  Win 2K permits a total of 4G per process; 2G of that is
mapped to the OS kernel leaving 2G for your app.  If you only have 1G or so
installed, you're missing an opportunity for an inexpensive way to increase
performance and decrease downtime and hair loss!

Hope this helps.

Cheers,
Gordon Smith

-Original Message-
From: Marco Aurélio Seraphim da Silva [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 26, 2006 11:09 AM
To: users@tomcat.apache.org
Subject: Out of Memory Error

Hi folks,

I'm using Tomcat 5.0.28 with JVM 1.4.2 (running only Tomcat) under a Win
2000 Server, and it starts to give me the following message:
java.lang.OutOfMemoryError.

To prevent this I start Tomcat using this 2 parameters:
-Xms 521m
-Xmx 1024m

But this isn't enought, some times when the server is a bit stressed the
server memory, used by the JVM incrises up to 1GB and some MB more, then
decrises to 700MB, and starts to increse again up to 1GB.

The memory used increses just as the app sessions, but when the JVM used
memory get at 1GB I have at about 400 sessions. I'm thinking that is to much
memory for 400 sessions on this app.

I'm afraind becuse the memory get up to 1GB when the server is not full
stressed.


There's something I can do to reduce the amount of memory used by the JVM,
or it's normal???

Thanks,

Marco Aurélio Silva


-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDBC jar in WEB-INF/lib?

2006-06-27 Thread David Smith
You can if you like.  Just implement a ServletContextListener to setup a 
DBCP pool for your webapp and store the resulting DataSource in the 
ServletContext.  Servlets and JSPs can pull it out of the ServletContext 
later for use.  Then have both the DBCP jar and the MySQL jar in your 
WEB-INF/lib folder.


The only catch is your DataSource won't be available via JNDI any more.  
The JNDI mechanism of tomcat requires your MySQL jar be in common/lib.


--David

wolverine my wrote:


Hi!

The Tomcat's MySQL DBCP example mentioned that we have to copy the
JDBC Driver's jar $CATALINA_HOME/common/lib. Do we allowed to copy the
jar to WEB-INF/lib? And how can we do that?

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: sort an array

2006-06-27 Thread Gordon Smith
Perhaps all the data items stored in the three arrays could be put into a
single new class so that, by definition, all the data would be sorted
together.  At that point, you might not need three separate arrays.

If you need to sort the data in different ways, you can avoid making copies
of the List (to sort each one differently).  Declare a static field in the
class to indicate the sort method that you need at the moment, then read
that static field in the compareTo() method.  A user of that class that
needs to sort a certain way would set the static field (say, through a
sortMethodXXX() method you declare in the class) and call Collections.sort()
as Sergio had previously suggested.  

If you might be calling the sort() method in a multithreaded environment,
you'll have to take synchronization issues into account (to make certain
that each thread uses the static field value needed to implement the sort
method that thread needs).  The suggestion above should work if you declare
the sortMethodXXX() method as synchronized, but you'll need to test that
carefully to make certain that one thread does not corrupt or delay the
results expected within another thread.

Hope this helps.

Cheers,
Gordon Smith

-Original Message-
From: password password [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 27, 2006 10:57 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: sort an array

Hi, 
 
 Arrays.sort(astrName); 



  I can not use the sort method because I have the arrays have an relation.
I mean, the first element of astrName have relation with first element of
adblBackground1, adblBackground2, adblItensity1 and adblItensity2. 
  Then I can sort each array independently, if I sort an element of astrName
I have to sort the rest of arrays. 
  Can you tell me a way to do this? 
  Thanks. 




-

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot use Tomcat

2006-06-28 Thread David Smith
Offer details.  We are not looking over your shoulder at the screen and 
have no idea what you've setup.


--David

Rosario Antonio wrote:


Tomcat is running but when tryin to access localhost:8080 I receive
message:


  UNAUTHORIZED


How can I correct the problem?


Thanks
Antonio


 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot use Tomcat

2006-06-28 Thread David Smith
Yup.  Gotta love Windows.  You might also want to check with the domain 
admins to be sure some group policy hasn't been set that would 
interfere.  The tomcat service has to have at least read access to all 
of it's files and all the webapp files.  Check the logs for which 
specific files it's having trouble with.


--David

Martin Gainty wrote:


Antonio-

someone has been mucking with the file/folder permissions..In other words its 
not your fault..

Martin--
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Rosario Antonio" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Wednesday, June 28, 2006 9:11 AM
Subject: RE: Cannot use Tomcat


The problem is that nothing happens. I have installed Tomcat in another
PC at home and it works fine

  localhost:8080/index.jsp

Displays the page OK. Here in my office my PC is connected to am
Intranet and I suspect that is related to my problem.


Thanks
Antonio

 


-----Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: 28 June 2006 12:39

To: Tomcat Users List
Subject: Re: Cannot use Tomcat

Offer details.  We are not looking over your shoulder at the screen and
have no idea what you've setup.

--David

Rosario Antonio wrote:

 


Tomcat is running but when tryin to access localhost:8080 I receive
message:


 UNAUTHORIZED


How can I correct the problem?


Thanks
Antonio




   




-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Error while connecting to MySQL database

2006-06-29 Thread Gordon Smith
If Class.forName throws a null pointer exception, chances are it can't find
the driver because you have a Tomcat configuration problem or other
classpath-related problem relating to driver setup.  Please check out the
documentation on tomcat.apache.org for the details for your version of
Tomcat.

As an aside, please consult the MySQL documentation about setting a root
password and disabling unneeded accounts in the database.  You are leaving a
gaping security hole in your app by not establishing a root db pwd.  

Once you put a root pwd in place, there's no reason to share it in this
forum as long as you can connect by using that pwd from the MySQL client.

Hope this helps.

Cheers,
Gordon Smith

-Original Message-
From: navaneethan loganathan [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 28, 2006 7:57 PM
To: users@tomcat.apache.org
Subject: Error while connecting to MySQL database

Hi,

I am facing a problem with my Apache-Tomcat-MySQL installation.MyEnvironment
is as follows:
Redhat ES4(2.6.9-5.EL), Apache-Tomcat-5.5.15, MySQL 4.1.12, Java version
1.5.0_06, Apache-Tomcat connector ajp13,
mysql-connector-java-3.2.0-alpha-bin.jar.

After installation and configuration I am unable to connect to the database
through the application and getting the following exception in
catalina.outlog file.

java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)

However, I am able to browse my site perfectly with
http://localhost/index.jsp (the connector also configured perfectly, so that
I do not need to specify the port number in URL).
 I put the mysql-connector-java-3.2.0-alpha-bin.jar file in
$CATALINA_HOME/common/lib and also specified in CLASSPATH.

I am able to login to MySQL through command and access the database without
any problem.

My db.properties is as under:

# MySQL database access properties
db.driver = org.gjt.mm.mysql.Driver
db.url = jdbc:mysql://localhost:3306/testdb
db.user = root
db.pwd =
Any clue will be very much helpfull.Thanks in advance.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: exec'ing ksh from Servlet

2006-06-29 Thread David Smith
How is that messed up?  Makes perfect sense from the perspective of the 
calling java code and is consistent with input and output streams for 
files, network connections, etc., ...


--David

Leon Rosenberg wrote:


Alas, the getInputStream and getOutputStream methods are mixed up, the
getInputStream method gives you the stdout of the process and the
getOutputStream - the stdin.
Leon

On 6/29/06, Leon Rosenberg <[EMAIL PROTECTED]> wrote:


I suppose you use Runtime.exec() ?
If yes, you should grab the process output and error streams from the
resulting Process class:

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Process.html

regards
Leon

On 6/29/06, Martin Gainty <[EMAIL PROTECTED]> wrote:
> Good Afternoon All-
>
> I am attempting to exec a kshell from a Servlet
> I execute it fine but do not see any output or error messages from 
catalina.out or my debug file (a redirect of output inside the kshell)
> In other words I have no clue as to what this kshell script is 
actually doing

> Any Suggestions to find out what is happening???
>
> Many Thanks,
> Martin --
> *
> This email message and any files transmitted with it contain 
confidential
> information intended only for the person(s) to whom this email 
message is
> addressed.  If you have received this email message in error, 
please notify

> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
>
>
>



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: filter increase number of session

2006-06-29 Thread David Smith
There is also the RequestDumperValve which would list out all the 
request headers/parameters/cookies/etc. that tomcat is receiving.  See 
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html.


It does have a downside in that it locks you into the system's default 
encoding. :-(


--David

Leon Rosenberg wrote:


On 6/29/06, Leon Rosenberg <[EMAIL PROTECTED]> wrote:


On 6/29/06, Enrico Giurin <[EMAIL PROTECTED]> wrote:
> Yes maybe yours is the best solution, but I have still the problem 
that I

> don't understand the different behaviuor.
>

:-)
the grid for knowledge! the driving force behind each good developer!



s/grid/greed
Leon



use tcpdump to examine requests from both clients and determine the 
differences

leon

> Thanks,
> Enrico.
> - Original Message -
> From: "Leon Rosenberg" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" 
> Sent: Thursday, June 29, 2006 7:17 PM
> Subject: Re: filter increase number of session
>
>
> > On 6/29/06, Enrico Giurin <[EMAIL PROTECTED]> wrote:
> >> Yes I have that,
> >> I know that in this way if I hadn't a session tomcat makes new 
one, but

> >> If I
> >> had one I keep the old session.
> >>
> >> So why for every request I have a new session on the server, and 
why only

> >> with IVR client and not using Jmeter like client?
> >
> > because JMeter can handle session cookies? :-)
> > replace getSession with getSession(false) (and check for null) to
> > prevent tomat from creating new sessions.
> > regards
> > Leon
> >
> >>
> >> Thanks,
> >> Enrico.
> >> - Original Message -
> >> From: "Leon Rosenberg" <[EMAIL PROTECTED]>
> >> To: "Tomcat Users List" 
> >> Sent: Thursday, June 29, 2006 4:05 PM
> >> Subject: Re: filter increase number of session
> >>
> >>
> >> > do you have something like
> >> > HttpSession session = ((HttpServletRequest)req).getSession() 
in your

> >> > filter code?
> >> >
> >> > leon
> >> >
> >> >
> >> > On 6/29/06, Enrico Giurin <[EMAIL PROTECTED]> wrote:
> >> >> Hi at all,
> >> >> I have problem using filter in my web application under 
tomcat (tomcat

> >> >> 4.1
> >> >> on Windows 2k OS).
> >> >> Client of the web application is an IVR (Interactive Voice 
Response)

> >> >> in
> >> >> the
> >> >> context of voice-xml application.
> >> >> I have configured a filter in order to log all the request 
(included

> >> >> all
> >> >> the
> >> >> parameters) to my web application and I realize that tomcat 
makes a

> >> >> new
> >> >> session for every request to a URI of my web application.
> >> >> So, especially if I set a high value for session timeout, 
when I have

> >> >> a
> >> >> discrete number of call in the same time, the number of 
active session

> >> >> increases vastly.
> >> >> If I disable the filter that problem doesn't occur anymore 
and I have

> >> >> a
> >> >> single session for every phone call.
> >> >>
> >> >> I am sure that it's not a problem of the filter cause if I 
simulate

> >> >> the
> >> >> load
> >> >> web test with jmeter I haven't this problem, that is, I have 
a single

> >> >> session for every sequence of http request.
> >> >>
> >> >> I think that the problem is how the client (IVR) of my web 
application

> >> >> keeps
> >> >> the session (cookies or url rewriting), but this behaviour is 
quite

> >> >> strange,
> >> >> why I have this problem only if I use IVR and filter togheter?
> >> >>
> >> >> Any suggestion?
> >> >>
> >> >> Thanks,
> >> >> Enrico.
> >> >>
> >> >> Chiacchiera con i tuoi amici in tempo reale!
> >> >>  http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
> >> >>
> >> >> 
-

> >> >> To start a new topic, e-mail: users@tomcat.apache.org
> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >> >>
> >> >>
> >> >
> >> > 
-

> >> > To start a new topic, e-mail: users@tomcat.apache.org
> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> > For additional commands, e-mail: [EMAIL PROTECTED]
> >> >
> >> >
> >> >
> >> > --
> >> > No virus found in this incoming message.
> >> > Checked by AVG Free Edition.
> >> > Version: 7.1.394 / Virus Database: 268.9.6/378 - Release Date:
> >> > 28/06/2006
> >> >
> >> >
> >>
> >> Chiacchiera con i tuoi amici in tempo reale!
> >>  http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
> >>
> >> 
-

> >> To start a new topic, e-mail: users@tomcat.apache.org
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> > 
-

> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > --
> > No virus found in this incoming message.
> > Che

Re: Access MANIFEST.MF from web-application

2006-06-30 Thread David Smith

Try looking at ServletContext.getResourceAsStream(path)

--David

[EMAIL PROTECTED] wrote:

Hi all!

Is it possible to get access to the MANIFEST.MF in META-INF from my
web-application?
I would like to read the version info stored there to be used in my
web-applicaton.

InputStream mfis =
this.getClass().getClassLoader().getResourceAsStream("META-INF/MANIFEST.MF"
);
Manifest mf = new Manifest( mfis );

does not work, and

String jarname = System.getProperties().getProperty("java.class.path");
JarFile jarfile = new JarFile(jarname);
Manifest manifest = jarfile.getManifest();

does not seem to work either. Or is there something wrong?

If I copy the MANIFEST.MF to WEB-INF/classes, the access by InputStream
works, but that would
mean doubling data.

Thanks

Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



--
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat startup problem

2006-06-30 Thread David Smith
You may want to consider saving a copy of server.xml as 
server.orginal.xml (or something to that effect) and then stripping out 
all the comments in a production version of the server.xml.  Makes 
reading the config s much easier.  If you really need the docs, go 
back and take a look at the original as needed.


At anyrate, I see your shutdown port in the  port is the 
default.  If you have another tomcat running (I thought I saw some 
reference to this in a previous post), this needs to be changed on one 
of them.  Same for the SSL port at 8443.  These errors should show in 
logs/catalina.out if there are real port conflicts though.


--David

IMRANKHAN wrote:


May it be bcoz of firewall blocking this port.
server.xml:









 
 
 
 

 
 

   
   

   
   
   
   
 
   factory
   org.apache.catalina.users.MemoryUserDatabaseFactory
 
 
   pathname
   conf/tomcat-users.xml
 
   

 

 

 
 

   

   
 debug="0" connectionTimeout="2" 
  disableUploadTimeout="true" />

   



   
   

   
 enableLookups="false" redirectPort="8443" debug="0"

  protocol="AJP/1.3" />

   
   
   

   



   

   

 
 

 
 

 

 
 

 
 

 

 

 

 

 
 


   
   
   




   
   

   
   

   
   

 

   

 



 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: web.xml missing

2006-06-30 Thread David Smith
I'm not sure what webapps/Root/WEB-INF/web.xml has to do with anything, 
but the complaint of a missing web.xml is in context /LoginAction, as 
well as another more severe complaint about opening an input stream for 
the validation rules xml file.  Did you do a soft link or shortcut?  
Don't think tomcat likes those at all.  The webapp LoginAction should 
have it's own web.xml file.


--David

[EMAIL PROTECTED] wrote:


I have web.xml linked to the webapps/Root/WEB-INF folder in Tomcat but it
does not get recognized when I try to build a war file.  The WAR file
process completes but I do not get a working war file.  Any ideas?

Jun 30, 2006 9:01:48 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
Jun 30, 2006 9:01:49 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1181 ms
Jun 30, 2006 9:01:49 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 30, 2006 9:01:49 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.19
Jun 30, 2006 9:01:49 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jun 30, 2006 9:01:49 AM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
Jun 30, 2006 9:01:49 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL file:C:\Program
Files\Apache Software Foundation\Tomcat 5.0
\conf\Catalina\localhost\admin.xml
Jun 30, 2006 9:01:50 AM org.apache.struts.util.PropertyMessageResources

INFO: Initializing, config='org.apache.struts.util.LocalStrings',
returnNull=true
Jun 30, 2006 9:01:50 AM org.apache.struts.util.PropertyMessageResources

INFO: Initializing, config='org.apache.struts.action.ActionResources',
returnNull=true
Jun 30, 2006 9:01:50 AM org.apache.struts.util.PropertyMessageResources

INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources',
returnNull=true
Jun 30, 2006 9:01:51 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL file:C:\Program
Files\Apache Software Foundation\Tomcat 5.0
\conf\Catalina\localhost\balancer.xml
Jun 30, 2006 9:01:51 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL file:C:\Program
Files\Apache Software Foundation\Tomcat 5.0
\conf\Catalina\localhost\manager.xml
Jun 30, 2006 9:01:51 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /struts-blank from URL
file:C:/Program Files/Apache Software Foundation/Tomcat 5.0
/webapps/struts-blank
Jun 30, 2006 9:01:52 AM org.apache.struts.tiles.TilesPlugin
initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
Jun 30, 2006 9:01:52 AM org.apache.struts.validator.ValidatorPlugIn
initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Jun 30, 2006 9:01:52 AM org.apache.struts.validator.ValidatorPlugIn
initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Jun 30, 2006 9:01:52 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /struts-examples from URL
file:C:/Program Files/Apache Software Foundation/Tomcat 5.0
/webapps/struts-examples
Jun 30, 2006 9:01:53 AM org.apache.struts.validator.ValidatorPlugIn
initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Jun 30, 2006 9:01:53 AM org.apache.struts.validator.ValidatorPlugIn
initResources
INFO: Loading validation rules file from
'/WEB-INF/validator/validation.xml'
Jun 30, 2006 9:01:54 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /jsp-examples from URL
file:C:\Program Files\Apache Software Foundation\Tomcat 5.0
\webapps\jsp-examples
Jun 30, 2006 9:01:54 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /LoginAction from URL
file:C:\Program Files\Apache Software Foundation\Tomcat 5.0
\webapps\LoginAction
Jun 30, 2006 9:01:54 AM org.apache.catalina.startup.ContextConfig
applicationConfig
INFO: Missing application web.xml, using defaults only
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/LoginAction]
Jun 30, 2006 9:01:54 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path  from URL file:C:\Program
Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT
Jun 30, 2006 9:01:55 AM org.apache.struts.tiles.TilesPlugin
initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
Jun 30, 2006 9:01:55 AM org.apache.struts.validator.ValidatorPlugIn
initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Jun 30, 2006 9:01:55 AM org.apache.struts.validator.ValidatorPlugIn init
SEVERE: Skipping validation rules file from '/WEB-INF/vali

Re: Error while connecting to MySQL database

2006-06-30 Thread David Smith

Ok..

1. Don't mess with the CLASSPATH.  In all modern version of tomcat, the 
class loading heirarchy should take care of all your needs.


2. File ownership - make sure all of tomcat's files are owned by the 
tomcat user.  Sounds to me the db.properties file is not readable by the 
tomcat user account.  That would account for the NullPointerException 
you note below if Class.forName() is receiving a null parameter as a 
class name.


3. This is totally unrelated to tomcat, but mysql's data files should be 
owned entirely by mysql.  I would also recommend you take a look at the 
init script for mysql under /etc/init.d for details on how the path for 
it's datafiles are determined.  I've seen distributions of mysql where 
/etc/my.cnf is not present and not consulted for settings.


4. I'm sure it's been noted, but org.gjt.mm.mysql.Driver is old and very 
out of date.  You should use com.mysql.jdbc.Driver instead.


--David

navaneethan loganathan wrote:


Hi

I am sorry, as I did not mention that I have root password for mysql. I
have entered the root password(for mysql)  in my db.properties file.
I have specified in CLASSPATH as well for mysql connector in both
$CATALINA_HOME/bin/setclasspath.sh and also the user's .bash_profile.

Today morning I found the mistake I was making..
mysql(user) is owner for /var/lib/mysql.
tomcat(user) is owner for $CATALINA_HOME.
If I start  tomcat with tomcat ownership and tomcat user, I get this 
error.

When I made $CATALINA_HOME to root ownership, and start tomcat with root
user, Then the application is connecting to the database without any
problem.
However, It is working, until the database location is /var/lib/mysql. 
If I

change the database location to any other directory and specify in
/etc/my.cnf file as datadir, Then I will not be able to start MySQL 
server

even. The detail of this new error is as below while starting the MySQL
server with command # service mysqld start:

Timeout error occurred trying to start MySQL Daemon.
Starting MySQL:[FAILED]
I checked with /var/lib/mysqld.log file. It says, log as below:

060629 12:56:36  mysqld started
060629 12:56:36 [Warning] Can't create test file
/data/mysql/swt04db.lower-test
^G/usr/libexec/mysqld: Can't change dir to '/data/mysql/' (Errcode: 13)
060629 12:56:36 [ERROR] Aborting

060629 12:56:36 [Note] /usr/libexec/mysqld: Shutdown complete

060629 12:56:36  mysqld ended

I confirmed that the mysql directory inside the /data/mysql is having the
ownership of mysql:mysql with appropriate permissions.

Since the / is less disk space , I need to shft the data to /data 
(900GB).


Any clue please

On 6/29/06, Gordon Smith <[EMAIL PROTECTED]> wrote:


If Class.forName throws a null pointer exception, chances are it can't
find
the driver because you have a Tomcat configuration problem or other
classpath-related problem relating to driver setup.  Please check out 
the

documentation on tomcat.apache.org for the details for your version of
Tomcat.

As an aside, please consult the MySQL documentation about setting a root
password and disabling unneeded accounts in the database.  You are 
leaving

a
gaping security hole in your app by not establishing a root db pwd.

Once you put a root pwd in place, there's no reason to share it in this
forum as long as you can connect by using that pwd from the MySQL 
client.


Hope this helps.

Cheers,
Gordon Smith

-Original Message-
From: navaneethan loganathan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 28, 2006 7:57 PM
To: users@tomcat.apache.org
Subject: Error while connecting to MySQL database

Hi,

I am facing a problem with my Apache-Tomcat-MySQL
installation.MyEnvironment
is as follows:
Redhat ES4(2.6.9-5.EL), Apache-Tomcat-5.5.15, MySQL 4.1.12, Java version
1.5.0_06, Apache-Tomcat connector ajp13,
mysql-connector-java-3.2.0-alpha-bin.jar.

After installation and configuration I am unable to connect to the
database
through the application and getting the following exception in
catalina.outlog file.

java.lang.NullPointerException
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:164)

However, I am able to browse my site perfectly with
http://localhost/index.jsp (the connector also configured perfectly, so
that
I do not need to specify the port number in URL).
I put the mysql-connector-java-3.2.0-alpha-bin.jar file in
$CATALINA_HOME/common/lib and also specified in CLASSPATH.

I am able to login to MySQL through command and access the database
without
any problem.

My db.properties is as under:

# MySQL database access properties
db.driver = org.gjt.mm.mysql.Driver
db.url = jdbc:mysql://localhost:3306/testdb
db.user = root
db.pwd =
Any clue will be very much helpfull.Thanks in advance.


-
To start a new topic, e-mail: users@tomcat.

Re: How do I fix this error in localhost_log? javax.servlet.ServletException: Error instantiating servlet class org.apache.struts.action.ActionServlet

2006-07-03 Thread David Smith
Include the bean-utils library from 
http://jakarta.apache.org/commons/beanutils in the WEB-INF/lib directory 
of your web application.


--David

[EMAIL PROTECTED] wrote:


This is an excerpt from my localhost_log file:

2006-07-03 12:50:32 StandardContext[/strutsBlank]Marking servlet action as
unavailable
2006-07-03 12:50:32 StandardContext[/strutsBlank]Servlet /strutsBlank threw
load() exception
javax.servlet.ServletException: Error instantiating servlet class
org.apache.struts.action.ActionServlet
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1011)
 at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:887)
 at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3959)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4284)
 at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
 at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)
 at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:521)
 at
org.apache.catalina.core.StandardService.start(StandardService.java:519)
 at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:594)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
- Root Cause -
java.lang.NoClassDefFoundError: org/apache/commons/beanutils/Converter
 at java.lang.Class.getDeclaredConstructors0(Native Method)
 at java.lang.Class.privateGetDeclaredConstructors(Class.java:1618)


Thanks!


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Authentication problem -> request.getRemoteUser() returns null

2006-07-04 Thread David Smith
The connector receiving requests from httpd needs the attribute 
tomcatAuthentication set to "false" in server.xml. Otherwise tomcat will 
ignore the REMOTE-USER header provided by httpd.


-- David

Oliver Enders wrote:

Hy,

I have the following constelation:

Windows XP
Apache 2.0.58
Tomcat 4.1
Mod_jk 1.2.15

I secured one directory using htpasswd.
Calling the URL, the prompt to enter password and username pops up, and after I 
entered it correctly, the authentication ist succesfull. (also the apache log 
file contains the username).

But I can´t read out teh remote user using JSP / request.getRemoteUser() it 
returns null.

So the authentication againts apache is ok but, how can I get the infomation into my JSP-Pages ? 
How is this information passed to tomcat, which configuration setting a necessary?


Can anybody help me ?

Thanx in advance!

Oliver
  



--
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: web app application name

2006-07-05 Thread David Smith
AFAIK, it depends on the listener.  Listeners implementing 
ServletRequestListener can retrieve it from the request; for others I 
don't see a clear way.


--David

asaf.lahav wrote:




How can I obtain the name of the web application name my listener servlet is
running under in Java?


 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Serving CSS files from a certain URL

2006-07-05 Thread David Smith

In your Test.jsp, why don't you have something similar to:

location="${pageContext.request.contextPath}/css/Styles.css" />


I'm of course assuming tomcat 5.x.x and the web.xml file is declared for 
servlet spec 2.4.  This should work whether the running tomcat instance 
is on your local machine or the production server.


--David

Alec Swan wrote:


Web designers don't run web servers or servlet containers on their machines. (I call their 
environment "static"). They just create web pages using Dreamweaver and preview them in 
different browsers. So, in my running example Test.jsp would have the following relative link 
../../css/Styles.css in order for it to work in the "static" environment.

However, this relative link doesn't work when I deploy Test.jsp in Tomcat. 
Suppose I deploy my web-app under /testapp context. In this case, Test.jsp 
would have to link to the css file through one of the following links:
../testapp/css/Styles.css or
/css/Styles.css
Neither of which work in the "static" environment used by web designers.

I hope this elucidates the problem a little further. So, the question persists, 
what is the right way to get links to CSS files to work in static as well as 
deployed environment?

Thanks.

Hassan Schroeder <[EMAIL PROTECTED]> wrote: On 7/4/06, Alec Swan  wrote:

 


I need to reference Styles.css from Test.jsp in such a way that it works in 
static as well as in deployed mode. Note that for this to work in the static 
mode (no web servers or servlet containers) all paths should be relative. 
Therefore, when I deploy Test.jsp I want Tomcat either to handle relative paths 
correctly or ignore the path altogether and just serve all CSS file from a 
certain location (directory or URL).

The goal of all this is to maintain only one source tree used by web designers 
and Tomcat administrator and avoid changing paths in JSP files during 
deployment.

I would appreciate any feedback on this.
   



OK, since you asked :-)  -- this seems a really strange requirement;
are your "web designers" unable to run a Tomcat instance to work
in?

But in any case, using relative links to a css file works fine on a test
page I just did that mirrors your described files. So *exactly* how is
this not working for you?

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TC 5.5.17 / SSL - no response (5.5.15 works fine)

2006-07-07 Thread David Smith
The native connector code uses OpenSSL instead of java encryption 
classes.  The certificate formats are different.  Try a self-signed 
OpenSSL cert and see if it it works.


--David

Danny Lee wrote:

BTW: If I disable TCNative/AJP it does the trick, but damn, I wanna 
use it!



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat intialization problem

2006-07-07 Thread David Smith
I think you need to fix your networking issues before trying to setup 
tomcat.  If the link you supplied is your support case, the lo network 
interface isn't working or properly configured.  ifconfig on a console 
logged in as root should show the active network interfaces including at 
least eth0 and lo.  lo should have a inet addr of 127.0.0.1.  Tomcat 
binds it's shutdown port specifically to 127.0.0.1.  If that address 
doesn't exist on the local system, the error below will occur.


--David

Rohit Kumar wrote:


Greetings everyone,
i am having trouble initializing tomcat on Mandriva Linux.
here's the output of catalina.out:


[EMAIL PROTECTED] logs]# cat catalina.out
Jul 7, 2006 8:48:40 AM org.apache.catalina.core.AprLifecycleListener 
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in 
production environments was not found on the java.library.path: 
/usr/java/jdk1.5.0_06/jre/lib/i386/client:/usr/java/jdk1.5.0_06/jre/lib/i386:/usr/java/jdk1.5.0_06/jre/../lib/i386
Jul 7, 2006 8:48:40 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 7, 2006 8:48:40 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2198 ms
Jul 7, 2006 8:48:41 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 7, 2006 8:48:41 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
Jul 7, 2006 8:48:41 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jul 7, 2006 8:48:43 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 7, 2006 8:48:44 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jul 7, 2006 8:48:44 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/43  config=null
Jul 7, 2006 8:48:44 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jul 7, 2006 8:48:44 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3712 ms
Jul 7, 2006 8:48:44 AM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[8005]:
java.net.BindException: Cannot assign requested address
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.(ServerSocket.java:185)
at 
org.apache.catalina.core.StandardServer.await(StandardServer.java:372)
at org.apache.catalina.startup.Catalina.await(Catalina.java:615)
at org.apache.catalina.startup.Catalina.start(Catalina.java:575)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
[EMAIL PROTECTED] logs]#



As far as i understood it, its a firewall problem,i am unable to even ping 
localhost.
please see http://mandrivausers.org/index.php?showtopic=33045 for more details.

Please help resolve this problem.

Thanks,
rohit.


NAMASTE, i honour the spirit in you which is also in me.
```
http://www.geocities.com/rohitsz2
http://rohitsz.blogspot.com

-
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates 
starting at 1¢/min.
 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Includes that Forward

2006-07-07 Thread David Smith
Personally, I think it's bad design to have an include do a forward and 
then expect the forward content to replace the include.  A forward, even 
from an include, should replace the entire content of the would be 
response. 

The behavior you are looking for could be done easily (and more cleanly) 
with a little jsp logic that essentially chooses to render or perform a 
third tier include.


This is purely my opinion though.  I'll take the way Tomcat handles the 
case over the way Resin and Jetty handle it.


--David

Tim Fennell wrote:


Hi,

I'm wondering what the expected behaviour is when a JSP that is 
included from another JSP then forwards to a third JSP?  As an example:

   - start.jsp
   - some content on start.jsp
   - _include_ included.jsp
   - some content on included.jsp
   - _forward_ to forwarded.jsp
   - content on forwarded.jsp
   - some content (on included.jsp) after the forward
   - some content on start.jsp after the include

Does the above example make sense?  I was able to dig up this bug 
(which was closed INVALID) for Tomcat 4:

http://issues.apache.org/bugzilla/show_bug.cgi?id=12578

I'm using Tomcat 5.5.17 and what happens is that *only* the content on 
the inner-most forwarded page is output to the response.  Actually - 
in my case it's some code deep down in the framework causing 
exceptions to be thrown, but I believe it's the same problem as 
exhibited by the test case I've put together using three JSPs.


Now, granted, the spec does say that on Forward the response buffer 
should be cleared, and after the forward it should be closed.  So it's 
arguable that Tomcat is doing the right thing.  However, I'll point 
out that Resin and Jetty 6 both do different things here - so clearly 
how a Forward is handled *inside* of an Include is open to a lot of 
interpretation.  I think the problem is that the specification doesn't 
really address the case of a Forward happening nested inside an 
Include :/


Personally I feel like the only sensible option (from a user's 
perspective) is to treat each include in the manner of a nested 
transaction.  So in the example above, I would expect the content from 
the outer (start.jsp) page to be rendered, along with the content from 
the inner most (forwarded.jsp), but that the content from included.jsp 
would be omitted in keeping with how the servlet specification defines 
the semantics of a Forward.


Are you guys open to discussing how this is handled in Tomcat?  Btw. 
if this is a dicussion more appropriate for the dev list, just let me 
know and I'll post there instead.


-Tim Fennell
http://stripes.mc4j.org/
Stripes: Because web development should just be easier



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat manager URL configuration for 2 tomcat instances, Apache + mod_jk

2006-07-10 Thread David Smith
No, that won't work.  Copying jar files from server/lib will cause 
classloader problems.  There is a simpler way:


1. Rename manager.xml in conf/Catalina/localhost to manager-5028.xml
2. Change the path attribute in manager-5028.xml to manager-5028
3. Restart tomcat (or start if it's already stopped).
4. Change JkMount in httpd.conf to JkMount /manager-5028/html* tc5028
5. Do apachectl graceful to make httpd read the new config.

When done, the manager for 5.0.28 will be http://localhost/manager-5028/html

--David


Brian Munroe wrote:


I'm still scheming up a way to handle this.

One idea was to try and copy the manager web application from
server/webapps and place it in to the regular webapps directory as
manager-5028/

I don't know if this is any kind of security risk, but I'll worry
about that after I get things working.

Anyway, I also copied all the *.jar from server/lib and placed them in
webapps/manager-5028/lib since I don't necessarily want to put them in
shared/lib or common/lib in case I clobber something.

It doesn't seem to work, I am getting a classNoFound Error stack
trace, anyone got any ideas?

java.lang.ClassNotFoundException: 
org.apache.catalina.manager.HTMLManagerServlet
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:854) 

org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:721) 

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) 

org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) 


org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) 


org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) 


java.lang.Thread.run(Thread.java:534)

thanks

-- brian

On 7/8/06, Brian Munroe <[EMAIL PROTECTED]> wrote:


I am trying to set up an environment that has both a Tomcat 5.5.17 and
a Tomcat 5.0.28 instance running, accessed via Apache 2.0.58 + mod_jk.

Can anyone recommend a URL layout to access the different Tomcat 
managers?


My current configuration looks like this

In httpd.conf
-
JkMount /manager/html* tc5028

In workers.properties

worker.tc5028.type=ajp13
worker.tc5028.host=localhost
worker.tc5028.port=8093
...

Which works great to access the 5.0.x manager, but how can set up a
JkMount to hit the 5.5.x manager?

thanks

-- brian



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat shutdowns unexpectedly - Please help

2006-07-11 Thread David Smith
I'm no expert, but off the top of my head it appears your JVM is 
crashing.  Especially true if there is absolutely no logging data just 
before the process stops.  You may have indications of what's happening 
in other log files like syslog or a core dump file.  You may also want 
to look at bug reports for your OS and JDK.



--David

Arunan Kannan wrote:


Hi,

Please help me in guiding to find out the root cause of this problem.

Tomcat Version: jakarta-tomcat-4.1.31
Server OS: SUN OS 5.8
JDK version: j2sdk1.4.2_11

Initially the tomcat server is running perfectly and there is no problem.
There is no operation done on the server. Simply it is kept idle.
After some 3 or 4 hours the tomcat gets shutdown unexpectedly.

This happens repeatedly. Whenever I start the server, after some 3 or 4
hours it gets stopped.
There is not enough log to find the cause.

I have posted this query in lot of forum and still it is a hard luck.
I configured debug=5 in server.xml under conf directory to get maximum 
log,

then also no use.
There is no application running in the tomcat server.

Simply the when tomcat is started in this SUN server after a few ours it
stops always.
Please help me.
Please let me know if I need to give more information.

Thanks in advance,
Thanks and Regards,
Arunan




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: url changes

2006-07-11 Thread David Smith
Change the servlet mapping in Blojsom from blog/* to *.  Then change the 
name of the Blojsom webapp to blogs.  The end result is the desired URL 
such as http://www.company.com/blogs/employee.name.


Consult the Blojsom docs before making these changes to insure they work 
as expected and Blojsom is properly configured.


--David

Graham Reeds wrote:

I am setting up a website.  Part of the site is employee blogs.  As 
well as the blogs there will be forums, products, etc. making:


http://www.company.com/blogs/employee.name
http://www.company.com/forums/
http://www.company.com/products/product.name

For the blogging software I chose Blojsom.  Normally it installs into 
a blojsom folder in webapps.  However its url is:


http://www.company.com/blojsom/blogs/employee.name

I would like to remove the blojsom folder.  One way would be to 
install it to the root webapp folder.  This however, is undesirable as 
it makes setting up the rest of the site difficult.  I feel that there 
should be a way of configuring the web.xml in the WEB-INF file to give 
me the results I want.


Also we don't have access to the server as they are using 3rd party 
hosting.


If you need the web.xml (or any other file) posted then please ask.

Thanks, Graham.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: File isn't found in ROOT directory

2006-07-11 Thread David Smith

Two issue here:

1. Place the index.jsp in webapps/ROOT instead of webapps/ROOT/admin

2. ROOT context that comes with tomcat has all it's jsp files 
pre-compiled.  Your new index.jsp is being ignored in favor of the 
pre-compiled version.  Remove the servlet mapping in 
webapps/ROOT/WEB-INF/web.xml, restart tomcat (or just the ROOT webapp if 
you have the manager webapp up and running), and all should be as expected.


--David

Pid wrote:


what version of tomcat?
what have you got defined in the s in your server.xml?



McRaven, Brian wrote:
 


I have placed an index.jsp file that I created in my servers
webapps/ROOT folder.  When I place the following address in my browser:

http://localhost/index.jsp

I still come up with the tomcat homepage on my local host.  I know that
file is located in the ROOT/admin folder is there some way that my
browser is overridding my request for my index.jsp file for the tomcat
homepage index.jsp instead?  I've tried opening other jsp's that I
migrated to this folder and I get a 404 not found message when I do
this.

Brian

   



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: File isn't found in ROOT directory

2006-07-11 Thread David Smith
admin/index.jsp is a placeholder page for the admin webapp, not shipped 
with tomcat.  If you placed it there, the url would be 
http://localhost:8080/admin/index.jsp.


--David

McRaven, Brian wrote:


I commented out the servlet-mapping but I still get the tomcat page for
index.jsp.  With my installation of Tomcat there already was a folder
called admin with index.jsp in it.  I'm not sure if I was making that
clear in my last post.  I thought that was where the tomcat index.jsp
was coming from.  I notice that if I put my index.jsp in a subfolder of
the ROOT directory then I can access it.

Brian

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 11, 2006 11:32 AM

To: Tomcat Users List
Subject: Re: File isn't found in ROOT directory

Two issue here:

1. Place the index.jsp in webapps/ROOT instead of webapps/ROOT/admin

2. ROOT context that comes with tomcat has all it's jsp files
pre-compiled.  Your new index.jsp is being ignored in favor of the
pre-compiled version.  Remove the servlet mapping in
webapps/ROOT/WEB-INF/web.xml, restart tomcat (or just the ROOT webapp if
you have the manager webapp up and running), and all should be as
expected.

--David

Pid wrote:

 


what version of tomcat?
what have you got defined in the s in your server.xml?



McRaven, Brian wrote:


   

I have placed an index.jsp file that I created in my servers 
webapps/ROOT folder.  When I place the following address in my
 


browser:
 


http://localhost/index.jsp

I still come up with the tomcat homepage on my local host.  I know 
that file is located in the ROOT/admin folder is there some way that 
my browser is overridding my request for my index.jsp file for the 
tomcat homepage index.jsp instead?  I've tried opening other jsp's 
that I migrated to this folder and I get a 404 not found message when 
I do this.


Brian

  

 


-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
e-mail: [EMAIL PROTECTED]

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



   




-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Accessing a servlet

2006-07-11 Thread David Smith
Did you reload the webapp after making the change?  All changes to 
WEB-INF/web.xml or files in WEB-INF/classes and WEB-INF/lib will require 
a reload before they become active in tomcat.


--David

McRaven, Brian wrote:


I was able to refer to a book I have and so I dropped the .class
extensions altogether.  I get an error that requested resource is not
available still.  Any suggestions on this?  My web.xml file has this
entry:

   
  JustALittleTest
  JustAlittleTest
   

   
  JustALittleTest
  /JustALittleTest
   

And my action attribute="JustALittleTest".

Brian


-Original Message-
From: McRaven, Brian 
Sent: Tuesday, July 11, 2006 1:14 PM

To: users@tomcat.apache.org
Subject: Accessing a servlet

Well I'm ticking these newbie questions off.  I have a simple servlet
that I want my form to access.  I compiled the file fine and it is
called JustALittleTest.class.  I placed this file in the
ROOT/WEB-INF/classes folder.  In my JSP I have a form with some submit
buttons.  The action element of the form is set to ="JustALittleTest".
I changed my web.xml file so it now has the following entries:

   
  JustALittleTest
  JustAlittleTest.class
   

   
  JustALittleTest
  /JustALittleTest.class
   

I've tried a few changes to the above entries but I haven't gotten it
right yet.  Should the servlet-class value have a .class extension?  Is
my url pattern accessing the correct folder?

Brian

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Simple question, but can't figure out answer

2006-07-12 Thread David Smith

Hi.

I've been lurking on this thread for a while this morning.  Here's a few 
things you might want to consider


1. Your perl script to serve up images is pulling from /images according 
to what was posted.  Given that perl probably isn't chrooted to the 
directory your webapp is in, the image you are trying to access needs to 
be at /images/icc-logo.gif relative to the unix filesystem root, not 
tomcat's webapps/ROOT or any other webapps folder.


2. If you drop the HTML page test and just attempt to access the image 
directly via http://localhost/path/to/image.gif, what error do you get?


3. I take it you have the perl script for serving up images mapped to 
icc-logo.gif somehow in your config?  I'd be interested to see that part 
of your setup.


--David

Mead, Jennifer L - VSCM wrote:


I already have that.  I really don't understand but I bet it turns out
to be something stupid (on my part).  It is pretty frustrating but for
now they get no images!  Thanks for the reply.

Jen 


-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 11, 2006 4:31 PM

To: Tomcat Users List
Subject: Re: Simple question, but can't figure out answer

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ahhh...

and in webapps/ROOT/

create a directory called WEB-INF (please note capitals) that should fix
your problem...

Regards

Andrew

On 11/07/2006, at 11:53 PM, Mead, Jennifer L - VSCM wrote:

 

What this does is draw the box where the image should be.  When I 
right click on it and look at the properties and it finds the right 
file.

Just thought someone else would have ran into this 
   



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEtDShW126qUNSzvURAgtxAJwPa2jrrkN0241hVlxaxDf+eZd1bgCfbfSl
5pIOXiiNKc5pHCZHpqZlO08=
=haVp
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: HTTP Status 503 - Servlet admin.login_jsp is currently unavailable

2006-07-12 Thread David Smith
Did you store the admin webapp in server/webapps where it belongs?  Also 
check your logs.  There should be an exception trace just before the 
place where this was marked as unavailable.


--David

simon jones wrote:


Hi, can anyone help me with this one?  Thanks!

I've installed tomcat - no probs - manager works great as does the
installation but I can't get the admin working, I know this has been
posted before but I can't find a fix so I'm also providing as much
information as possible with this post.

When I call the admin page I get the following error:

HTTP Status 503 - Servlet admin.login_jsp is currently unavailable




type Status report

message Servlet admin.login_jsp is currently unavailable

description The requested service (Servlet admin.login_jsp is currently
unavailable) is not currently available.





Apache Tomcat/5.5.9

I have my admin files installed in the following locations:

/usr/local/jakarta/jakarta-tomcat-5.5.9/conf/Catalina/localhost/admin.xm
l
/usr/local/jakarta/jakarta-tomcat-5.5.9/webapps/server/webapps/admin/adm
in.xml

thanks

Simon Jones
SAQ Group

Simon Jones
SAQ Group
Tel: 0870 737 7707
VoIP: 4822813 
Fax: 0870 737 7708

[EMAIL PROTECTED]
http://www.saqnet.co.uk AS29219
SAQ Group providers of communications services for UK Business.
DSL : Domains : Email : Hosting : CoLo : Servers : Racks : Transit :
Backups : Managed Networks : Remote Support.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: HTTP Status 503 - Servlet admin.login_jsp is currently unavailable

2006-07-12 Thread David Smith
I also don't see even one reference to the admin webapp.  This tells me 
something fishy is going on.


Try this:

First, I see you copied the admin webapp to server/webapps instead of 
moving it.  Delete the admin webapp in 
/usr/local/jakarta/jakarta-tomcat-5.5.9/webapps.  It's just going to be 
confusing to leave a copy there (for both you and tomcat).


Second, there should be an admin.xml file in the same archive you got 
the admin webapp from.  That should be placed in 
/usr/local/jakarta/jakarta-tomcat-5.5.9/conf/Catalina/localhost right 
along side manager.xml.


Now restart tomcat and take a look for messages related to the admin webapp.

--David

simon jones wrote:


Hi David,

Ok looks as thought the files are in the correct place:

cp -r admin /usr/local/jakarta/jakarta-tomcat-5.5.9/server/webapps

There's nothing in tail -f
/usr/local/jakarta/jakarta-tomcat-5.5.9/logs/tomcat.log

When I do a tail and access the admin it doesn't do anything.

DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.startup.HostConfig - Checking context[] redeploy
resource
/usr/local/jakarta/jakarta-tomcat-5.5.9/webapps/ROOT/META-INF/context.xm
l
DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.startup.HostConfig - Checking context[] reload
resource
/usr/local/jakarta/jakarta-tomcat-5.5.9/webapps/ROOT/WEB-INF/web.xml
DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.startup.HostConfig - Checking context[] reload
resource /usr/local/jakarta/jakarta-tomcat-5.5.9/conf/context.xml
DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.startup.HostConfig - Checking context[/manager]
redeploy resource
/usr/local/jakarta/jakarta-tomcat-5.5.9/server/webapps/manager
DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.startup.HostConfig - Checking context[/manager]
redeploy resource
/usr/local/jakarta/jakarta-tomcat-5.5.9/conf/Catalina/localhost/manager.
xml
DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.startup.HostConfig - Checking context[/manager]
reload resource /usr/local/jakarta/jakarta-tomcat-5.5.9/conf/context.xml
DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.startup.HostConfig - Checking context[/manager]
reload resource
/usr/local/jakarta/jakarta-tomcat-5.5.9/conf/Catalina/localhost/manager.
xml
DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.loader.WebappClassLoader - modified()
DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.loader.WebappClassLoader - modified() 


-Original Message-----
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: 12 July 2006 17:38

To: Tomcat Users List
Subject: Re: HTTP Status 503 - Servlet admin.login_jsp is currently
unavailable

Did you store the admin webapp in server/webapps where it belongs?  Also
check your logs.  There should be an exception trace just before the
place where this was marked as unavailable.

--David

simon jones wrote:

 


Hi, can anyone help me with this one?  Thanks!

I've installed tomcat - no probs - manager works great as does the 
installation but I can't get the admin working, I know this has been 
posted before but I can't find a fix so I'm also providing as much 
information as possible with this post.


When I call the admin page I get the following error:

HTTP Status 503 - Servlet admin.login_jsp is currently unavailable

---
-


type Status report

message Servlet admin.login_jsp is currently unavailable

description The requested service (Servlet admin.login_jsp is currently
unavailable) is not currently available.


---
-


Apache Tomcat/5.5.9

I have my admin files installed in the following locations:

/usr/local/jakarta/jakarta-tomcat-5.5.9/conf/Catalina/localhost/admin.x
m
l
/usr/local/jakarta/jakarta-tomcat-5.5.9/webapps/server/webapps/admin/ad
m
in.xml

thanks

Simon Jones
SAQ Group

Simon Jones
SAQ Group
Tel: 0870 737 7707
VoIP: 4822813
Fax: 0870 737 7708
[EMAIL PROTECTED]
http://www.saqnet.co.uk AS29219
SAQ Group providers of communications services for UK Business.
DSL : Domains : Email : Hosting : CoLo : Servers : Racks : Transit :
Backups : Managed Networks : Remote Support.

-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
e-mail: [EMAIL PROTECTED]

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



   




-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--

Re: HTTP Status 503 - Servlet admin.login_jsp is currently unavailable

2006-07-13 Thread David Smith
There has to be some messages about the admin webapp.  The only way to 
not have any is if admin.xml is not stored in the correct place.  Even 
bad permissions should generate an exception of some sort attempting to 
read it.  So to recap, here's how your file structure looks and all the 
permissions are set correctly?:


/usr/local/jakarta/jakarta-tomcat-5.5.9
   - conf
   - Catalina
   - localhost
   ROOT.xml
   manager.xml
   admin.xml (hopefully the original as provided by the 
downloaded admin webapp distribution)

   - server
   - lib
   [server jar files here]
   - webapps
   manager
   admin
   - webapps
   - ROOT

Admittedly I've abbreviated and not included some directories.  Also, do 
you have a catalina.out log file?  What does that show.


--David

simon jones wrote:


Hi David,

Ok I did as instructed and tried the admin.  Now I get the "Tomcat's
administration web application is no longer installed by default.
Download and install the "admin" package to use it. " error.

No entries in the log either, where next?

Cheers,

Simon 

 


-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: 12 July 2006 19:58

To: Tomcat Users List
Subject: Re: HTTP Status 503 - Servlet admin.login_jsp is 
currently unavailable


I also don't see even one reference to the admin webapp.  
This tells me something fishy is going on.


Try this:

First, I see you copied the admin webapp to server/webapps 
instead of moving it.  Delete the admin webapp in 
/usr/local/jakarta/jakarta-tomcat-5.5.9/webapps.  It's just 
going to be confusing to leave a copy there (for both you and tomcat).


Second, there should be an admin.xml file in the same archive 
you got the admin webapp from.  That should be placed in 
/usr/local/jakarta/jakarta-tomcat-5.5.9/conf/Catalina/localhos

t right along side manager.xml.

Now restart tomcat and take a look for messages related to 
the admin webapp.


--David

simon jones wrote:

   


Hi David,

Ok looks as thought the files are in the correct place:

cp -r admin /usr/local/jakarta/jakarta-tomcat-5.5.9/server/webapps

There's nothing in tail -f
/usr/local/jakarta/jakarta-tomcat-5.5.9/logs/tomcat.log

When I do a tail and access the admin it doesn't do anything.

DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.startup.HostConfig - Checking context[] redeploy 
resource 
/usr/local/jakarta/jakarta-tomcat-5.5.9/webapps/ROOT/META-INF
 


/context.x
   


m
l
DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.startup.HostConfig - Checking context[] reload 
resource 
/usr/local/jakarta/jakarta-tomcat-5.5.9/webapps/ROOT/WEB-INF/web.xml

DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.startup.HostConfig - Checking context[] reload 
resource /usr/local/jakarta/jakarta-tomcat-5.5.9/conf/context.xml

DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.startup.HostConfig - Checking context[/manager] 
redeploy resource 
/usr/local/jakarta/jakarta-tomcat-5.5.9/server/webapps/manager

DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.startup.HostConfig - Checking context[/manager] 
redeploy resource 
/usr/local/jakarta/jakarta-tomcat-5.5.9/conf/Catalina/localho
 


st/manager.
   


xml
DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.startup.HostConfig - Checking context[/manager] 
reload resource 
/usr/local/jakarta/jakarta-tomcat-5.5.9/conf/context.xml

DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.startup.HostConfig - Checking context[/manager] 
reload resource 
/usr/local/jakarta/jakarta-tomcat-5.5.9/conf/Catalina/localho
 


st/manager.
   


xml
DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.loader.WebappClassLoader - modified()  DEBUG 
ContainerBackgroundProcessor[StandardEngine[Catalina]]

org.apache.catalina.loader.WebappClassLoader - modified()

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: 12 July 2006 17:38
To: Tomcat Users List
Subject: Re: HTTP Status 503 - Servlet admin.login_jsp is currently 
unavailable


Did you store the admin webapp in server/webapps where it belongs?  
Also check your logs.  There should be an exception trace 
 

just before 
   


the place where this was marked as unavailable.

--David

simon jones wrote:



 


Hi, can anyone help me with this one?  Thanks!

I've installed tomcat - no probs - manager works great as does the 
installation but I can't get the admin working, I know this 
   

has been 
   

posted before but I can't find a fix so I'm also providing as much 
information as possible with this post.


When I call the admin page I get the following

Re: HTTP Status 503 - Servlet admin.login_jsp is currently unavailable

2006-07-13 Thread David Smith
Look at permissions for admin.xml -- root.root and read/write only by 
owner?  Try doing this:


(from /usr/local/jakarta/jakarta-tomcat-5.5.9)
chown tomcat.nobody conf/Catalina/localhost/admin.xml
chown -R tomcat.nobody server/webapps/admin

Then restart tomcat

--David

simon jones wrote:


Think it is most likely me having the files in the wrong place by the
looks of it, here's my dirs with file list:

/usr/local/jakarta/jakarta-tomcat-5.5.9/conf/Catalina/localhost 


drwxr-xr-x  2 tomcat nobody 4096 Jul 12 15:27 ./
drwxr-xr-x  3 tomcat nobody 4096 Mar 26  2005 ../
-rw---  1 root   root566 Jul 12 15:27 admin.xml
-rw---  1 tomcat nobody  299 Mar 26  2005 host-manager.xml
-rw---  1 tomcat nobody  454 Mar 26  2005 manager.xml

/usr/src/apache-tomcat-5.5.17/server/webapps/admin

drwxr-xr-x  13 root root 4096 Apr 14 19:09 ./
drwxr-xr-x   3 root root 4096 Jul 10 16:53 ../
-rw-r--r--   1 root root 2151 Apr 14 19:09 admin.css
-rw-r--r--   1 root root  586 Apr 14 19:09 admin.xml
drwxr-xr-x   2 root root 4096 Apr 14 19:09 connector/
drwxr-xr-x   2 root root 4096 Apr 14 19:09 context/
drwxr-xr-x   2 root root 4096 Apr 14 19:09 host/
drwxr-xr-x   2 root root 4096 Jul 10 16:53 images/
drwxr-xr-x   2 root root 4096 Apr 14 19:09 realm/
drwxr-xr-x   2 root root 4096 Apr 14 19:09 resources/
drwxr-xr-x   2 root root 4096 Apr 14 19:09 server/
drwxr-xr-x   2 root root 4096 Apr 14 19:09 service/
-rw-r--r--   1 root root  344 Apr 14 19:09 tree-control-test.css
drwxr-xr-x   2 root root 4096 Apr 14 19:09 users/
drwxr-xr-x   2 root root 4096 Apr 14 19:09 valve/
drwxr-xr-x   3 root root 4096 Jul 10 16:53 WEB-INF/

Simon

 


-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: 13 July 2006 12:49

To: Tomcat Users List
Subject: Re: HTTP Status 503 - Servlet admin.login_jsp is 
currently unavailable


There has to be some messages about the admin webapp.  The 
only way to not have any is if admin.xml is not stored in the 
correct place.  Even bad permissions should generate an 
exception of some sort attempting to read it.  So to recap, 
here's how your file structure looks and all the permissions 
are set correctly?:


/usr/local/jakarta/jakarta-tomcat-5.5.9
   - conf
   - Catalina
   - localhost
   ROOT.xml
   manager.xml
   admin.xml (hopefully the original as provided 
by the downloaded admin webapp distribution)

   - server
   - lib
   [server jar files here]
   - webapps
   manager
   admin
   - webapps
   - ROOT

Admittedly I've abbreviated and not included some 
directories.  Also, do you have a catalina.out log file?  
What does that show.


--David

simon jones wrote:

   


Hi David,

Ok I did as instructed and tried the admin.  Now I get the "Tomcat's 
administration web application is no longer installed by default.

Download and install the "admin" package to use it. " error.

No entries in the log either, where next?

Cheers,

Simon



 


-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: 12 July 2006 19:58
To: Tomcat Users List
Subject: Re: HTTP Status 503 - Servlet admin.login_jsp is currently 
unavailable


I also don't see even one reference to the admin webapp.  
This tells me something fishy is going on.


Try this:

First, I see you copied the admin webapp to server/webapps 
   

instead of 
   

moving it.  Delete the admin webapp in 
/usr/local/jakarta/jakarta-tomcat-5.5.9/webapps.  It's just 
   

going to 
   


be confusing to leave a copy there (for both you and tomcat).

Second, there should be an admin.xml file in the same 
   

archive you got 
   

the admin webapp from.  That should be placed in 
/usr/local/jakarta/jakarta-tomcat-5.5.9/conf/Catalina/localhos

t right along side manager.xml.

Now restart tomcat and take a look for messages related to 
   

the admin 
   


webapp.

--David

simon jones wrote:

  

   


Hi David,

Ok looks as thought the files are in the correct place:

cp -r admin /usr/local/jakarta/jakarta-tomcat-5.5.9/server/webapps

There's nothing in tail -f
/usr/local/jakarta/jakarta-tomcat-5.5.9/logs/tomcat.log

When I do a tail and access the admin it doesn't do anything.

DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.startup.HostConfig - Checking 
 

context[] redeploy 
   

resource 
/usr/local/jakarta/jakarta-tomcat-5.5.9/webapps/ROOT/META-INF


 


/context.x
  

   


m
l
DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.startup.HostConfig - Checking context[] reload 
resource 
/usr/local/jakarta/jakarta-tomcat-5.5.9/webapps/ROOT/WEB-IN
 


F/web.xml
   


DEBUG ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.startup.HostConfig - Checking context[] reload 
resource /usr/local/jakarta/jakarta-tomcat-5.5.9/conf/co

Re: HowTo configure IP Filter XOR User Login

2006-07-13 Thread David Smith
I know of nothing built-in to tomcat for that.  You could implement a 
request filter to handle the job although it would mean implementing 
your own authentication.


--David

[EMAIL PROTECTED] wrote:


Hello,

I need to configure two different ways to login to an app. The first one 
is an ip filter which lets users with certain ip's enter withouth authentication. The second one is the usual user login. Both authentications
must work on an XOR basis. How can this be done? 
I recall in apache httpd there was the famous "satifies" clause. 


cheers,
Peter
 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDBC Realm error

2006-07-13 Thread David Smith
Why don't you try using the same dbURL you use in the java code -- 
"jdbc:odbc:DSNName".  Also add in the attributes connectionName for the 
auth username to the database and connectionPassword for the auth 
password to same.


--David

Propes, Barry L wrote:


I'm not sure if this is the method of which to go about posting my problem or 
issue, but here goes.

I've tried configuring my JDBC realm in Tomcat 4.0.1  the last 2 days with no 
success. Sure, I can mess up the app or get the protection to engage and kick 
to a login page, but my Oracle configuration doesn't work.

For starters, I use the following driver and can connect regularly to do 
inserts, selects and updates just fine.

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  String dbURL = "jdbc:odbc:DSNName";
  String usernm = "user_name";
  String pwd = "password";
  Connection connection = DriverManager.getConnection(dbURL, usernm, pwd);


Here are some errors I get when I do the following:
Configure the Realm like so:
-
   
-

Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Catalina.start: LifecycleException:  Exception opening database connection:  jav
a.sql.SQLException: invalid arguments in call
LifecycleException:  Exception opening database connection:  java.sql.SQLExcepti
on: invalid arguments in call
   at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)

   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307
)
   at org.apache.catalina.core.StandardService.start(StandardService.java:3
88)
--
Then, if I try configuring like the following:
--
 
-

I get this error:
---

Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Catalina.start: LifecycleException:  Exception opening database connection:  jav
a.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name too long
LifecycleException:  Exception opening database connection:  java.sql.SQLExcepti
on: [Microsoft][ODBC Driver Manager] Data source name too long
   at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)

   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307
)
   
- Root Cause -
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name too lon
g

---


any help at all would be appreciated and if I went about posing my question in the wrong manner I apologize and will be glad to receive instuctions on the proper protocol 


Barry Propes
CitiFinancial Mortgage - 
Workflow Enhancements Group

972-657-1128

 




 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Not An App Server

2006-07-13 Thread David Smith
Tomcat's not really an app server?  Geee really, I feel so inadequate 
now. :-(


Seriously, I think I've seen this religious war around here somewhere 
and it really depends on definition.  No, it's not a full J2EE 
container, but it's definitely an app server in my opinion.


Have you read the servlet spec and thought about the 
ServletContextListener for handling the start/shutdown of a component 
within your app?


--David

Mike Wannamaker wrote:


I know that Tomcat is not really an App Server like JBoss etc... However, if
I had a component that was not a web application and I wanted to start it
inside tomcat how could I do that ?

Is there some configuration file I would need to add something to in order
to have a component started and would I need to implement some Tomcat
interface to do it?

TIA
Mike Wannamaker


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDBC Realm error

2006-07-13 Thread David Smith

Is your Realm configured as follows:



You're orignal Realm won't work because you're mixing the Oracle schema 
and the JDBC-ODBC bridge connection schema.  If you use the JDBC-ODBC 
bridge, you have to use a connection string for that driver.  You could 
(and this is MUCH better in my opinion) toss the JDBC-ODBC bridge 
software and just use a true Oracle JDBC driver with a standard Oracle 
connection string.


--David

Propes, Barry L wrote:


well, Tomcat didn't like that at all!

It tries to come up (the console) and then quickly disappears!

-Original Message-----
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 13, 2006 3:00 PM
To: Tomcat Users List
Subject: Re: JDBC Realm error


Why don't you try using the same dbURL you use in the java code -- 
"jdbc:odbc:DSNName".  Also add in the attributes connectionName for the 
auth username to the database and connectionPassword for the auth 
password to same.


--David

Propes, Barry L wrote:

 


I'm not sure if this is the method of which to go about posting my problem or 
issue, but here goes.

I've tried configuring my JDBC realm in Tomcat 4.0.1  the last 2 days with no 
success. Sure, I can mess up the app or get the protection to engage and kick 
to a login page, but my Oracle configuration doesn't work.

For starters, I use the following driver and can connect regularly to do 
inserts, selects and updates just fine.

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
 String dbURL = "jdbc:odbc:DSNName";
 String usernm = "user_name";
 String pwd = "password";
 Connection connection = DriverManager.getConnection(dbURL, usernm, pwd);


Here are some errors I get when I do the following:
Configure the Realm like so:
-
  
-

Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Catalina.start: LifecycleException:  Exception opening database connection:  jav
a.sql.SQLException: invalid arguments in call
LifecycleException:  Exception opening database connection:  java.sql.SQLExcepti
on: invalid arguments in call
  at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)

  at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307
)
  at org.apache.catalina.core.StandardService.start(StandardService.java:3
88)
--
Then, if I try configuring like the following:
--

-

I get this error:
---

Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Catalina.start: LifecycleException:  Exception opening database connection:  jav
a.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name too long
LifecycleException:  Exception opening database connection:  java.sql.SQLExcepti
on: [Microsoft][ODBC Driver Manager] Data source name too long
  at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)

  at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307
)
  
- Root Cause -
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name too lon
g

---


any help at all would be appreciated and if I went about posing my question in the wrong manner I apologize and will be glad to receive instuctions on the proper protocol 


Barry Propes
CitiFinancial Mortgage - 
Workflow Enhancements Group

972-657-1128







   




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat5 installation problem

2006-07-14 Thread David Smith
Port 8005 which tomcat uses as a shutdown port is in use by another 
process. You could change that in server.xml or shutdown the service on 
8005 to fix it.


--David

Oguz Yarımtepe wrote:


Hi. I was trying to install Tomcat 5.5.17 to a windowsXP machine with
a service pack 2. I followed the instructions and first i installed
the J2sdk and then tomcat. But when i run the monitor program and
started the server the localhost:8080 didnt show me a page.

I read the logs. Used the google and did what ever i could do. Changed
the port. Restarted. Reinstalled. Still i can not see the Tomcat
running. It seems working but there is no localohost:portnumber thing.
I triedn also 127.0.0.1 for localhost or the ip of the machine but
none of them solved anything. Here is the log.

14-jul-2006 11:24:08 org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: C:\Archivos de programa\Apache Software
Foundation\Tomcat
5.5\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\Archivos 


de programa\Archivos comunes\Autodesk
Shared\;C:\ARCHIV~1\CA\SHARED~1\SCANEN~1;C:\ARCHIV~1\CA\ETRUST~1;C:\Archivos 


de programa\MySQL\MySQL Server 5.0\bin;C:\Archivos de
programa\Java\jdk1.5.0\bin
14-jul-2006 11:24:08 org.apache.coyote.http11.Http11BaseProtocol init
INFO: Inicializando Coyote HTTP/1.1 en puerto http-8080
14-jul-2006 11:24:08 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3047 ms
14-jul-2006 11:24:09 org.apache.catalina.core.StandardService start
INFO: Arrancando servicio Catalina
14-jul-2006 11:24:09 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
14-jul-2006 11:24:09 org.apache.catalina.core.StandardHost start
INFO: Desactivada la validación XML
14-jul-2006 11:24:10 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Arrancando Coyote HTTP/1.1 en puerto http-8080
14-jul-2006 11:24:11 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
14-jul-2006 11:24:11 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/46 config=null
14-jul-2006 11:24:11 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
14-jul-2006 11:24:11 org.apache.catalina.startup.Catalina start
INFO: Server startup in 2609 ms
14-jul-2006 11:24:11 org.apache.catalina.core.StandardServer await
GRAVE: StandardServer.await: create[8005]:
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.(Unknown Source)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:372)
at org.apache.catalina.startup.Catalina.await(Catalina.java:615)
at org.apache.catalina.startup.Catalina.start(Catalina.java:575)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
14-jul-2006 11:30:00 org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: C:\Archivos de programa\Apache Software
Foundation\Tomcat
5.5\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\Archivos 


de programa\Archivos comunes\Autodesk
Shared\;C:\ARCHIV~1\CA\SHARED~1\SCANEN~1;C:\ARCHIV~1\CA\ETRUST~1;C:\Archivos 


de programa\MySQL\MySQL Server 5.0\bin;C:\Archivos de
programa\Java\jdk1.5.0\bin
14-jul-2006 11:30:00 org.apache.coyote.http11.Http11BaseProtocol init
INFO: Inicializando Coyote HTTP/1.1 en puerto http-8085
14-jul-2006 11:30:00 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1219 ms
14-jul-2006 11:30:00 org.apache.catalina.core.StandardService start
INFO: Arrancando servicio Catalina
14-jul-2006 11:30:00 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
14-jul-2006 11:30:00 org.apache.catalina.core.StandardHost start
INFO: Desactivada la validación XML
14-jul-2006 11:30:02 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Arrancando Coyote HTTP/1.1 en puerto http-8085
14-jul-2006 11:30:02 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
14-jul-2006 11:30:02 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/281 config=null
14-jul-2006 11:30:02 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml

Re: Tomcat on a server

2006-07-17 Thread David Smith
Yes, but  Tomcat also pools threads and keeps them around between 
requests, recycling as necessary.  The servlet's themselves should avoid 
class instance variables unless they are reset to some known state at 
the beggining or end of every request for this reason.


--David

Alan Meyer wrote:


is it possible to have one tomcat running on a server and allow
multiple clients to execute their programs on the tomcat
running on the server without affecting other clients
execution.How can we configure tomcat for this purpose?
   



If I understand everything correctly, when Tomcat receives a
request it creates a new thread and runs the servlet in that
thread that matches the servlet or JSP requested.

Multiple requests can be processed concurrently, whether they are
requests for the same servlet or for different servlets.

Each thread will normally get its own stack for automatically
allocated variables and objects.  Depending upon how your program
is written however, it is possible for the threads to interfere
with each other if they use any static variables - so you must
use synchronization if it is required.

   Alan

Alan Meyer
[EMAIL PROTECTED]

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Problems with file permissions

2006-07-19 Thread David Smith

Two solutions, neither are 'apache' solutions:

1. Set sticky bits on the permissions on the folder so new files created 
under it adopt it's settings.

2. Configure your ftp service to correctly set permissions on upload.

Of course, I don't see where any of this has to do with tomcat, hence 
the OT marker in the subject.


---David

[EMAIL PROTECTED] wrote:


Hi Tomcat users!

I have a problem with user permissions on my web server -  when a file is 
ftp'd to the webserver the permissions are -rw-r- and browsers trying 
to access the url are forbidden to view.  Once I chmod 666 the file then 
browsers gain access.  But as my website changes constantly I don't want 
to do this every time.  Apache is owned by 'root' but I administer and own 
the site documents as 'web'.
How can I change apache to allow public access to files with read 
permissions?


Thanks for your Help!
Michele
 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Problems with file permissions

2006-07-19 Thread David Smith
We answer all kinds of questions here.  Just protocol to mark off topic 
posts as such.


In the Unix environment, the ftp service (not to be confused with the 
ftp client) can depending on vendor be configured to set permissions as 
it receives files.  I know in ProFTPd, it's set using the umask config 
setting.  Try to find out what ftp service you have on the server and 
look at it's man pages for info on what config settings are available.


Actually, it's not Apache that cares about file permissions, but the OS 
(unix in this case).  Apache may start as root, but it's workers are all 
spawned as unprivileged users (the user 'apache' in my the case of my 
server) and the OS will deny access if the apache worker doesn't at 
minimum have read access.


--David

[EMAIL PROTECTED] wrote:


Hi David,
Thanks for that and sorry for my ignorance of Apache Tomcat but I have 
just moved from an old IIS server that didn't care about the file 
permissions.  I am using ftp from Windows (using Dreamweaver)  to a Unix 
box so windows doesn't know about setting file permissions in this 
instance. 

I have put out questions on the HP side as well but I am just puzzled why 
Apache cares about file permissions instead of user/group security.


Thanks again for any help you can give.
Michele 




David Smith <[EMAIL PROTECTED]> 
No Phone Info Available

19/07/2006 15:02
Please respond to
"Tomcat Users List" 


To
Tomcat Users List 
cc

Subject
Re: [OT] Problems with file permissions






Two solutions, neither are 'apache' solutions:

1. Set sticky bits on the permissions on the folder so new files created 
under it adopt it's settings.

2. Configure your ftp service to correctly set permissions on upload.

Of course, I don't see where any of this has to do with tomcat, hence 
the OT marker in the subject.


---David

[EMAIL PROTECTED] wrote:

 


Hi Tomcat users!

I have a problem with user permissions on my web server -  when a file is 
   



 

ftp'd to the webserver the permissions are -rw-r- and browsers trying 
   



 

to access the url are forbidden to view.  Once I chmod 666 the file then 
browsers gain access.  But as my website changes constantly I don't want 
to do this every time.  Apache is owned by 'root' but I administer and 
   

own 
 


the site documents as 'web'.
How can I change apache to allow public access to files with read 
permissions?


Thanks for your Help!
Michele


   




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5/Axis 1.4 java.lang.reflect.InvocationTargetException

2006-07-20 Thread David Smith

Q1) As long as I do not referece the classes, which I believe means the
classes are not loaded, then there is not problem. When they are accessed,
then it fails. The classes are in both common, shared and webapps, where
else I am supposed to place them?

First, read the classloader howto on the tomcat website 
(http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html).  Then 
pick ONE and eliminate the others.  If the classes are used only on one 
webapp or access other classes within the webapp itself, place them in 
WEB-INF/lib or WEB-INF/classes.  Move up to shared or common only if the 
classes are used by several webapps or the engine itself.  Placing 
pooled database connection drivers in common/lib is a perfect example of 
classes accessed by the tomcat engine and the webapp.


Q2) How do I turn on Logging at the debug level in Tomcat, or any kind of
meaningful logging to figure out what is happening?

See the tomcat website for your version of tomcat.

--David

Luis Rivera wrote:


  Hi Barry and Tomcat/users/devs,

I am hoping an axis/tomcat/dev/user will have a good advise. I am sure 
more

than one user has needed to use axis/tomcat and a JNI interface, so I am
sure this has been done. I need classes in the shared context and 
classes in

the webapps context, which cause serialization/desearialization problems
when making calls among classes between the two contexts.

I write the questions here, in case a reader don't want to go through the
whole explanation below them.

Q1) As long as I do not referece the classes, which I believe means the
classes are not loaded, then there is not problem. When they are 
accessed,

then it fails. The classes are in both common, shared and webapps, where
else I am supposed to place them?

Q2) How do I turn on Logging at the debug level in Tomcat, or any kind of
meaningful logging to figure out what is happening?

Q3) Is there a way to enable remote debugging using Eclipse? ... I 
read that

it is possible, but is there any configuration in Tomcat I need to change
and does it include setting a port for it?

I found the log that has the stdout, which was showing a couple of
exceptions, which I solved by placing the appropriate jar files in the 
right
place. However, the problem didn't go away, there is something in the 
Tomcat
servlet or axis (I don't know) that is handling an exception in the 
server

side, because I have a try {} catch () {} where the problem ocurrs and I
don't catch anything, but the exception is returned to the client. Now 
not

even an exception is thrown to the stdout or staderr files.

The problems comes when in the shared/classes files I access the 
parameters
that use the classes generated by the WSDL2java tool. Those classes 
are in

both

TOMCAT_HOME/shared/classes

and

TOMCAT_HOME/webapps/axis/WEB-INF/classes

I also dropped the axis jar files in

TOMCAT_HOME/shared/lib
TOMCAT_HOME/webapp/WEB-INF/lib
TOMCAT_HOME/webapp/axis/WEB-INF/lib

but I still have a problem. At this point it would be nice to at 
leasts see
the DEBUG output from Tomcat, but I am not sure how to do that or if 
it is
something related to axis. To make this more explicit, this example 
works:


class CRLStub

...

public void getCompay(CompanyHolder company, StringHolder result)
throws java.rmi.RemoteException
{
company.value = new soap.xsd.CompanyInfo();
company.value.setCompany("Something");

result.value = "ok";
}

Now, if I try to do the following, there is no error, but obviously, the
result is not the same

class CRLStub

...

public void getCompay(CompanyInfoHolder company, StringHolder result)
throws java.rmi.RemoteException
{
jnInSharedContext.getCompany(company, result);
}

class JNIcrlInSharedContext

  ...

public void getCompany(CompanyInfoHolder company, StringHolder result)
{
   /// No problem as long as I don't access neither company or result
}

But if I do this, then I receive the
java.lang.reflect.InvocationTargetException at the client side, even if I
try to catch the exception with a try {} catch () {} pair.

public void getCompany(CompanyInfoHolder company, StringHolder result)
{
company.value = new soap.xsd.CompanyInfo();
}
I would appreciate any kind of hint,
Thanks in advance,
--Luis R.

On 7/18/06, Propes, Barry L <[EMAIL PROTECTED]> wrote:



none of the logs mention it?
I realize Tomcat does seem a bit bereft of info in the logs sometime.
Would it have been a case where it printed to the system console 
instead?
Mine does that sometimes, instead of (or in addition to) the log(s) 
and I

troubleshoot it that way.

-Original Message-
From: Luis Rivera [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 18, 2006 5:00 PM
To: Tomcat Users List
Subject: Re: Tomcat 5.5/Axis 1.4
java.lang.reflect.InvocationTargetException


Hi Shankar,

Thanks a lot. I found my problem. It turned out not to be a Classloader
problem, but a NullPointer (THANKS TO TIM FOR THE HINT :) ) problem 
in the

server, which I had not found

Re: Database Connection Error Cannot create PoolableConnectionFactory

2006-07-20 Thread David Smith
java.security.AccessControlException indicates you are running tomcat 
with the security manager.  You'll need to edit your catalina.policy 
file to allow this connection.  The policy file itself has a number of 
examples, here's just one modified to your situation below:


grant codebase 
"jar:file:${catalina.home}/common/lib/mysql-connector-java-3.14.jar!/-" {

   permission java.net.SocketPermission "127.0.0.1:3306", "connect" ;
}

--David

Bob Hall wrote:


Cameron,

You wrote:

 


I have a newly installed and configured Ubuntu
server running
Tomcat5.5 and Mysql 5.0. This server was created in
an attempt to
migrate from a Red Hat server in a similar
configuration, running the
exact same webapp. Most of the
configuration/classpath differences
between the two platforms have been ironed out.

The Problem:

When our webapp trys to connect to the database on
localhost, an exception

'java.security.AccessControlException: access denied
(java.net.SocketPermission localhost resolve)'

is generated.

   



Looks like the OS is unable to resolve localhost.
Does the ubuntu server have the following in its
/ect/hosts file?

127.0.0.1localhost

-Bob

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: log rotation

2006-07-21 Thread David Smith
catalina.out is the redirected output of tomcat -- not a product of 
log4j or commons-logging.  As such you're best bet is to have a cron job 
stop tomcat, rename the file and then restart it at say 6:00am when the 
internet hits the lowest ebb of demand.  That method should be safe for 
all OS's. 

Unix/Linux seem to handle the sudden disappearance of a file well (or at 
least better than Windows) and simply create a new one.  Just renaming 
the file without stop/start may be an option for you on *nix systems.


--David

Mirou, Antoine wrote:


Hello,

What is the easiest way to do a log rotation with tomcat ?

For example, I'd like to rotate catalina.out on a daily basis and have up to 5 
versions kept. How can I do it ?

Antoine Mirou



Ce message et toutes les pièces jointes (ci-après le « message ») sont 
confidentiels et établis à l'intention exclusive de ses destinataires. Toute 
utilisation de ce message non conforme à sa destination, toute diffusion ou 
toute publication, totale ou partielle, est interdite, sauf autorisation 
expresse. Si vous recevez ce message par erreur, merci de le détruire sans en 
conserver de copie et d'en avertir immédiatement l'expéditeur. Internet ne 
permettant pas de garantir l'intégrité de ce message, la Caisse des Dépôts et 
Consignations décline toute responsabilité au titre de ce message s'il a été 
modifié, altéré, déformé ou falsifié.

This email message and any attachments ("the email") are confidential and 
intended only for the recipient(s) indicated. If you are not an intented recipient, 
please be advised that any use, dissemination, forwarding or copying of this email 
whatsoever is prohibited without Caisse des Depots et Consignations's prior written 
consent. If you have received this email in error, please delete it without saving a copy 
and notify the sender immediately. Internet emails are not necessarily secured, and 
Caisse des Depots et Consignations declines responsibility for any changes that may have 
been made to this email after it was sent.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat fails to refresh connections when mySQL server on linux is shutdown and restarted

2006-07-24 Thread David Smith
Best practice is to store the DataSource, not the connections in your 
singelton class.  Then get a connection, perform your queries, and close 
the connection immediately.  The pool will take care of managing the 
connections including creating new ones when existing connections die 
which happens when the database server is restarted.


--David

Seetha Rao wrote:

Hi Chris, thanks for the comments. I thought since we have singleton class and creating a connection object there, we will be reusing the same connection object for all database operations. May be my thinking is not correct. Do you suggest I just create the DataSource object in the private constructor and then get connection object from the datasource when doing a 
database query/update opeartions? Yes, I will make sure I close the stmt and connection objects.


-
private static DataSource ds = null;

private DBManager() throws Exception
{
   Context init = new InitialContext();
   Context ctx = (Context) init.lookup("java:comp/env");
   ds = (DataSource) ctx.lookup("jdbc/jalasevaDB");
   
}


And then, for example, in a method to do query, 


myCon = ds.getConnection();
stmt = myCon.createStatement();

And then close the stmt and mycon.
---

What would be the effect of calling 'ds.getConnection()' for every database 
operation?

Thanks again for your guidance,
Seetha


-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 23, 2006 8:04 PM
To: [EMAIL PROTECTED]
Cc: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: Tomcat fails to refresh connections when mySQL server on
linux is shutdown and restarted


Seetha,

 


To answer Tim's question, we are not explicitly closing connection
and statement objects as the context xml has these resource parameters.

removeAbandoned="true"
removeAbandonedTimeout="60"
logAbandoned="true"
   



This probably means that you are leaking every single connection. :(

 


Shouldn't DBCP take care of creating new connection if the connection
object is stale?
   



You will be creating new Connection objects all the time -- basically
you'll never re-use a database connection, making the pool completely
irrelevant; you may as well call DriverManager.getConnection each time
you need to make a SQL query.

Even if DBCP /does/ clean up after you, you /really/ need to call
"close" on your statement, resultset, and connection objects in finally
blocks in your code. If you don't, your code will probably not work
if/when you switch to another connection pool, another app server,
another database, etc.

Most databases allocate lots of memory for each database connection on
the server side, which means that every useless connection you have
waiting around to be cleaned up by DBCP will be taking up memory on your
database server that could be used to serve actual requests.

Whether this solves your original problem or not, you definitely need to
modify your code to close all of those objects.

-chris




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't figure out directory structure (again:-(

2006-07-24 Thread David Smith
According to the configurations you posted, the full path of your login 
servlet is /smsinfo/smsinfo/login.  I doubt that was what you were 
really after.  The URL mapping in web.xml is relative to the webapp, not 
the root.


Also, if this is tomcat 5.x, you should put your  definition in 
it's own xml file in conf/Catalina/localhost.  Context definitions in 
server.xml is discouraged in newer tomcat versions.


--David

aladdin wrote:


I had this all working with some basic jsp pages and a (one) servlet.  I went
to continue to build on my application, and all of a sudden, it broke again.

I changed a lot of code (html, jsp, and java), but none of the configuration 
files,
I don't think (but, you know how that goes).  All of a sudden, it can't find the
"requested resource".  It gets through apache (so I'm assuming the workers
stuff is OK), and the message comes from tomcat.  The problem starts on a
jsp login page where the germane element is:


   


Here is the germane part of the server.xml file:
---

 




   

 
-

Here is the web.xml file:
-


http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>



 
 
 
 login
 UserConfig.login
 
 
 login
 /smsinfo/login
 


---

The login class in question is located in
/var/www/webapps/smsinfo/WEB-INF/classes/UserConfig/login.class.

This whole directory thing and where to find stuff with tomcat and apache
is getting very frustrating.

Thanks for any help!
anw


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Some tomcat config questions

2006-07-24 Thread David Smith

Third if I telnet to port 80 and issue "GET / HTTP/1.0" the "Location" header 
contain the local ip address not the public one, It's sat behind a firewall.
I tried the "server=external ip" in each connector but I still get the internal 
ip address returned, any way to fix it?


If you want to bind tomcat to a specific IP, use the address="1.2.3.4" 
attribute in the connector.


--David

Stuart Fox wrote:


Hi

First post so be kind :)

I've just run a nessus scan against one of our servers running tomcat 4.1.30 
standalone on linux and its highlighed a few problems that I cant find config 
options for.

First off is weak ssl ciphers, I've currently got 


protocol="SSLv3"
ciphers="SSL_RSA_WITH_RC4_128_MD5,SSL_RSA_WITH_RC4_128_SHA,SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA"

For eash ssl connector as suggested here 
http://www.nabble.com/SSL-Server-Supports-Weak-Encryption-Vulnerability-t1843999.html
However, nessus still says it supports weak ciphers. What have I missed?

Second it says I have UserDir enabled (like apache mod_userdir I assume) but 
again I cant find a way to disable it

Third if I telnet to port 80 and issue "GET / HTTP/1.0" the "Location" header 
contain the local ip address not the public one, It's sat behind a firewall.
I tried the "server=external ip" in each connector but I still get the internal 
ip address returned, any way to fix it?

Lastly (I think) the version header is always "Apache-Coyote/1.1", any way to change it 
to "Coyote" easily?

Thanks in advance!

Cheers

Stuart

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error please notify netXtra Ltd. Please note 
that any views or opinions presented in this email are solely those of the 
author and do not necessarily represent those of the company. This email or any 
attachments do not constitute an offer. The contents of this e-mail and any 
attachments may contain viruses that could damage your own computer systems.  
Whilst netXtra Ltd has taken every precaution to minimise this risk, we cannot 
accept liability for any damage that you may sustain as a result of viruses


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Links to relative URL's from a JSP

2006-07-24 Thread David Smith
> 2) JSP files, even though accessing image files in the same directory 
must use the previous directory, e.g.,  even 
though the images are contained in the same directory.


What does the URL in your browser look like when you are access the JSP 
pages?  The browser constructs the full path to the image from the URL 
used to request the page (JSP or HTML -- the browser doesn't know the 
difference).


> My assumption is that JSP files are "rooted" in the WEB-INF directory 
and so must use the previous directory notation back up a directory to 
access the images contained the WebContent folder where everything else is.


Nope.  They are "rooted" right where they are although internal 
forwarding can make the request URL different from the actual location 
of the JSP.  In the past, I've done stuff like src="${pageContext.request.contextPath}/WebContent/image.jpg"> to get 
around these issues with an absolute path to the image.  My example 
assumes a servlet spec 2.4 webapp and container. 


--David

Mike Molina wrote:

This thread is related to relative URL within JSP's and how they refer 
to the local directory structure in a web application.


My directory structure in Tomcat goes something like this:

webapps/inprogress/WebContent
(Accessed through Tomcat as such: 
http://127.0.0.1:8080/inprogres/WebContent


where WebContent contains my JSP and HTML files, WEB-INF, etc.

When creating img links to image files in the WebContent folder, I 
noticed


1) HTML files can use the correct local pathname, e.g., src="imagname.jpg">


however,

2) JSP files, even though accessing image files in the same directory 
must use the previous directory, e.g.,  
even though the images are contained in the same directory.


My assumption is that JSP files are "rooted" in the WEB-INF directory 
and so must use the previous directory notation back up a directory to 
access the images contained the WebContent folder where everything 
else is.


Thus, I have two questions:

1) Why does this occur, and how can I modify my xml configuration 
files so that JSP's reference links exactly as an html file in the 
same directory would?


2) How can I change the root folder of tomcat to the 
webapps/inprogress/WebContent directory, which xml files, and how 
exactly should I modify them?


Thanks,
Mike M.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setting the classpath for my application

2006-07-24 Thread David Smith
Ok. Confirmed.  Per the servlet spec, all jars in the WEB-INF/lib 
folder are included in the webapp's classloader.


Now, here are some questions that might help narrow down what's happening:

1. Is the jar a valid jar file?  Does it's internal folder structure 
mirror the package structure?
2. Are there any permission problems that might prevent tomcat from 
reading the jar file?
3. After placing this jar file in WEB-INF/lib, did you restart the 
webapp from the manager or tomcat itself?
4. Is there any indication in the logs that tomcat is having an issue 
loading your 'foo.jar' file?
5. Is foo.jar really in WEB-INF/lib or did you do some symlink/shortcut 
scheme that tomcat might not follow?


--David


Darren Hall wrote:


I wanted to confirm that jar files in the WEB-INF/lib  directory were
included in the classpath for my application. In reading through the online
documentation for Tomcat I found the following:

"WebappX - A class loader is created for each web application that is
deployed in a single Tomcat 5 instance. All unpacked classes and resources
in the /WEB-INF/classes directory of your web application archive, plus
classes and resources in JAR files under the /WEB-INF/lib directory of your
web application archive, are made visible to the containing web application,
but to no others."

I am doing exactly this. My jar file (foo.jar) is in the
webapps/abc/WEB-INF/lib directory for my 'abc' application. However, in the
Catalina log file, when Tomcat starts, I get a "ClassNotFound -
com.abc.framework.ControlServlet" error. Why can my servlet not be found if
it resides in the jar under the WEB-INF/lib directory???

Any help would be appreciated.

Thanks,

Darren



-Original Message-
From: Darren Hall [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 24, 2006 1:59 PM

To: 'Tomcat Users List'
Subject: Setting the classpath for my application

Is the fact that I'm receiving a ClassNotFound error from Tomcat's
ClassLoader for a class that I've created indicative of a bad classpath?
Are jar files stored in WEB-INF/lib automatically included in Tomcat's
classpath for my application?

If so, how do I set the classpath for my application in Tomcat?

Thanks,

Darren

-Original Message-
From: Darren Hall [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 24, 2006 11:19 AM

To: 'Tomcat Users List'
Subject: ClassNotFound - Is WEB-INF/lib in my app's classpath?

Ok, I've deployed my application in Tomcat 5.5 on Solaris using the war
deploy feature in the manager.

The application (lets call it 'foo') shows up in the manager as '/foo', so I
know that it deploys. When I look in catalina.log, I see a ClassNotFound
exception, alerting me that the ClassLoader wasn't able to find my
ControllerServlet class. Here is the error from Catalina.log:

2006-07-24 09:38:46,987 DEBUG
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] -
Sending application start events

2006-07-24 09:38:46,987 DEBUG
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] -
Starting filters

2006-07-24 09:38:47,002 INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] -
Marking servlet controller as unavailable

2006-07-24 09:38:47,002 ERROR
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] - Error
loading WebappClassLoader
 delegate: false
 repositories:
   /WEB-INF/classes/
--> Parent Classloader:
[EMAIL PROTECTED]
com.abc.framework.controller.ControlServlet
java.lang.ClassNotFoundException:
com.abc.framework.controller.ControlServlet

My ControlServlet class is located in this jar file
webapps/foo/WEB-INF/lib/abc.jar in the package
com.abc.framework.controller;.

Are the jar files in WEB-INF/lib included in my application's classpath by
default? Do I need to make a classpath change somewhere? Is the fact that
WEB-INF/lib not show up in the repositories listing above meaningful?

Why can't Tomcat's classloader find my ControlServlet class?

Thanks,

Darren


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat on Win Server 2003?

2006-07-24 Thread David Smith

Can it be installed on Win 2003 Server?  Yes.

Can't find any ref's?  Probably because it's built in Java and as such 
is intended to be platform independent.  Take a look at the downloads 
page -- there is a download that installs it as a service.


--David


maya wrote:


can Tomcat be installed in Windows Server 2003?
I have searched for ref's to Windows Server 2003 on tomcat's site 
(http://tomcat.apache.org/) but found nothing..


thanks..

-m


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help needed HTTP response header

2006-07-24 Thread David Smith
Don't think that's possible in a version of tomcat as old as the one you 
are using.  I believe that feature was added to the connectors in tomcat 
5.0.x or tomcat 5.5.x.  To get what you want in such an old (-cough- 
ancient) version of tomcat would probably require altering the source 
code and rebuilding.


--David

Surya Bob wrote:


Hi all,
 I am trying to tighten up our Apache and Tomcat implementation. I 
want

to suppress server type and version to make fingerprinting harder.
  
 HTTP response header


HTTP/1.1 200 OK
Date: Tue, 05 Nov 2002 17:49:51 GMT
Server: XXX
Set-Cookie2: JSESSIONID=naa2in3fj1;Version=1;Discard;Path="/"
Set-Cookie: JSESSIONID=naa2in3fj1;Path=/
Servlet-Engine: Tomcat Web Server/3.2.3 (JSP 1.1; Servlet 2.2; Java
  
 How can i hide the server information.it would be great if someone 
can Help me in this
  
 Thanks

 Sbob.


-
Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. 
 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Links to relative URL's from a JSP

2006-07-24 Thread David Smith

SEVERE: Error loading WebappClassLoader
 delegate: false
 repositories:
   /WEB-INF/classes/
--> Parent Classloader:
[EMAIL PROTECTED]
mm_lodging1.css
java.lang.ClassNotFoundException: catalogue.css
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352) 

[...] 



There must be something very strange with your code if a css file is 
being interpretted as a class or resource on the classpath.  How are you 
calling it?  It should be in a standard link tag in the head of your jsp 
page as in  or src="${pageContext.request.contextPath}/stylesheets/catalogue.css"/>


--David


Mike Molina wrote:

I'm beginning to see my problem is a bit more complex than I had 
mentioned.


Here is the situtation: I have two JSP's, login.jsp and 
catalogue.jsp.  Login JSP calls a servlet to do some processing. If it 
is successful, the servlet forwards the request and response objects 
to "/catalogue.jsp".


Whenever I access "catalogue.jsp" by entering in its absolute URL, 
everything works fine.  I can still have my relative img links to the 
images contained in the same folder, e.g., 


However, if "catalogue.jsp" is accessed by the servlet forwarding the 
request and response objects to "catalogue.jsp" then none of the usual 
relative URL's work.  In fact, the servlet will not even compile 
correctly:




SEVERE: Error loading WebappClassLoader
 delegate: false
 repositories:
   /WEB-INF/classes/
--> Parent Classloader:
[EMAIL PROTECTED]
mm_lodging1.css
java.lang.ClassNotFoundException: catalogue.css
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352) 


[...]



This is only remedied if I use relative links to the images beginning 
with ".." For example, if the image links are constructed like src="../image.jpg">.  Then the forwarding, runtime compilation of the 
servlet, and the image URL's in the document work fine.


To illustrate how this works, say I have 3 images, one of them with a 
"correct" relative URL location, and the other two using "../" before 
the image filename.  If I access the JSP using an absolute URL, one of 
the images will work, if I use dispatcher forwarding, 2 of them will 
work.


I am using Eclipse for development.

Sincerely,
Mike M.



From: David Smith <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" 
To: Tomcat Users List 
Subject: Re: Links to relative URL's from a JSP
Date: Mon, 24 Jul 2006 13:50:22 -0400

> 2) JSP files, even though accessing image files in the same 
directory must use the previous directory, e.g., src="../imagename.jpg"> even though the images are contained in the 
same directory.


What does the URL in your browser look like when you are access the 
JSP pages?  The browser constructs the full path to the image from 
the URL used to request the page (JSP or HTML -- the browser doesn't 
know the difference).


> My assumption is that JSP files are "rooted" in the WEB-INF 
directory and so must use the previous directory notation back up a 
directory to access the images contained the WebContent folder where 
everything else is.


Nope.  They are "rooted" right where they are although internal 
forwarding can make the request URL different from the actual 
location of the JSP.  In the past, I've done stuff like src="${pageContext.request.contextPath}/WebContent/image.jpg"> to get 
around these issues with an absolute path to the image.  My example 
assumes a servlet spec 2.4 webapp and container.


--David

Mike Molina wrote:

This thread is related to relative URL within JSP's and how they 
refer to the local directory structure in a web application.


My directory structure in Tomcat goes something like this:

webapps/inprogress/WebContent
(Accessed through Tomcat as such: 
http://127.0.0.1:8080/inprogres/WebContent


where WebContent contains my JSP and HTML files, WEB-INF, etc.

When creating img links to image files in the WebContent folder, I 
noticed


1) HTML files can use the correct local pathname, e.g., src="imagname.jpg">


however,

2) JSP files, even though accessing image files in the same 
directory must use the previous directory, e.g., src="../imagename.jpg"> even though the images are contained in the 
same directory.


My assumption is that JSP files are "rooted" in the WEB-INF 
directory and so must use the previous directory notation back up a 
directory to access the images contained the WebContent folder where 
everything else is.


Thus, I have two questions:

1) Why does this occur, and how can I modify my xml configuration 
files so that JSP's reference links exactly as an html file in the 
same directory would?


2) How can I change the root folder of tomcat to the 
webapps/inprogress/WebContent direct

Re: ResponseWrapper and sendRedirect not working

2006-07-25 Thread David Smith
I'm not seeing the complete sequence in your filter code, or even a 
redirect.  Should be something like:


doFilter(){
MyRequestWrapper reqWrapper = new MyRequestWrapper(servletRequest);
MyResponseWrapper respWrapper = new
MyResponseWrapper(servletResponse);

MyUserObj clientUser = MyUserObj.getValidUser( servletRequest ) ;
if ( ( clientUser == null ) || ( clientUser.invalid() ) )
  servletResponse.sendRedirect( "myLoginPage.jsp" ) ;
else {
  chain.doFilter(reqWrapper, respWrapper);
  respWrapper.addCookie(NAME, encrypt(myobj));
}
}


Obviously I'm not familiar with the exact API of your code, but you get 
the idea.  If the cookie isn't present or invalid, send a redirect to 
the login page.  Otherwise chain on to the next step in the request process.


--David

Mani Balasubramani wrote:


Chris,

This is the complete sequence

1)User goes to a URL (say www.some-partner-site.com)
2)He selects our app link from there which redirects him to our site
(www.paybytouch.com)
3)Filter is applied on all url's
4)The filter has a wrapper class for both request and response.
5)The doFilter calls a servlet which checks if the user is authenticated
6)If the user is not authenticated, he is redirected to a login page
(say www.paybytouch.com/login)
7)Once the user is authenticated, the servlet returns to the filter
which then creates a cookie and the reponse is sent back to the users's
browser.


What happens is that the login page is never displayed. I have validated
the flow (using debugger) and it seems to be correct. 


So I was wondering if a response wrapper needs to do anything special in
order to do a redirect.

My filter code does the following...

doFilter(){
MyRequestWrapper reqWrapper = new MyRequestWrapper(servletRequest);
MyResponseWrapper respWrapper = new
MyResponseWrapper(servletResponse);

//get cookie from request and decrypt it.

chain.doFilter(reqWrapper, respWrapper);

//create a cookie and encrypt it

respWrapper.addCookie(NAME, encrypt(myobj));
}

Any suggestions ?

-Mani
This email and any attachment(s) thereto, are intended for the use of
the addressee(s) named herein and may contain legally privileged and or
confidential information under applicable law. If you are not the
intended recipient of this e-mail, you are hereby notified any
dissemination, distribution or copying of this email, and any attachment(s)
thereto, is strictly prohibited. If you have received this communication
in error, please notify the sender at 415-281-2200 or via return e-mail at
[EMAIL PROTECTED] and permanently delete the original copy and 
any copy of any e-mail, and any printout thereof. Thank you for your 
cooperation.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where is my Tomcat

2006-07-25 Thread David Smith



OOzy Pal wrote:


On 7/25/06, Martin Gainty <[EMAIL PROTECTED]> wrote:

All Tomcat installations come with startup. and 
shutdown. located in $TOMCAT_HOME/bin
run the startup. first in some sort of console (xterm...) and 
note the errors
e.g. If it cant find $JAVA_HOME it will output debug messages to 
screem saying so


When and only when your install has been running reliably well for 
some time

place startup script in init.d
M-
*
This email message and any files transmitted with it contain 
confidential
information intended only for the person(s) to whom this email 
message is
addressed.  If you have received this email message in error, please 
notify

the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message -
From: "OOzy Pal" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Tuesday, July 25, 2006 9:58 AM
Subject: Re: Where is my Tomcat


> On 7/25/06, Martin Millnert <[EMAIL PROTECTED]> wrote:
>> On Mon, 2006-07-24 at 23:02 +0200, edward wrote:
>> > OOzy Pal wrote:
>> >
>> > >>
>> > >>
>> > >
>> > > I found the JKD but I am not sure how start tomcat. I am 
really stuck.

>> > > I am not sure what am I missing? Is there a good tutorial for
>> > > installing tomcat?
>> > >
>> > > Any help is appreciated.
>> >
>> 
>> > Chances are that the Debian tomcat init scripts point to gcj not 
to the
>> > Sun jdk. It's OK, you can fix that. Try javac -version, it will 
tell you
>> > about the compiler (which is part of the jdk, not the jre).  
Probably

>> > you will find that /usr/bin/java and about half a dozen other
>> > /usr/bin/javax commands including javac and javah are symlinks 
to the
>> > gcj versions of java somewhere in /usr/lib. So what you need to 
do is to

>> > change those symlinks to point to the Sun ones, probably in
>> > /usr/share/lib. Some distros have a command which lets you 
change the

>> > system's version of java (Gentoo does, I'm not sure about Debian)
>> > without manually editing all the symlinks.
>> >
>> 
>>
>> For reference, on a Ubuntu dapper desktop machine, here's how to 
manage

>> the symlinks:
>> [EMAIL PROTECTED]:~# which java
>> /usr/bin/java
>> [EMAIL PROTECTED]:~# ls -al /usr/bin/java*
>> lrwxrwxrwx 1 root root 22 2006-02-02 15:29 /usr/bin/java
>> -> /etc/alternatives/java
>> lrwxrwxrwx 1 root root 23 2006-03-02 14:25 /usr/bin/javac
>> -> /etc/alternatives/javac
>> lrwxrwxrwx 1 root root 25 2006-03-02 14:25 /usr/bin/javadoc
>> -> /etc/alternatives/javadoc
>> lrwxrwxrwx 1 root root 23 2006-03-02 14:25 /usr/bin/javah
>> -> /etc/alternatives/javah
>> lrwxrwxrwx 1 root root 23 2006-03-02 14:25 /usr/bin/javap
>> -> /etc/alternatives/javap
>> lrwxrwxrwx 1 root root 24 2006-03-02 14:26 /usr/bin/javaws
>> -> /etc/alternatives/javaws
>>
>> These commands does not have to be run as root, Ubuntu favours not 
using

>> the root account but sudo instead -- which is how OOzy was working.
>> The above shows and proves that the Ubuntu-style method is in fact in
>> use, and unorthodox methods has not been introduced to the 
packages. ;)

>> There are clear advantages of managing the JDKs as real packages, and
>> there is plenty of reference on this online:
>> 
http://www.google.se/search?hl=sv&q=the+correct+way+to+install+sun+java

>> +jdk+on+ubuntu&btnG=S%C3%B6k&meta=
>>
>> Ubuntu (as well as Debian) ships with the update-alternatives 
program,
>> which manages the symlinks and it is necessary to redirect these 
if you

>> have installed and are planning on using the Sun JDK.
>>
>> Example:
>>
>> [EMAIL PROTECTED]:~# update-alternatives --config java
>>
>> There are 5 alternatives which provide `java'.
>>
>>   SelectionAlternative
>> ---
>>   1/usr/lib/j2sdk1.5-sun/bin/java
>> * 2/usr/lib/j2sdk1.4-sun/bin/java
>>   3/usr/bin/gij-wrapper-4.1
>>   4/usr/bin/gij-wrapper-4.0
>>  +5/usr/lib/jvm/java-gcj/jre/bin/java
>>
>> Press enter to keep the default[*], or type selection number:
>>
>>
>> Note that this only configures the `which java`-program. You should
>> point all programs to the same version. At the very least make sure
>> "java" and "javac" are pointing to the same JDK to avoid confusion.
>> To point all programs in a one-liner, you could use:
>> [EMAIL PROTECTED]:~# cd /usr/bin && for PROGRAM in `ls java*`; do
>> update-alternatives --config $PROGRAM ; done
>>
>> If you're using the sudo administration method, modify the line
>> accordingly:
>> [EMAIL PROTECTED]:~# cd /usr/bin && for PROGRAM in `ls java*`; do sudo
>> update-alternatives --config $PROGRAM ; done
>>
>> This requires you to possibly write in the password as many times as
>> there are PROGRAMs, unless your system cache your sudo credentials.
>> A more complicated method to achieve the same result is:
>> sudo bash -c 'cd /usr/bin && for PROGRAM in `ls java*`

Re: Install tomcat on a linux (suse) V-Server (Strato)

2006-07-26 Thread David Smith
Output is redirected to catalina.out in the logs directory.  Take a look 
at that for details on what is/isn't happening.


--David

heinz rübezahl wrote:

Hi, 
i tried to install a tomcat server on a linux (suse) V-Server of strato. But it doesn't work! I had sucess at windows but anyway. I would be really thankful if you could give me some hints / tutorials / ... .


Environment: 
- on the server have been already installed Suse, Apache2, Java 1.5...


I have downloaded th newes tomcat form tomcat.apache.org. I unziped it and i have set the environment variabels JAVA_HOME ... and CATALINA_HOME. 


Then i have triggered the startup.sh it outputs environment variables. It does not 
give me any error message but i can not reach the server with the url 

If you could give me some help it would be really nice. 

Regards Christian 

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Response time banding

2006-07-26 Thread Gordon Smith
Depending on your application server topology, you might see the larger
response times as a result of bandwidth limiting or network configuration.
The issue could also be due to database access (e.g. table locking issues
that are shown during the longer response times).  

Short term DNS resolution issues also occurred to me as one of the wackier
reasons, but... I don't think that would be very likely...

Hope this helps.

G

-Original Message-
From: Edward Hibbert [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 26, 2006 1:26 PM
To: users@tomcat.apache.org
Subject: Response time banding

Odd one, this.  I'm posting looking for off the wall suggestions.
Though not too off the wall, please.

We have an application running under Tomcat.  If we analyse the response
times as measured by the access log, then we see that for the same GET
operation there is a distribution of response times.  Well, you'd expect
that.  

But while the bulk of response times are below about 0.25 seconds (in most
cases considerably below), there is a banding effect where we get a cluster
of response times around 2 seconds, and another cluster around 5 seconds,
with little or no values in between.

We've looked at garbage collection as the most likely source of this, and
ruled it out.  Has anyone seen anything similar, or got any bright ideas?

Regards,

Edward.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Initial configuration problems

2006-07-27 Thread David Smith
There isn't a lot of information to go on here. 

Are there any error messages in the logs regarding the manager webapp?  
Also could you be more specific regarding "...installing the various 
software elements, adding the environment variables...". 

You should be able to run the manager webapp right out of the box, ONLY 
adding a username, password, and a role of manager to tomcat-users.xml.


--David

Andy Kanter wrote:


I have been monitoring the emails on this list and have tried to
interpret the documentation for Tomcat 5.5.17 on the web, but I am a
total novice with Java and Apache. I am trying to test run an opensource
application on my laptop and have managed to get close, but cannot seem
to make it work. I'm working with the OpenMRS medical record for Africa,
and am running on Windows XP with MySql 5. After installing the various
software elements, adding the environment variables, modifying the
tomcat-users file to include a manager password, and starting the
service, I still cannot access Manager. I do not get prompted for a
username and password... all I get is a 404 message saying the requested
resource is not available.



Does anyone know of a simpler, step-by-step, document which will ensure
that I have made the necessary configuration modifications? I am pretty
computer savvy and this has stumped me for a week! (Also, if there is
anyone at the Univ of Cambridge (UK) who is monitoring this list and
might be of help for me at Wolfson, I'd be forever grateful).



-

Andrew S. Kanter, MD MPH

[EMAIL PROTECTED]

[EMAIL PROTECTED]


 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat and MySQL error

2006-07-27 Thread David Smith
The answer depends on how the MySQL connection is made and where.  
Tomcat doesn't offer just one way to handle this or just one place to 
configure it.  The MySQL connection string can be in server.xml or the 
web application itself. 

You might want to do a search to see where "www.old-domain.com" shows 
up.  Can be done with 'grep -R www.old-domain.com *' in Unix or use the 
Search tool in Windows and search for files containing the string 
'www.old-domain.com'.


--David

DK wrote:


Hello all, I am new to this configuration and working on an exisitng website
with MySQL database.

There is a change in the domain name / IP address and after the change in IP
address I am not able to connect to the database and I get this error when
tomcat is started.

Caused by: java.sql.SQLException: Cannot connect to MySQL server on
www.old-domain.com:3306. Is there a MySQL server running on the machine/port
you are trying to connect to? (java.net.ConnectException)

My MySQL is working fine on port 3306 - I am able to connect to the database
from the command prompt

I do not know which file I should edit and update with the new IP address /
domain name in place of www.old-domain.com, so that tomcat connects to the
database with new domain name, when tomcat is started

Any help is appreciated !
 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: apache not talking to tomcat w/ mod_jk

2006-07-27 Thread David Smith
I got the impression (and I could be wrong here) early on in this thread 
you may have dropped your jsp in the apache httpd docroot and tried it 
there.  This isn't mod_perl or one of those other modules that allow 
files to sit directly in the apache docroot or one of it's folders.


If this is the case, move your jsp to a location in webapps/ROOT of 
tomcat and try it again.


--David

Ian Caswell wrote:

I set mod_jk to log level debug, and saw it was 
telling apache "2No.Host.matches.server.name".

Did some googling, and some sites say it's a
permissions issue, but my startup script chowns
everything to "tomcat"
One page i found said it may be there's no default
context in server.xml.
(http://www.palbrattberg.com/?p=69#comments)
I added a  under my  section,
and now I see apache and tomcat talking in
netstat -an.  YAY!

However, still having issues, now instead of a blank
page, I get tomcat's 404 page when i try to load the
test HelloWorld.jsp.  I think I'm getting close, I
will turn on debug for tomcat and look for issues.

If anyone has suggestions, pls let me know.

--- John Kojo Ampia - Addison <[EMAIL PROTECTED]>
wrote:

 


have you added an Include line to the auto folder of
the tomcat conf 
directory?

If so then check your tomcat logs for error
messages...
If there aren't any introduce some intentional
errors and see if 
server.xml and httpd.conf are being loaded at all.

Then check with all the available logs...
   



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What are the advantages on tomcat5.5.17 over the tomcat4.1.29

2006-07-27 Thread David Smith
Then you need to google again.  This subject has been covered in various 
ways on the list:


1. 5.0.x and 5.5.x both support servlet spec 2.4 (4.1.x supports servlet 
spec 2.3)

2. 5.5 no longer requires a JDK.  A JRE is sufficient
3. There have been HUGE performance improvements in 5.5 (comparable to 
apache httpd these days)



I'm sure there are other advantages not listed here.  Google again and 
take a read through the tomcat docs.


--David

Raju Balugu wrote:


Hi All,

I subscribed to this list recently...and hopes somebody may asked this
question..also but i am in need of information on this.

We are planing to migrate from tomcat 4.1.29 to tomcat 5.5.17 for that i
would like to know you people what are the advantages and  
disadvantages on

tomcat 5.5.17?(I mean performance and managing ,monitoring..)

Please this is very urgent for me .I googled but didn't find the 
useful info

..

Thanks in advance..

Regards
Raju




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat , wondoze , Unable to find a javac compiler;

2006-07-27 Thread David Smith
Are the env vars User variables for your account or system variables?  
Take a look at this:


1. Click Start, then RIGHT click on My Computer.
2. Choose Properties from the pop-up menu
3. Click the Advanced tab in the System Properties window.
4. Click on the Environment Variables button
5. The resulting window has two halves.  The top is the user's 
environment, the bottom is the system.


The System variables should include JAVA_HOME.  CLASSPATH need not be 
set or can be set to something unrelated to tomcat.


--David

Randy Paries wrote:


unfortuntaly i have to setup tomcat on windoze.
i have it working on tons of linux boxs, and this has been a royle
pain. Ok enough whinning.

so when i try to display a jsp is get the error
Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK


in the tomcat monitor i have "Use default" selected

in the XP env vars i have
CLASSPATH = C:\Program Files\Java\jdk1.5.0_04\lib
JAVA_HOME = C:\Program Files\Java\jdk1.5.0_04

so what have i missed

Thanks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache - Tomcat connector

2006-07-27 Thread David Smith

Easy answer: mod_jk

Mod-jk2 lost all support and its features have been back-ported to mod_jk .

--David

Atul Govande wrote:


Hi ,

I am new to tomcat as well as Apache. I got both thing working 
independently and now I am trying to connect two together. I was 
looking different documentation and was wondering which is better way 
JK2 or Mod_JK . What is the difference?


Any input is appreciated! I am using Tomcat 5.0.0.30 and Apache 2.0.xx 
and Java 1.4.2.


 

 


Best Regards,

Atul Govande

818 717 5621

NOTE: Please note that Delta Tau no longer allows the sending or 
receiving of attachments with the extension .ZIP or .EXE. Please 
rename all .ZIP attachments to .ZZZ. Please zip all .EXE attachments 
and then rename them to .ZZZ. If you receive an attachment named .ZZZ 
please rename it to .ZIP. Sorry for the inconvenience. 

 




--
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Back to 404 problem: The requested resource (/Sisc/servlet/servle ts/PesquisaTabPeriferica) is not available

2006-07-27 Thread David Smith

And what do the logs show regarding the problem servlets?

--David

[EMAIL PROTECTED] wrote:

Dear All,

I implemented the suggestions from the list but the 404 problem still
persists.
I have an application called Sisc
Under Sisc there are package1 package2 package3... and a new package called
servlets with all my servlets (note that the name has a S at the end).
I included 'package servlets;' as first line of all servlets
The web.xml file looks like this:


http://java.sun.com/dtd/web-app_2_3.dtd";>

  Presidencia da Republica
  SISC by Siomara Pantarotto
  
  incluiMarcaPropriedade
  servlets.IncluiMarcaPropriedade

  pesquisaTabPeriferica
  servlets.PesquisaTabPeriferica
  
	  registraMarcaPropriedade

  servlets.RegistraMarcaPropriedade
  
  
  incluiMarcaPropriedade
  /servlet/servlets/IncluiMarcaPropriedade
 
  pesquisaTabPeriferica

  /servlet/servlets/PesquisaTabPeriferica
  
  registraMarcaPropriedade

  /servlet/servlets/RegistraMarcaPropriedade
  


Am I missing something
The weird thing I noticed is that sometimes the servlet
'PesquisaTabPeriferica' works fine, sometimes it does not and I get 404
message (specially when I clean browser history, delete files and off line
files). When the servlet 'PesquisaTabPeriferica' works the other one
'RegistraMarcaPropriedade' does not.
I have no clue of what is going on. This never happened to me before. I am
losing confidence regarding TOMCAT and don't know what to do. 
Can someone help me please. I do appreciate your feed back.

These are my calls from the application:

from index.htm:
...

Consultar/Manutenção Marca de Propriedade
...


from incluiMarcaPropriedade.htm:
...

///
// Validate fields and submit form elements to servlet
RegistraMarcaPropriedade
//
function doFormSubmit()
{
objfrm=document.incluiAlteraMarcaPropriedade;
//Store the file path of the next servlet/jsp to be called
strFilePath = "servlet/servlets/RegistraMarcaPropriedade"
  
	strDescricao=objfrm.txtDescricao.value;

if(isSpecialChar(strDescricao) || !isChar(strDescricao))
{
alert("Favor entrar com uma descrição válida.");
objfrm.txtDescricao.focus();
return false;
}

if(isEmpty(strDescricao))
{
alert("Campo obrigatório");
objfrm.TxtNumber.focus();
return false;
}

objfrm.method="post";
objfrm.action=strFilePath;
return true;
objfrm.submit();

}
...
Thanks a lot


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



--
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5.17 can connect to any webserver without mod_jk ?is this true?

2006-07-31 Thread David Smith
In that context, yes.  Basically you are setting up a reverse proxy from 
your Apache/IIS front-end to tomcat.  In that event, each connector in 
tomcat dedicated to a specific Apache/IIS front-end will need the 
proxyName and proxyPort attributes so it can correctly generate URL 
links.  As for the howto, it looks like you already found one.  There 
are other docs on the web.


Word of Warning: Be careful with the proxy setup in your Apache or IIS 
service that it doesn't become an open proxy.


--David

Raju Balugu wrote:

Hi Mark ,I have a doubt on this again ,I got one more link stataing we 
can

use this feature by acting as the proxy..
http://tomcat.apache.org/tomcat-5.5-doc/proxy-howto.html just have a look
and let me know ur idea.

Regards
Raju


On 7/31/06, Raju Balugu <[EMAIL PROTECTED]> wrote:



 Thanks mark .You are right. I saw this link and got good information on
connectors.

Regards
 Raju
 On 7/30/06, Mark Thomas <[EMAIL PROTECTED]> wrote:
>
> Raju Balugu wrote:
> > Hi All,
> >
> > I recently migrated to tomcat5.5.17 from 4.1.29.I got the info 
like we

> can
> > connect to any webserver wihout the mod_jk .is this true?please 
let me

> know
> > ?if yes ,how to configure that?
>
> This is not true. Take a look at
> http://tomcat.apache.org/connectors-doc/howto/index.html for links to
> web servers for which connectors are available. Be aware that Httpd
> and IIS seem to be get the most attention from a development point of
> view.
>
> Mark
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Upgrade

2006-07-31 Thread David Smith
For what it's worth, I don't think the changes between 4.0.x and 4.1.x 
are all that significant -- same servlet spec, same deployment as I 
remember.  I wouldn't be a bit surprised if the point difference in 
releases had more to do with internal restructuring than anything else.  
Start with a read through the docs, comparing them to the 4.0.x docs.


--David

[EMAIL PROTECTED] wrote:


Andrew,

  Our application is currently employed Tomcat 4.0.6. I'd like this to be 
upgraded to version 4.1.12.
  Is there documentation which explains a step by step process of how to 
do this?



Thanks,
Ibrahim




Andrew Miehs <[EMAIL PROTECTED]>
07/28/2006 09:59 AM
Please respond to "Tomcat Users List"


   To: "Tomcat Users List" 
   cc: 
   Subject:Re: Tomcat Upgrade




On 28/07/2006, at 6:55 PM, [EMAIL PROTECTED] wrote:

 


Anyone know of website which has a step by step procedure to upgrade?

   



What exactly is your problem with upgrading? The 'webapp' or the 
installation of tomcat 5?


I would just install a new version of tomcat, with the JVM that you 
want, parallel, then then install your webapp - and see what happens. 
I don't quite understand the problem...


Regards

Andrew

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you should

delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly prohibited.

Thank you.


 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Initializing Parameter

2006-07-31 Thread David Smith
ServletContextListener is a new feature of servlet spec 2.4 (tomcat 
5.0.x, 5.5.x).  The essential parts are:


1. write a class implementing the javax.servlet.ServletContextListener 
interface.  The interface itself requires two methods -- 
contextInitialized() [see below] and contextDestroyed().

2. Add the listener to your web.xml in a  attribute.
3. Deploy your app and the contextInitialized() method below will be 
executed once each time the webapp is started.


The servlet spec itself and the servlet api javadocs have complete 
information on implementing this.


--David

Ryan O'Hara wrote:


You're looking for . You can add these parameters to any
filter or servlet, or at the top-level for the entire webapp, and get
them when the filter or servlet runs (or any time you can get an
instance of the ServletContext which represents the webapp).
The usual way of doing this is to create a ServletContextListener  which
implements the init() method, grabs the values from the 
parameters, and stuffs them into the "application" scope. Although  this
is typically called the "application", you get it like this:

public void contextInitialized(ServletContextEvent sce)
{
ServletContext application = sce.getServletContext();

String myParam = application.getInitParameter("my-param");

application.setAttribute("myParam", new Integer(myParam));
}

You can pretty much do anything you'd like at this point.

Hope that helps,

-chris



Hey Chris,

Awesome, I do in fact use param-name and param-value (init-param).   
So, I understand I have to make an addition to web.xml like:



 variableName
 variableValue


However, I'm not exactly sure what I'm supposed to do after this.  I  
see that your code accounts for non-String variables by binding an  
object to the param-name (via setсttribute()), but I'm not sure of a  
couple of things.  Where would this code go that gets and sets the  
value, so that it would only run once collectively for all users (not  
once per user)?  More specifically, would this be executed during a  
restart of Tomcat?  If so, how (by what class/method)?


Thanks for your quick response.  Your help is greatly appreciated.

-Ryan




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-07-31 Thread David Smith
Is your SQL JDBC driver in common/lib?  It has to be there for tomcat to 
set it up as a resource.


Also drop the  tag from your context definition.  Not 
needed when the resource is defined inside the  tag and may 
confuse tomcat.


--David

Aynalem, Seblewengel (Trawick) wrote:


Hi there:
I am using tomcat 5.5.17 and SQL Server 2000 database with SQL Server 2005 JDBC 
Driver.  OS is Windows XP professional.  I have configured web.xml in WEB-INF 
directory and context.xml in META-INF directory of my application. Both are 
attached below with this email. I have a login.jsp page that asks for username 
and password... and when submit is hit, it gives the following error.
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' 
I tried to google and tried the suggestion given but any of them doesn't seem to work. Is there anything wrong with my configuration? PLEASE HELP...it is higly appreciated. If something is not clear, please get back to me.  Thank you so much.

context.xml file looks like this...


 		prefix="ISOTRackingTest_Log." suffix=".txt" timestamp="true"/>





web.xml looks like this...

http://java.sun.com/dtd/web-app_2_3.dtd";>

 ISOTracking
 
Welcome TO ISO Tracking Application
 

   
   ISOTracking.Login_jsp
   ISOTracking.Login_jsp
   
   
   ISOTracking.Login_jsp
   /Login.jsp
   
   
30
   


jdbc/sqlserver
javax.sql.DataSource
Container






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-07-31 Thread David Smith
he.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Jul 31, 2006 3:01:08 PM org.apache.catalina.startup.ContextConfig 
processContextConfig
SEVERE: Parse error in default web.xml
org.xml.sax.SAXParseException: Element type "Resource" must be followed by either attribute 
specifications, ">" or "/>".
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
at 
org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:781)
at 
org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:721)
at 
org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:977)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:278)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at 
org.apache.catalina.core.StandardContext.init(StandardContext.java:5130)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:3945)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at 
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Jul 31, 2006 3:01:08 PM org.apache.catalina.startup.ContextConfig 
processContextConfig
SEVERE: Occurred at line 11 column 79
Jul 31, 2006 3:01:08 PM org.apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)
Jul 31, 2006 3:01:08 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Jul 31, 2006 3:01:08 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/ISOTrackingTest] startup failed due to previous errors
Jul 31, 2006 3:01:09 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 31, 2006 3:01:10 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jul 31, 2006 3:01:10 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/70  config=null
Jul 31, 2006 3:01:10 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jul 31, 2006 3:01:10 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5147 ms

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 2:53 PM
To: Tomcat Users List
Subject: Re: org.apache

Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-07-31 Thread David Smith
at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Jul 31, 2006 3:01:08 PM org.apache.catalina.startup.ContextConfig 
processContextConfig
SEVERE: Occurred at line 11 column 79
Jul 31, 2006 3:01:08 PM org.apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)
Jul 31, 2006 3:01:08 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Jul 31, 2006 3:01:08 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/ISOTrackingTest] startup failed due to previous errors
Jul 31, 2006 3:01:09 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 31, 2006 3:01:10 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jul 31, 2006 3:01:10 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/70  config=null
Jul 31, 2006 3:01:10 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jul 31, 2006 3:01:10 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5147 ms

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 2:53 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Is your SQL JDBC driver in common/lib?  It has to be there for tomcat to 
set it up as a resource.


Also drop the  tag from your context definition.  Not 
needed when the resource is defined inside the  tag and may 
confuse tomcat.


--David

Aynalem, Seblewengel (Trawick) wrote:

 
   


Hi there:
I am using tomcat 5.5.17 and SQL Server 2000 database with SQL Server 2005 JDBC 
Driver.  OS is Windows XP professional.  I have configured web.xml in WEB-INF 
directory and context.xml in META-INF directory of my application. Both are 
attached below with this email. I have a login.jsp page that asks for username 
and password... and when submit is hit, it gives the following error.
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' 
I tried to google and tried the suggestion given but any of them doesn't seem to work. Is there anything wrong with my configuration? PLEASE HELP...it is higly appreciated. If something is not clear, please get back to me.  Thank you so much.

context.xml file looks like this...


		prefix="ISOTRackingTest_Log." suffix=".txt" timestamp="true"/>





web.xml looks like this...

http://java.sun.com/dtd/web-app_2_3.dtd";>

ISOTracking

   Welcome TO ISO Tracking Application


  
  ISOTracking.Login_jsp
  ISOTracking.Login_jsp
  
  
  ISOTracking.Login_jsp
  /Login.jsp
  
  
   30
  


jdbc/sqlserver
javax.sql.DataSource
Container






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



   
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 
   




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For ad

Re: Initializing Parameter

2006-07-31 Thread David Smith

Christopher Schultz wrote:


Ryan,

 

One more question:  What is the best method for retrieving the values? 
   



You only have one option: ServletContext.getInitParameter

There are, however, some tools that can help you load data that is not
String-based. Jakarta commons beanutils package (specifically the
'converters' portion) can help to your string-to-whatever conversions.

Hope that helps,

-chris


 

Not really.  If the question is "how do I retrieve the stuff I put in 
servletcontext?", the answer is getServletContext().getAttribute( 
attributeName ).
Then just cast the result to the type it's supposed to be (String, 
Array, Hashtable, etc., ...) since getAttribute() returns type Object 
for everything.


--David

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-07-31 Thread David Smith
Well this is supposed to be an "SQL Server 2000" database server.  
Use it's client tool to connect to the database.  If successful, your 
server is running.  I'm not familiar with the product, but if you can 
find it in the preferences, make sure you connect via TCP just like 
tomcat would.


--David

Aynalem, Seblewengel (Trawick) wrote:


Sorry to ask this... how do you verify server connection independently.  This 
is my first time configuring doing database connection. Thanks a lot,

-Original Message-----
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 3:49 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Hmmm connection refused.   Is your server listening for connections 
at jdbc:sqlserver://localhost:1433 ?  Can you verify it independently?


--David



Aynalem, Seblewengel (Trawick) wrote:

 


Thanks a lot... I do need to have a space in context.xml file.  That solved the 
problem with xml syntax.  I now seem to have problem with database connection.  
Here is the code I use to connect...

InitialContext ic=null;

DataSource ds=null;

Connection conn = null;

try {
// testing
ic = new InitialContext();
ds = (DataSource)ic.lookup("java:comp/env/jdbc/sqlserver");
conn = ds.getConnection();
} catch (Exception e) {
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw, true));
lastError = sw.toString();
System.out.println(lastError);
return false;
  }

And the error I get is this...

lasterror org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host  has failed. java.net.ConnectException: Connection refused: connect)   at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)   at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)  at ISOTracking.SessionBean.login(SessionBean.java:217)  at org.apache.jsp.ISOTracking.LoginAction_jsp._jspService(LoginAction_jsp.java:57)  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)  

Re: Servlet that needs ROOT access

2006-08-01 Thread David Smith

Is it possible to run tomcat as root?  Yes.
Is it advised? No.

I think you're on the right track with the separate process idea.  That 
would limit the opportunities presented to would be hackers.  Another 
idea, you might be able to do something with the sudo command and 
Runtime.exec() as long as you have very tight control over what commands 
are executed that way.


--David

Paul McMahon wrote:

Is it possible to run Tomcat as non ROOT (desirable as I see from FAQs/other 
threads), but have a servlet that needs ROOT access?


Or is the solution to have the servlet application code running as a separate 
daemon outside tomcat, with some form of comms to tomcat servlet when tasks 
need to be done?



-Paul

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5.17 can connect to any webserver without mod_jk ?is this true?

2006-08-01 Thread David Smith
mod_proxy is the old proxy that Apache has had since 1.3 or earlier.  
Basic idea is to pass on the incoming request to another server.  
mod_proxy_ajp was introduced in Apache 2.2 to extend the mod_proxy 
module with the ability to pass client HTTP requests back to a tomcat 
instance via the AJP/1.3 protocol.  Think if it as incorporating the 
functions of mod_jk into mod_proxy.


--David

Raju Balugu wrote:


Thanks to David Smith and Mark Thomas .

What is the difference between mod_proxy_ajp and mod_proxy?Could you 
please

give details
on that?

Regards
Raju




On 8/1/06, Mark Thomas <[EMAIL PROTECTED]> wrote:



Raju Balugu wrote:
> Hi Mark ,I have a doubt on this again ,I got one more link stataing we
can
> use this feature by acting as the proxy..
> http://tomcat.apache.org/tomcat-5.5-doc/proxy-howto.html just have a
look
> and let me know ur idea.

This isn't *any* web server as per your previous post it is a specific
one. Different question, hence different answer.

If you are going to use mod_proxy then why not go the whole way and
use mod_proxy_ajp?

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-08-01 Thread David Smith
And you are sure your test with the client software was via TCP, not 
some other piped/ODBC connection scheme?  I'm guessing this is a Windows 
system.  Have you checked your firewall for allowing the connections?  
Also try using TCPMon from sysinternals.org to see what's happening with 
connections to the database.  It's good at showing net connection on a 
Windows box in real time.


--David

Aynalem, Seblewengel (Trawick) wrote:


Thanks David.  I am able to connect to SQL Server 2000. Actually Tomcat 5.5.17 
and SQL Server 2000 is on the same machine that I am working on. Could there be 
any other cause for this error:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
PoolableConnectionFactory (The TCP/IP connection to the host  has failed. 
java.net.ConnectException: Connection refused: connect)

-Original Message-----
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 4:21 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Well this is supposed to be an "SQL Server 2000" database server.  
Use it's client tool to connect to the database.  If successful, your 
server is running.  I'm not familiar with the product, but if you can 
find it in the preferences, make sure you connect via TCP just like 
tomcat would.


--David

Aynalem, Seblewengel (Trawick) wrote:

 


Sorry to ask this... how do you verify server connection independently.  This 
is my first time configuring doing database connection. Thanks a lot,

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 3:49 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Hmmm connection refused.   Is your server listening for connections 
at jdbc:sqlserver://localhost:1433 ?  Can you verify it independently?


--David



Aynalem, Seblewengel (Trawick) wrote:



   


Thanks a lot... I do need to have a space in context.xml file.  That solved the 
problem with xml syntax.  I now seem to have problem with database connection.  
Here is the code I use to connect...

InitialContext ic=null;

DataSource ds=null;

Connection conn = null;

try {
   // testing
ic = new InitialContext();
   ds = (DataSource)ic.lookup("java:comp/env/jdbc/sqlserver");
   conn = ds.getConnection();
   } catch (Exception e) {
   StringWriter sw = new StringWriter();
   e.printStackTrace(new PrintWriter(sw, true));
   lastError = sw.toString();
System.out.println(lastError);
return false;
 }

And the error I get is this...

lasterror org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host  has failed. java.net.ConnectException: Connection refused: connect)   at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)   at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)  at ISOTracking.SessionBean.login(SessionBean.java:217)  at org.apache.jsp.ISOTracking.LoginAction_jsp._jspService(LoginAction_jsp.java:57)  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1

Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-08-01 Thread David Smith
I think you have your answer.  The SQL Server is not setup to listen on 
1433 or not running.  Address this and things should start working.


--David

Aynalem, Seblewengel (Trawick) wrote:

Thanks David, Raju and Johnny for your time and valuable suggestions.  


To David's question:  I checked Client Network Utility service for SQL server 
2000 and saw that TCP/IP is enabled on port 1433.  I do check the firewall, yes 
it was on.  It has the option of adding exceptions to allow programs/service to 
connect to the machine.  So I added SQL server 2000 on port 1433. I did netstat 
-an on command prompt to see active connection... but port 1433 is not listed.  
I also used sysinternals.org as suggested and SQL Server is not listed. This 
might mean SQL Server is not using TCP/IP on port 1433???

To Raju's question... I have tried to read and re-read tomcat manual... I will check if there is anything I missed.  I am also trying to see how I can apply the solution suggested on the link provided.  


Jonny - SQL Server is installed as default instance... TCP/IP was enabled on 
port 1433.

Any further help is higly appreciated.  

Thanks a lot. 


-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 01, 2006 8:26 AM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


And you are sure your test with the client software was via TCP, not 
some other piped/ODBC connection scheme?  I'm guessing this is a Windows 
system.  Have you checked your firewall for allowing the connections?  
Also try using TCPMon from sysinternals.org to see what's happening with 
connections to the database.  It's good at showing net connection on a 
Windows box in real time.


--David

Aynalem, Seblewengel (Trawick) wrote:

 


Thanks David.  I am able to connect to SQL Server 2000. Actually Tomcat 5.5.17 
and SQL Server 2000 is on the same machine that I am working on. Could there be 
any other cause for this error:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
PoolableConnectionFactory (The TCP/IP connection to the host  has failed. 
java.net.ConnectException: Connection refused: connect)

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 4:21 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Well this is supposed to be an "SQL Server 2000" database server.  
Use it's client tool to connect to the database.  If successful, your 
server is running.  I'm not familiar with the product, but if you can 
find it in the preferences, make sure you connect via TCP just like 
tomcat would.


--David

Aynalem, Seblewengel (Trawick) wrote:



   


Sorry to ask this... how do you verify server connection independently.  This 
is my first time configuring doing database connection. Thanks a lot,

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 3:49 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Hmmm connection refused.   Is your server listening for connections 
at jdbc:sqlserver://localhost:1433 ?  Can you verify it independently?


--David



Aynalem, Seblewengel (Trawick) wrote:



  

 


Thanks a lot... I do need to have a space in context.xml file.  That solved the 
problem with xml syntax.  I now seem to have problem with database connection.  
Here is the code I use to connect...

InitialContext ic=null;

DataSource ds=null;

Connection conn = null;

try {
  // testing
ic = new InitialContext();
  ds = (DataSource)ic.lookup("java:comp/env/jdbc/sqlserver");
  conn = ds.getConnection();
  } catch (Exception e) {
  StringWriter sw = new StringWriter();
  e.printStackTrace(new PrintWriter(sw, true));
  lastError = sw.toString();
System.out.println(lastError);
return false;
}

And the error I get is this...

lasterror org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host  has failed. java.net.ConnectException: Connection refused: connect)   at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)   at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)  at ISOTracking.SessionBean.login(SessionBean.java:217)  at org.apache.jsp.ISOTracking.LoginAction_jsp._jspService(LoginAction_jsp.java:57)

Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory?

2006-08-01 Thread David Smith
I'm responding to the first message in the thread, but have read all of 
it.  A thought:


How are you opening this file?  Hopefully it's via 
ServletContext.getResourceAsStream( "/myapp/conf/myapp.properties" ) ;


--David

Robinson, Eric wrote:


Hello all,

When I start tomcat, I get several messages like these:

   java.io.FileNotFoundException:
/usr/local/tomcat5/webapps/myapp/conf/myapp.properties (No such file or
directory)

This file actually exists in
/home/myaccount/tomcat5/webapps/myapp/conf/myapp.properties

I have $CATALINA_BASE set to /home/myaccount/tomcat5

My instance of tomcat is starting mostly fine. I can connect to it on my
custom port and see my own default page, but for some reason tomcat is
still looking for "myapp" in the directory specified by $CATALINA_HOME.

Someone please take a moment and give me some tips on why this might be
happening.

Thanks much,


--
Eric Robinson





Disclaimer - August 1, 2006 
This email and any files transmitted with it are confidential and intended solely for [EMAIL PROTECTED] If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physician Select Management (PSM) or Physician's Managed Care (PMC). Warning: Although the message sender has taken reasonable precautions to ensure no viruses are present in this email, neither PSM nor PMC can accept responsibility for any loss or damage arising from the use of this email or attachments.
 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory?

2006-08-01 Thread David Smith
Fair enough.  Are the JSPs, servlets, etc., ... all being called from 
the /home/myaccount/tomcat5/webapps directory? 

Here's where I'm going with this: 

If resources like this properties file are being opened from the wrong 
location, but other webapp resources (images, jsps, servlets, etc., ...) 
are being served up from the proper location, it could be the result of 
bugs in your third party webapp.  Maybe it's reliant on a hard coded 
path or a relative path to the current directory at the time tomcat was 
started.


--David

Robinson, Eric wrote:


Sorry, I cannot answer that question as I am not the developer. Although
I called it "myapp" for simplicty, it is really a third-party
application. 


--
Eric Robinson


-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 01, 2006 8:23 AM

To: Tomcat Users List
Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong
Directory?

I'm responding to the first message in the thread, but have read all of
it.  A thought:

How are you opening this file?  Hopefully it's via
ServletContext.getResourceAsStream( "/myapp/conf/myapp.properties" ) ;

--David

Robinson, Eric wrote:

 


Hello all,

When I start tomcat, I get several messages like these:

  java.io.FileNotFoundException:
/usr/local/tomcat5/webapps/myapp/conf/myapp.properties (No such file or
directory)

This file actually exists in
/home/myaccount/tomcat5/webapps/myapp/conf/myapp.properties

I have $CATALINA_BASE set to /home/myaccount/tomcat5

My instance of tomcat is starting mostly fine. I can connect to it on 
my custom port and see my own default page, but for some reason tomcat 
is still looking for "myapp" in the directory specified by
   


$CATALINA_HOME.
 


Someone please take a moment and give me some tips on why this might be
   



 


happening.

Thanks much,


--
Eric Robinson





Disclaimer - August 1, 2006
This email and any files transmitted with it are confidential and
   


intended solely for [EMAIL PROTECTED] If you are not the named
addressee you should not disseminate, distribute, copy or alter this
email. Any views or opinions presented in this email are solely those of
the author and might not represent those of Physician Select Management
(PSM) or Physician's Managed Care (PMC). Warning: Although the message
sender has taken reasonable precautions to ensure no viruses are present
in this email, neither PSM nor PMC can accept responsibility for any
loss or damage arising from the use of this email or attachments.
 




   




-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory?

2006-08-01 Thread David Smith
Hmmm. and the plot thickens.  Have you asked the vendor about this 
issue?  Can they offer any insights as to how they access the 
myapp.properties file?


--David

Robinson, Eric wrote:


David,

I do not know if the 3rd party app has hard-coded paths. I grepped for
tomcat in the app directory and below and I see a couple of places where
it is doing a System.GetProperty("tomcat.home"), but that's about it.

--
Eric Robinson


-Original Message-----
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 01, 2006 8:55 AM

To: Tomcat Users List
Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong
Directory?

Fair enough.  Are the JSPs, servlets, etc., ... all being called from
the /home/myaccount/tomcat5/webapps directory? 

Here's where I'm going with this: 


If resources like this properties file are being opened from the wrong
location, but other webapp resources (images, jsps, servlets, etc., ...)
are being served up from the proper location, it could be the result of
bugs in your third party webapp.  Maybe it's reliant on a hard coded
path or a relative path to the current directory at the time tomcat was
started.

--David

Robinson, Eric wrote:

 

Sorry, I cannot answer that question as I am not the developer. 
Although I called it "myapp" for simplicty, it is really a third-party 
application.


--
Eric Robinson


-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 01, 2006 8:23 AM
To: Tomcat Users List
Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong 
Directory?


I'm responding to the first message in the thread, but have read all of
   



 


it.  A thought:

How are you opening this file?  Hopefully it's via 
ServletContext.getResourceAsStream( "/myapp/conf/myapp.properties" ) ;


--David

Robinson, Eric wrote:



   


Hello all,

When I start tomcat, I get several messages like these:

 java.io.FileNotFoundException:
/usr/local/tomcat5/webapps/myapp/conf/myapp.properties (No such file 
or

directory)

This file actually exists in
/home/myaccount/tomcat5/webapps/myapp/conf/myapp.properties

I have $CATALINA_BASE set to /home/myaccount/tomcat5

My instance of tomcat is starting mostly fine. I can connect to it on 
my custom port and see my own default page, but for some reason tomcat
 



 


is still looking for "myapp" in the directory specified by
  

 


$CATALINA_HOME.


   

Someone please take a moment and give me some tips on why this might 
be
  

 




   


happening.

Thanks much,


--
Eric Robinson





Disclaimer - August 1, 2006
This email and any files transmitted with it are confidential and
  

 

intended solely for [EMAIL PROTECTED] If you are not the named 
addressee you should not disseminate, distribute, copy or alter this 
email. Any views or opinions presented in this email are solely those 
of the author and might not represent those of Physician Select 
Management
(PSM) or Physician's Managed Care (PMC). Warning: Although the message 
sender has taken reasonable precautions to ensure no viruses are 
present in this email, neither PSM nor PMC can accept responsibility 
for any loss or damage arising from the use of this email or
   


attachments.
 




   

  

 


-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
e-mail: [EMAIL PROTECTED]

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



   




-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   3   4   5   6   7   8   9   10   >