Re: Keycloak-adapter compatible version

2023-10-15 Thread Alex

Hi.

On 2023-10-13 (Fr.) 08:29, Navya wrote:

Thanks for the reply
Currently in tomcat 9 I am using   Keycloak Adapter version of 21.1.2
KEYCLOAKSUBDIR = 21.1.2
KEYCLOAKVERSION = keycloak-oidc-tomcat-adapter-$(KEYCLOAKSUBDIR)


A fast search in the Internet shows that this adapter is Deprecated.

https://html.duckduckgo.com/html?q=keycloak%2Doidc%2Dtomcat%2Dadapter
\
  https://www.keycloak.org/docs/latest/securing_apps/#openid-connect
  \
   https://www.keycloak.org/docs/latest/securing_apps/#_tomcat_adapter

Hth
Alex


On Fri, Oct 13, 2023 at 11:47 AM Bernd Schatz
 wrote:


Hi Navya,


Am 13.10.23 um 07:49 schrieb Navya:

I am trying to upgrade the tomcat 9 to 10 version, May I know which

version

of the keycloak adapter is compatible with tomcat10?



Which or what kind of ,,keycloak adapter'' do you use with your
current tomcat9 version ?


--
Greets
 Bernd Schatz




-
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: Difference between versions

2022-08-22 Thread Alex

Hi Mohan.

On 21.08.22 04:45, Mohan T wrote:

Dear All,

Just want to know if there are any major differences between the below tomcat 
versions.

Server version
Apache Tomcat/8.5.35

Server built:
Nov 3 2018 17:39:20 UTC
unknown
Server number:
8.5.35.0
8.5.x
Status
Working fine
Error
Error message
No error message .
[AD Thread Pool-Global1] 
org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading 
Illegal access: this web application instance has been stopped already. Could 
not load [org.springframework.context.ApplicationContextInitializer]. The 
following stack trace is thrown for debugging purposes as well as to attempt to 
terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance 
has been stopped already. Could not load 
[org.springframework.context.ApplicationContextInitializer]. The following 
stack trace is thrown for debugging purposes as well as to attempt to terminate 
the thread which caused the illegal access

When we deploy a application it throws error. Is there any reason because of 
the tomcat version.


Have you read the answer from Thomas 
https://lists.apache.org/thread/tdqx7pn7g269dyhv13gtrf5gx3myvx7f ?


Looks like you have answered your own question.

https://lists.apache.org/thread/0y0ch2qxzwzoq6rny1zr2q4h3g7gr01y

```
In one of the logs I could see the below error message .

org.apache.catalina.core.ApplicationContext.log
No Spring WebApplicationInitializer types detected on classpath
```

Have you asked the Application Development People how to deploy there 
Application on tomcat?


There are several hits in internet search engines for the log message.

https://html.duckduckgo.com/html?q=No%20Spring%20WebApplicationInitializer%20types%20detected%20on%20classpath

Maybe some of the hits may solve your topic.



Thanks

Mohan


Regards
Alex

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



Re: Difference between versions

2022-08-22 Thread Alex

Dear Mohan.

your E-Mail address is invalid!

moha...@ramco.com.INVALID

That does not helps to support you.

Regards

Alex

On 22.08.22 16:17, Alex wrote:

Hi Mohan.

On 21.08.22 04:45, Mohan T wrote:

Dear All,

Just want to know if there are any major differences between the 
below tomcat versions.


Server version
Apache Tomcat/8.5.35

Server built:
Nov 3 2018 17:39:20 UTC
unknown
Server number:
8.5.35.0
8.5.x
Status
Working fine
Error
Error message
No error message .
[AD Thread Pool-Global1] 
org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading 
Illegal access: this web application instance has been stopped 
already. Could not load 
[org.springframework.context.ApplicationContextInitializer]. The 
following stack trace is thrown for debugging purposes as well as to 
attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application 
instance has been stopped already. Could not load 
[org.springframework.context.ApplicationContextInitializer]. The 
following stack trace is thrown for debugging purposes as well as to 
attempt to terminate the thread which caused the illegal access


When we deploy a application it throws error. Is there any reason 
because of the tomcat version.


Have you read the answer from Thomas 
https://lists.apache.org/thread/tdqx7pn7g269dyhv13gtrf5gx3myvx7f ?


Looks like you have answered your own question.

https://lists.apache.org/thread/0y0ch2qxzwzoq6rny1zr2q4h3g7gr01y

```
In one of the logs I could see the below error message .

org.apache.catalina.core.ApplicationContext.log
No Spring WebApplicationInitializer types detected on classpath
```

Have you asked the Application Development People how to deploy there 
Application on tomcat?


There are several hits in internet search engines for the log message.

https://html.duckduckgo.com/html?q=No%20Spring%20WebApplicationInitializer%20types%20detected%20on%20classpath 



Maybe some of the hits may solve your topic.



Thanks

Mohan


Regards
Alex

-
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: Difference between versions

2022-08-23 Thread Alex

Hi Mark.

On 23.08.22 08:32, Mark Thomas wrote:

On 23/08/2022 00:36, Alex wrote:

Dear Mohan.

your E-Mail address is invalid!

moha...@ramco.com.INVALID


That isn't something the OP has done. That change is made by the ASF 
mail servers else many subscribers won't receive list emails.


https://blogs.apache.org/infra/search?q=munging



That does not helps to support you.


Just reply to the list and the OP will see the response.


Thank you Mark for clarification and please accept my apologize for lack 
of knowledge and the noise.



Mark


Regards
Alex



Regards

Alex

On 22.08.22 16:17, Alex wrote:

Hi Mohan.

On 21.08.22 04:45, Mohan T wrote:

Dear All,

Just want to know if there are any major differences between the 
below tomcat versions.


Server version
Apache Tomcat/8.5.35

Server built:
Nov 3 2018 17:39:20 UTC
unknown
Server number:
8.5.35.0
8.5.x
Status
Working fine
Error
Error message
No error message .
[AD Thread Pool-Global1] 
org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [org.springframework.context.ApplicationContextInitializer]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web 
application instance has been stopped already. Could not load 
[org.springframework.context.ApplicationContextInitializer]. The 
following stack trace is thrown for debugging purposes as well as to 
attempt to terminate the thread which caused the illegal access


When we deploy a application it throws error. Is there any reason 
because of the tomcat version.


Have you read the answer from Thomas 
https://lists.apache.org/thread/tdqx7pn7g269dyhv13gtrf5gx3myvx7f ?


Looks like you have answered your own question.

https://lists.apache.org/thread/0y0ch2qxzwzoq6rny1zr2q4h3g7gr01y

```
In one of the logs I could see the below error message .

org.apache.catalina.core.ApplicationContext.log
No Spring WebApplicationInitializer types detected on classpath
```

Have you asked the Application Development People how to deploy there 
Application on tomcat?


There are several hits in internet search engines for the log message.

https://html.duckduckgo.com/html?q=No%20Spring%20WebApplicationInitializer%20types%20detected%20on%20classpath

Maybe some of the hits may solve your topic.



Thanks

Mohan


Regards
Alex

-
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



Re: Receiving HTTP (any version but 3 prefered) over UDP

2022-12-12 Thread Alex

Hi.

On 11.12.22 17:44, Shawn Heisey wrote:

On 12/10/22 15:15, Aryeh Friedman wrote:

Is there any browser support for direct UDP sockets in any browser
besides Chrome? I know WebRTC and Websockets force TCP. I know
Chrome does support UDP but can find no evidence one way for the other
browsers.


I'm sure you know that if Chrome is doing it, you can be sure that the 
other browsers either already do or are planning to have it in a new 
release very soon.



As far I can tell there are no web servers and/or major hosting
companies (i.e. AWS, etc.) that support UIUC/HTTP3.  For that reason,
I am playing with different options for making a stripped down UDP
HTTP server (prefer 3 but forcing TLS seems to be a deal breaker for
anyone except name brand sites like Google -- E.g. my main client had
a total cow over the $500/yr fee for a Comodo multi-domain cert even
though due to being healthcare it is a legal requirement.)


I'm not in touch with which of the major web servers can do H3/QUIC. 
Almost all of my web servers are behind haproxy, to offload TLS and make 
decisions about which webserver will receive each request.  Except in 
cases where it just wasn't possible for one reason or another (like 
plex) all backend communication in haproxy is unencrypted.  At this 
time, haproxy only supports H3/QUIC on the front end, not the back end. 
Most of the backends are h2c, some only do http/1.1.  (side note ... I 
am still seeing http/1.0 requests in my logs, and even a few 0.9.)


If I ever find myself in a situation where I need to make a container 
like Tomcat reachable from the Internet, I will be using haproxy as the 
front end, not the common choice of Apache of Nginx.  The only reason I 
can see for using one of those webservers is to have a separate logfile 
for each domain.  The log that haproxy produces is good enough for me.


JFYI: There are some Webservers out there which already support H3.

Caddyserver https://caddyserver.com/docs/caddyfile/options#protocols
H2o https://github.com/h2o/h2o/

There is a overview page about interoperability of different Quic and H3 
Tools

https://interop.seemann.io/

I have another haproxy installation in AWS on my mail server, configured 
the same way as the main install in my basement. Mostly for my webmail, 
but I do have a few other websites on that install.  It handles 
UDP/443.  This little website is running on my AWS instance:


https://http3test.elyograg.org/

If you visit that page and look at the cert, you'll see it's made by 
LetsEncrypt.  Renewal and deployment of that cert is completely 
automated, so the 90 day lifetime is not the administrative hassle that 
it could be.  I am planning to implement the same automated LE 
certificate deployment at $DAYJOB that I already have for my personal 
domains.  I work for a company that handles healthcare data, and nobody 
has raised a concern about HITRUST not allowing free certificates.


Thanks,
Shawn


Regards
Ales

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



Feature request for SSL Valve

2021-02-24 Thread Alex

Hi.

I try to setup HAProxy to send some TLS Information's to tomcat.

As described in the documentation of SSL Valve are several parameters available 
and

most of them are also available in HAProxy.

http://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#SSL_Valve

The only parameter which is not able to use is sslClientCertHeader because

this header expects a PEM formatted certificate but HAProxy can

send the certificate in DER format.

http://cbonte.github.io/haproxy-dconv/2.3/configuration.html#7.3.4-ssl_c_der

Where can I add the Feature request to be this feature be considered

to be added into tomcat ssl valve?

Regards
Alex

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



Re: Feature request for SSL Valve

2021-02-25 Thread Alex

Christopher.

Thank you for your answer.

On 25.02.21 21:10, Christopher Schultz wrote:

Alex,

On 2/24/21 22:05, Alex wrote:

Hi.

I try to setup HAProxy to send some TLS Information's to tomcat.

As described in the documentation of SSL Valve are several parameters available 
and

most of them are also available in HAProxy.

http://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#SSL_Valve

The only parameter which is not able to use is sslClientCertHeader because

this header expects a PEM formatted certificate but HAProxy can

send the certificate in DER format.

http://cbonte.github.io/haproxy-dconv/2.3/configuration.html#7.3.4-ssl_c_der

Where can I add the Feature request to be this feature be considered

to be added into tomcat ssl valve?


Hmm. Sending binary data in an HTTP header field? You are going to definitely 
find some problems there.

Or were you going to try something like:

   http-request set-header X-Client-Certificate %[ssl_c_der,base64]

As suggested here: https://serverfault.com/a/859328 ?


I got also a similar answer on the haproxy list.

http-request add-header X-SSL-Client-Cert -BEGIN\ CERTIFICATE-\ 
%[ssl_c_der,base64]\ -END\ CERTIFICATE-\ # don't forget last space

https://www.mail-archive.com/haproxy@formilux.org/msg39893.html


If so, you are base64-encoding a DER value which is essentially a PEM-formatted 
value :)

But sure, it seems like adding this kind of thing would be okay. Are you able 
to provide a patch/PR?

-chris


Regards
Alex

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



Question about TLS/SSL setup and SSLHostConfig or not

2021-03-02 Thread Alex

Hi.

I try to make a "good" tomcat config and read the docs.

Now in the Connector doc is the following statement.

http://tomcat.apache.org/tomcat-9.0-doc/config/http.html#SSL_Support
http://tomcat.apache.org/tomcat-10.0-doc/config/http.html#SSL_Support

Each secure connector must define at least one SSLHostConfig.

But when I look into the SSL/TLS Configuration How-To is the snipplet
without SSLHostConfig. What's now the "best" way to setup TLS/SSL
with tomcat. I would prefer to put SSLHostConfig but I'm not sure if
it's the way how the developer think to setup the TLS in tomcat?

I use JSSE as implementation.

http://tomcat.apache.org/tomcat-9.0-doc/ssl-howto.html
http://tomcat.apache.org/tomcat-10.0-doc/ssl-howto.html

```


```

What's your suggestion and opinion to configure the tomcat in a
proper way to use TLS also for the future versions.

Regards
Alex

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



Re: Question about TLS/SSL setup and SSLHostConfig or not

2021-03-02 Thread Alex

Hi.

On 02.03.21 23:14, John Larsen wrote:

I usually let the apache webserver or nginx handle the SSL while proxying
to the tomcat.  To use tomcat's built in server you'll need to import the
SSL certificate into the keystore via your jdk.


Fully agree, but sometimes it is requierd that the HAProxy/nginx talk TLS to
the backend, in this case tomcat.


John Larsen



On Tue, Mar 2, 2021 at 3:06 PM Alex  wrote:


Hi.

I try to make a "good" tomcat config and read the docs.

Now in the Connector doc is the following statement.

http://tomcat.apache.org/tomcat-9.0-doc/config/http.html#SSL_Support
http://tomcat.apache.org/tomcat-10.0-doc/config/http.html#SSL_Support

Each secure connector must define at least one SSLHostConfig.

But when I look into the SSL/TLS Configuration How-To is the snipplet
without SSLHostConfig. What's now the "best" way to setup TLS/SSL
with tomcat. I would prefer to put SSLHostConfig but I'm not sure if
it's the way how the developer think to setup the TLS in tomcat?

I use JSSE as implementation.

http://tomcat.apache.org/tomcat-9.0-doc/ssl-howto.html
http://tomcat.apache.org/tomcat-10.0-doc/ssl-howto.html

```


```

What's your suggestion and opinion to configure the tomcat in a
proper way to use TLS also for the future versions.

Regards
Alex

-
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: Question about TLS/SSL setup and SSLHostConfig or not

2021-03-02 Thread Alex

On 02.03.21 23:50, Peter Kreuser wrote:

Alex,


Am 02.03.2021 um 23:19 schrieb Alex :

Hi.


On 02.03.21 23:14, John Larsen wrote:
I usually let the apache webserver or nginx handle the SSL while proxying
to the tomcat.



Unless you need some really fancy rewriting or caching, Tomcat is absolutely 
capable to handle this. Even static files are OK nowadays.



To use tomcat's built in server you'll need to import the
SSL certificate into the keystore via your jdk.


That’s not the case anymore. Tomcat 8.5.x perfectly speaks PEM-files and 
openssl config. (See below)

Even dynamic reloading of SSL configs can be achieved with the jmxproxy.



Fully agree, but sometimes it is requierd that the HAProxy/nginx talk TLS to
the backend, in this case tomcat.


John Larsen

On Tue, Mar 2, 2021 at 3:06 PM Alex  wrote:
Hi.

I try to make a "good" tomcat config and read the docs.

Now in the Connector doc is the following statement.

http://tomcat.apache.org/tomcat-9.0-doc/config/http.html#SSL_Support
http://tomcat.apache.org/tomcat-10.0-doc/config/http.html#SSL_Support

Each secure connector must define at least one SSLHostConfig.

But when I look into the SSL/TLS Configuration How-To is the snipplet
without SSLHostConfig. What's now the "best" way to setup TLS/SSL
with tomcat. I would prefer to put SSLHostConfig but I'm not sure if
it's the way how the developer think to setup the TLS in tomcat?

I use JSSE as implementation.

http://tomcat.apache.org/tomcat-9.0-doc/ssl-howto.html
http://tomcat.apache.org/tomcat-10.0-doc/ssl-howto.html

```


```



You should move this to SSLHostConfig.


Thank you for the clarification, I will do it.


 
   
 

HTH

Peter


What's your suggestion and opinion to configure the tomcat in a
proper way to use TLS also for the future versions.

Regards
Alex



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



RE: DigestAthenticator and session registeration

2006-07-13 Thread Alex
Sure, I am sorry I didn't know about emails being grouped as threads. This
was my first question on the list.

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 13, 2006 6:16 PM
To: Tomcat Users List
Subject: Re: DigestAthenticator and session registeration

When starting a new thread (ie sending a message to the list about a
new topic) please do not reply to an existing message and change the
subject line. To many of the list archiving services and mail clients
used by list subscribers this  makes your new message appear as part
of the old thread. This makes it harder for other users to find
relevant information when searching the lists.

This is known as thread hijacking and is behaviour that is frowned
upon on this list. Frequent offenders will be removed from the list.
It should also be noted that many list subscribers automatically
ignore any messages that hijack another thread.

The correct procedure is to create a new message with a new subject.
This will start a new thread.

Mark
tomcat-user-owner


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



Mod_JK 1.2.25 Incorrect Object Returned

2009-03-10 Thread alex

Hi All,

I hope this is the correct list to post the following issue to, apologies
if it isn't.

I am currently supporting a number of Apache 2.0.59 server with Mod_JK
1.2.25, connecting to a jboss backend.  Most of the time the system runs
without any problems, however sometimes users can receive data from another
users session... I know sounds like a load of rubbish (that's what I though
when I first heard the problem.).  Sometimes (seemingly at random) a users
browser will make a request, and the wrong object will be returned.

For example when sitting on an arbitrary page, just hitting refresh (with
caching disabled in the browser), I can eventually end up with a gif being
pulled by the browser, instead of the web page...
I've looked into it with tcpdump, and confirmed that that a valid http
request is sent by the browser, but apache returns a gif image (its not
redirected, the gif is returned as the data for that url).  I've also
confirmed that the correct data is returned from jboss to apache (using
tcpdump), so I'm confident the issue lies with with apache/mod_jk

I have seen a couple of issues in the change logs from more recent versions
of mod_jk, but unfortunately there's no specific information on the problem
and we're not in a position to upgrade either apache or mod_jk currently.

I guess I'm really asking is this an issue people have seen before? Is it a
bug in mod_jk, or could it be something else?  I was thinking it could be
something to do with the connection pool mod_jk uses to connect to
jboss Do people think using "JkOption +DisableReuse" may help? (I know
its a horrible work around the issue)

Thanks in advance!

Alex



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



JAXB 2 and JAXB 1 in the WEB-INF/lib folder

2010-04-21 Thread Alex

Hi there,

I'm running a tomcat 6, spring, apache cxf webservice, know it is a must to
add one third party library to my webapp to fulfill an order.

I have jaxb-impl-2.1.12.jar for apache cxf in WEB-INF/lib folder and the 
new

library which contains the JAXB 1.0 runtime.

JAXB 2 ist used by apache cxf for dynamic clients (i need them).

So is there a possibility to run the webapps with both libraries?

Best regards Alex

Caused by: java.lang.LinkageError:
You are trying to run JAXB 2.0 runtime but you have old JAXB 1.0 runtime 
earlier in the classpath.

Please remove the JAXB 1.0 runtime for 2.0 runtime to work correctly.

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



related to bad url encoding?...

2011-02-20 Thread alex

hi all,
I get 404 err, if I add %D0 to url, but I get just blank page if I add 
%zD0 . I'm supposed to get bad request in this case. how do I fix this 
problem?



thanks.

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



Re: related to bad url encoding?...

2011-02-21 Thread alex

Mark Thomas wrote:

On 21/02/2011 04:25, alex wrote:

hi all,
I get 404 err, if I add %D0 to url, but I get just blank page if I add
%zD0 . I'm supposed to get bad request in this case. how do I fix this
problem?


Check the response headers.

If you don't see a 400 response, exactly which Tomcat version are you using?

Mark

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



I used 6.0.24 .
http://localhost:8080/examples/servlets/%D0 returns 404
http://localhost:8080/examples/servlets/%zD0 returns blank page



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



Re: related to bad url encoding?...

2011-02-22 Thread alex

alex wrote:

Mark Thomas wrote:

On 21/02/2011 04:25, alex wrote:

hi all,
I get 404 err, if I add %D0 to url, but I get just blank page if I add
%zD0 . I'm supposed to get bad request in this case. how do I fix this
problem?


Check the response headers.

If you don't see a 400 response, exactly which Tomcat version are you 
using?


Mark

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



I used 6.0.24 .
http://localhost:8080/examples/servlets/%D0 returns 404
http://localhost:8080/examples/servlets/%zD0 returns blank page



Can anyone tell me if it's a bug or a problem on my side?
thanks.


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



Re: related to bad url encoding?...

2011-02-22 Thread alex

Mark Thomas wrote:

On 22/02/2011 13:27, alex wrote:

alex wrote:

Mark Thomas wrote:

On 21/02/2011 04:25, alex wrote:

hi all,
I get 404 err, if I add %D0 to url, but I get just blank page if I add
%zD0 . I'm supposed to get bad request in this case. how do I fix this
problem?

Check the response headers.

If you don't see a 400 response, exactly which Tomcat version are you
using?

Mark

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


I used 6.0.24 .
http://localhost:8080/examples/servlets/%D0 returns 404
http://localhost:8080/examples/servlets/%zD0 returns blank page



Can anyone tell me if it's a bug or a problem on my side?
thanks.


Again, look at the response *headers*.

Mark

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



Mark,
it does return 400 code, but in my app I set:
...
   
400
/WEB-INF/error.jsp
  
   
404
/WEB-INF/error.jsp
  
.

and tomcat doesn't show it. this custom err page is shown for 404 code, 
but not for 400...

Can you give me a hint why?
thanks again.








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



Re: related to bad url encoding?...

2011-02-22 Thread alex

André Warnier wrote:

alex wrote:

Mark Thomas wrote:

On 22/02/2011 13:27, alex wrote:

alex wrote:

Mark Thomas wrote:

On 21/02/2011 04:25, alex wrote:

hi all,
I get 404 err, if I add %D0 to url, but I get just blank page if 
I add
%zD0 . I'm supposed to get bad request in this case. how do I fix 
this

problem?

Check the response headers.

If you don't see a 400 response, exactly which Tomcat version are you
using?

Mark

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


I used 6.0.24 .
http://localhost:8080/examples/servlets/%D0 returns 404
http://localhost:8080/examples/servlets/%zD0 returns blank page



Can anyone tell me if it's a bug or a problem on my side?
thanks.


Again, look at the response *headers*.

Mark

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



Mark,
it does return 400 code, but in my app I set:
...
   
400
/WEB-INF/error.jsp
  
   
404
/WEB-INF/error.jsp
  
.

and tomcat doesn't show it. this custom err page is shown for 404 
code, but not for 400...

Can you give me a hint why?
thanks again.


probably because :
because of the bad URL, Tomcat never even "maps" this call to your 
application, 


shouldn't it be 404 error if tomcat can't map "this call"?



so it sends its own 400 error page (as Konstantin already > explained, I 
believe).





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



Re: related to bad url encoding?...

2011-02-22 Thread alex

Mark Thomas wrote:

On 22/02/2011 17:26, Caldarale, Charles R wrote:
From: alex [mailto:alex.alex.alex.9...@gmail.com] 
Subject: Re: related to bad url encoding?...

shouldn't it be 404 error if tomcat can't map "this call"?

Tomcat 7 has introduced revised handling for situations where there is no ROOT 
webapp; you might want to try that.  Regardless, you still can only use a 
custom error page on a mapping failure if you've got a default webapp (ROOT) 
and configure ROOT's WEB-INF/web.xml for it.


It isn't going to help in this case. The URL is not valid so it is
correctly rejected by the connector with a 400 response. Since the URL
is invalid, it can't reliably be used to map it to a web application so
there is no opportunity to use an application generated/supplied error page.


so, what do I do if I need to show error in this scenario and I run 
standalone tomcat?
can I do it in custom filter/connector or the only solution to place 
tomcat behind apache?






Mark

PS The change in 7 just returns a 404 rather than a 400 for requests to
/ when there is no ROOT web application defined.





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



How to solve "To prevent a memory leak"

2010-09-16 Thread Alex

 Hi,

I run an web application which uses spring, hibernate, apache-cxf and 
the quartz scheduler which is referenced by spring.


The webapp work as it should, but on shutdown or restart the apache 
tomcat server I always get following output.


The webapp is not stopped and I have to kill the process manually.

How can I solve this?

Thank you, Alex

from catalina.out
Sep 16, 2010 3:19:13 PM org.apache.catalina.loader.WebappClassLoader 
clearReferencesJdbc
SEVERE: The web application [/erv] registered the JBDC driver 
[com.mysql.jdbc.Driver] but failed to unregister it when the web 
application was stopped. To prevent a memory leak, the JDBC Driver has 
been forcibly unregistered.
Sep 16, 2010 3:19:13 PM org.apache.catalina.loader.WebappClassLoader 
clearReferencesThreads
SEVERE: The web application [/erv] appears to have started a thread 
named [schedulerFactoryBeanERV_Worker-1] but has failed to stop it. This 
is very likely to create a memory leak.
Sep 16, 2010 3:19:13 PM org.apache.catalina.loader.WebappClassLoader 
clearReferencesThreads
SEVERE: The web application [/erv] appears to have started a thread 
named [schedulerFactoryBeanERV_Worker-2] but has failed to stop it. This 
is very likely to create a memory leak.


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



Re: How to solve "To prevent a memory leak"

2010-09-16 Thread Alex

 Thank for your response!

The MySql driver is in $TOMCAT/webapps/xxx/lib.
I using Hibernate as OMR Mapper with Spring 3.0, here my 
hibernateApllicationContext.xml (partial)
destroy-method="close">


















How can I search the ServletContext for specific objects?

Alex

Am 2010-09-16 15:43, schrieb Ognjen Blagojevic:

On 16.9.2010 15:32, Alex wrote:

I run an web application which uses spring, hibernate, apache-cxf and
the quartz scheduler which is referenced by spring.

The webapp work as it should, but on shutdown or restart the apache
tomcat server I always get following output.

The webapp is not stopped and I have to kill the process manually.

How can I solve this?


Are you using connection pooling provided by tomcat? Did you put MySQL 
driver to $TOMCAT/lib or $TOMCAT/webapps/xxx/lib? Or both? If you are 
using connection pooling keep your driver just in $TOMCAT/lib folder.


If threads schedulerFactoryBeanERV_Worker-x, are created by Quartz, 
find how can you stop them, and to that with ContextListener you will 
register in web.xml.


Also, read http://wiki.apache.org/tomcat/OutOfMemory.

Regards,
Ognjen

-
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: How to solve "To prevent a memory leak"

2010-09-16 Thread Alex
 It seem that moving the MySql driver to $tomcat/lib solves the problem 
with the jdbc connection,

buut the problem with quartz still exists.

I'm using tomcat 6.0.29

I wrote a listener :
public class ServletContextAttribListener implements 
ServletContextListener, ServletContextAttributeListener {


public void contextInitialized(ServletContextEvent e) {
System.out.println("Context "+ e.getServletContext() +" 
initialized");

}

public void contextDestroyed(ServletContextEvent e) {
System.out.println(e.getServletContext().toString());
}

public void attributeAdded(ServletContextAttributeEvent e) {
System.out.println("Added attribute "+ e.getName()+" with value 
"+e.getValue());

}

public void attributeRemoved(ServletContextAttributeEvent e) {
System.out.println("Removed attribute "+ e.getName()+" with 
value "+e.getValue());

}

public void attributeReplaced(ServletContextAttributeEvent e) {
System.out.println("Replaced attribute "+ e.getName()+" with 
value "+e.getValue());

}
}

to check what is loaded but all what comes out is:

Added attribute 
org.springframework.web.context.support.ServletContextScope with value 
org.springframework.web.context.support.servletcontextsc...@13c2d7f
Added attribute 
org.springframework.web.context.WebApplicationContext.ROOT with value 
Root WebApplicationContext: startup date [Thu Sep 16 16:32:12 CEST 
2010]; root of context hierarchy

Context org.apache.catalina.core.applicationcontextfac...@ec0b80 initialized

Alex

Am 2010-09-16 15:37, schrieb Caldarale, Charles R:

From: Alex [mailto:devns...@gmail.com]
Subject: How to solve "To prevent a memory leak"
The webapp work as it should, but on shutdown or restart the apache
tomcat server I always get following output.
The webapp is not stopped and I have to kill the process manually.
How can I solve this?

Fix your webapp to properly dispose of any threads it starts.  Since your 
webapp started them, it's up to your webapp to stop them.  You probably want to 
use an appropriate lifecycle listener (as defined in the servlet spec) to do 
the necessary housekeeping.

  - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
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



[Tomcat] nashorn on jdk17 in tomcat 11

2024-11-21 Thread Alex O'Ree
I'm running into a bit of a strange problem with attempting to get a
nashorn script working on jdk17 in tomcat 11. it works fine outside of
tomcat but always fails to start inside tomcat.

I suspect it has something to do with the just in time compiler, but the
error messages are so cryptic that it's difficult to tell what's going on.
And of course there's next to no search results on the internet about this.

Has anyone out there in the tomcat user community attempted this or have an
insight as to what the issue could be?


Re: Need help tomcat

2023-10-02 Thread Alex O'Ree
Assuming windows sc delete servicename

On Mon, Oct 2, 2023, 7:44 AM jean-frederic clere  wrote:

> On 10/1/23 09:02, Deepak Lalchandani wrote:
> > I have deleted and Uninstalled all tomcat services but despite that the
> > tomcat service exists in services window . I want to delete the services
> > permanently which is not happening
> >
> > Please help
> >
> > Deepak
> >
>
> Have you tried to remove the service using
> https://commons.apache.org/proper/commons-daemon/procrun.html
>
> //DS is the option to delete the service
>
> --
> Cheers
>
> Jean-Frederic
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Long lasting websocket sessions

2024-02-09 Thread Alex O'Ree
I've been experimenting with tomcat 9.x in seeing how long i can get a web
socket session to last. I'm currently struggling to get past 30 minutes or
so. Looking for guidance on how to best increase this or if this is a bad
idea.

Here's the current configuration and what i've tried thus far:

The server continuously streams messages the client, about 1 per second
The client periodically (every 30 seconds) sends a keep alive text message
back to the server
The server side endpoint sets the Session.setTimeout(0); according to the
docs, this should prevent timeouts
The server side WAR file/WEB-INF/web.xml had a session timeout defined at
15 minutes but i then removed it in order to increase the websocket
duration.

Despite all this, both the client and server log a session disconnect, but
i'm still not sure what the reasoning is. I'm still assuming it's some kind
of timeout mechanism.


Re: Long lasting websocket sessions

2024-02-16 Thread Alex O'Ree
No devices in-between, browser to local host. Good feedback though, I'll
try to reproduce with the snake app
Thanks!

On Fri, Feb 16, 2024, 2:47 PM Chuck Caldarale  wrote:

>
> > On Feb 16, 2024, at 11:31, Mark Thomas  wrote:
> >
> > On 09/02/2024 13:47, Alex O'Ree wrote:
> >> I've been experimenting with tomcat 9.x in seeing how long i can get a
> web
> >> socket session to last. I'm currently struggling to get past 30 minutes
> or
> >> so. Looking for guidance on how to best increase this or if this is a
> bad
> >> idea.
> >> Here's the current configuration and what i've tried thus far:
> >> The server continuously streams messages the client, about 1 per second
> >> The client periodically (every 30 seconds) sends a keep alive text
> message
> >> back to the server
> >> The server side endpoint sets the Session.setTimeout(0); according to
> the
> >> docs, this should prevent timeouts
> >> The server side WAR file/WEB-INF/web.xml had a session timeout defined
> at
> >> 15 minutes but i then removed it in order to increase the websocket
> >> duration.
> >> Despite all this, both the client and server log a session disconnect,
> but
> >> i'm still not sure what the reasoning is. I'm still assuming it's some
> kind
> >> of timeout mechanism.
> >
> > I think you need to do a little more investigation with your
> application. I've been running the snake WebSocket example on 9.0.x for
> over any hour wihtout any issues.
>
>
> Are there any boxes (eg, load balancer, firewall) between the client and
> server that might be forcibly dropping TCP connections after 30 minutes?
>
>   - Chuck
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Speeding up tomcat

2024-03-25 Thread Alex Hatcher


Java version: 11.0.20

Tomcat version: 9.0.59


OS Version: Windows Server 2022 Datacenter Azure Edition

Azure VM Type and Specs: D8s v3

8 CPU 32 GiB Mem

VM Generation V2

VM Architecture   x64

Location   East US Zone 1



We have a traditional client/server application from a third-party vendor that 
has a couple second delay when accessing certain items (tabs) in their Web UI.  
The delay has been traced down to the webserver, which runs Tomcat.  The 
application and database servers do not appear to have any significant delays.



When an item is clicked inside the web UI, a call from the web server is made 
to the app and DB server, which come back fairly quickly.  It's at the point 
where data is delivered from the app server to the web server that tomcat on 
the webserver CPU usage spikes.  In reviewing the web server with procmon 
running, we noticed that tomcat is reading a lot of class files during the time 
we are waiting for the task to complete to render the page.   Approximately 
55,000 (yes 55000) classes read each click.



The vendor has reviewed this and said it's nothing to worry about, but we 
cannot find any other significant task that tomcat is doing during this wait 
state that a web client experiences.



We have sql tracing showing microsecond response times.



Developer console in chrome shows it waiting for 1.9 (Avg) seconds per click.



We would like to get to the root cause of this slowness, whether it is the 
operating system, Azure VM, webserver or vendor application causing the issue.






Notice: This e-mail message is confidential and is intended only for the use of 
the individual and/or entity identified in the address line of this message. If 
you have received this message in error, or are not the named recipient(s), 
please notify us immediately by telephone (888-479-9111)
M_LEGAL_NOTICE


RE: Speeding up tomcat

2024-04-05 Thread Alex Hatcher
To follow up with my request for help.

we made 3 adjustments.

added in org.apache.jasper.servlet.JspServlet

checkInterval
300


development
false


server.xml


context.xml
added


Response times on the website went from average of 3seconds per click to 
average of 1.5seconds per click to complete the page load.



-Original Message-
From: Christopher Schultz 
Sent: Monday, March 25, 2024 6:37 PM
To: users@tomcat.apache.org
Subject: Re: Speeding up tomcat

[You don't often get email from ch...@christopherschultz.net. Learn why this is 
important at https://aka.ms/LearnAboutSenderIdentification ]

[EXTERNAL]

Alex,

On 3/25/24 13:06, Alex Hatcher wrote:
> Java version: 11.0.20
> Tomcat version: 9.0.59

Are you able to upgrade these? Your Tomcat is nearly 2 years old and your Java 
is ... I'm not sure how old. This will have nothing to do with performance. 
Just security and general stability.

> OS Version: Windows Server 2022 Datacenter Azure Edition
>
> Azure VM Type and Specs: D8s v3
>
> 8 CPU 32 GiB Mem
>
> VM Generation V2
>
> VM Architecture   x64
>
> Location   East US Zone 1
>
>
>
> We have a traditional client/server application from a third-party
> vendor that has a couple second delay when accessing certain items
> (tabs) in their Web UI.  The delay has been traced down to the
> webserver, which runs Tomcat.  The application and database servers do
> not appear to have any significant delays.
>
> When an item is clicked inside the web UI, a call from the web server
> is made to the app and DB server, which come back fairly quickly.
> It's at the point where data is delivered from the app server to the
> web server that tomcat on the webserver CPU usage spikes.  In
> reviewing the web server with procmon running, we noticed that tomcat
> is reading a lot of class files during the time we are
> waiting for the task to complete to render the page.   Approximately
> 55,000 (yes 55000) classes read each click.

Ouch.

> The vendor has reviewed this and said it's nothing to worry about, but
> we cannot find any other significant task that tomcat is doing during
> this wait state that a web client experiences.

Are you able to see the duration of that 55000 class file read? How have you 
observed that Tomcat is reading all those files? Once an application is started 
and humming-along, Tomcat shouldn't be reading too many class files at all.

Reasons I can think of for reading lots of class files:

1. Auto-reload is enabled, and your class files have timestamps in the future. 
This would basically restart your application completely every few seconds. I 
think you'd notice.

2. You have disabled caching of your  and, for some reason, you are 
constantly searching through them for something.

3. You have an application-level scan for classes which is not using Tomcat's 
(usually cached) loader to locate classes. In this case, I would say that your 
application should (a) be loading though Tomcat and
(b) probably not scanning classes all the time :)

> We have sql tracing showing microsecond response times.
>
> Developer console in chrome shows it waiting for 1.9 (Avg) seconds per click.
>
>
>
> We would like to get to the root cause of this slowness, whether it is the 
> operating system, Azure VM, webserver or vendor application causing the issue.

Well, if your application is triggering a 55000-file scan with every request, 
that's obviously the place to start. That simply should not be happening. Even 
a fast VM, OS, web server, etc. wasting that much time won't be "fast". So 
start there.

If you are able to observe the files being read, you can probably arrange to 
have one of them refuse to be read which should produce a FileNotFoundException 
or similar in a log. Then you can see what component is actually triggering 
that file-read and try to find out what it's being read with every request.

I would make the vendor do this. It's what you pay them for.

-chris

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



Notice: This e-mail message is confidential and is intended only for the use of 
the individual and/or entity identified in the address line of this message. If 
you have received this message in error, or are not the named recipient(s), 
please notify us immediately by telephone (888-479-9111)
M_LEGAL_NOTICE

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



Tomcat maven plugin

2023-01-17 Thread Alex O'Ree
Is the tomcat maven plugin still maintained? I noticed it hasn't been
updated in a while


Re: Got a customer who's paranoid about Manager

2023-02-22 Thread Alex O'Ree
is removing the manager war an option for you? i don't think it's required
for operation. you could also rename it so that it's in a different url
path than the default

On Wed, Feb 22, 2023 at 12:58 PM Mark Thomas  wrote:

> On 22/02/2023 17:49, James H. H. Lampert wrote:
> > On 2/22/23 9:23 AM, Mark Thomas wrote:
> >> Fire them and hire a security consultant with a proper understanding
> >> of risk?
> >
> > Pardon my Yiddish, but "Fun dayn moyl in Gots oyern." (From your mouth
> > to God's ears. Such a colorful language.)
> >
> > But just because you're paranoid doesn't mean they're not out to get you.
> >
> > So just add
> >
> >denyStatus="404"
> > to the RemoteAddrValve?
>
> Exactly.
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: just wondering.. encryption in context.xml?

2023-04-08 Thread Alex O'Ree
For context.xml, you can do the following

make a java project with the following dependency

org.apache.tomcat
tomcat-dbcp
INSERT APPROPRIATE VERSION HERE
provided


Make a class that extends org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory
then you can transform the stored credential using whatever makes sense to
you. Perhaps an AES based mechanism.

In context.xml specify a "factory" attribute that points at your extended
BasicDataSourceFactory

A similar technique can be used for SSL keystore passwords in server.xml by
extending the http protocol classes and overriding the password mechanisms.
Enjoy


On Sat, Apr 8, 2023 at 3:02 PM Chuck Caldarale  wrote:

> You might want to take a look at this:
>
> Password - Apache Tomcat - Apache Software Foundation
> 
> cwiki.apache.org
> 
> [image: favicon.ico]
> 
> 
>
>   - Chuck
>
>
> On 2023-04-08, at 13:57, Kevin Huntly  wrote:
>
> okay that's fair
>
> On Sat, Apr 8, 2023, 14:31 Thomas Hoffmann (Speed4Trade GmbH)
>  wrote:
>
> Hello,
>
> -Ursprüngliche Nachricht-
> Von: Kevin Huntly 
> Gesendet: Samstag, 8. April 2023 19:40
> An: users@tomcat.apache.org
> Betreff: just wondering.. encryption in context.xml?
>
> is there currently a method for encrypting or otherwise obfuscating
>
> passwords
>
> (like for MySQL) in the context.mxl
> 
>
> Kevin Huntly
> Email: kmhun...@gmail.com
> Cell: 716/424-3311
> 
>
>
> You might use environment variables or java system properties.
> If someone has access to your context.xml, then your server is compromised
> anyway.
>
> Greetings,
> Thomas
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
>


Fwd: Possible memory leak in Tomcat 8.5.57 Websocket

2020-08-11 Thread Alex Maltinsky
Hi Folks

We ran into what looks like a memory leak in tomcat 8.5.57 on Ubuntu 18.04
running on Openjdk 11.0.5

Our app maintains permanent websocket connections with multiple clients
(also written in Java, using the Tyrus websocket client - version 1.13.1).
Recently, a few clients began misbehaving. They're opening multiple
websocket sessions in parallel which our app doesn't allow. When this
happens, the app closes the previous websocket session and starts talking
to the client over the new one session exclusively. This issue happened to
two of our clients that have a bunch of network connectivity issues which
somehow triggered this behavior. However, I'm not here to debug the
misbehaving clients, the client issue is being investigated in parallel.
However, it appears that this behavior triggered a memory leak in tomcat.
Slowly but surely our heap keeps filling up with byte arrays that seem to
have come from the misbehaving clients (we know this from the contents of
the arrays).
Below are the paths to the gc roots for a few of these arrays that contain
data from one such client. The heap dump was taken *over an hour after the
client was blocked by its IP address using iptables*. So we believe there's
no reason for these buffers to still exist in memory. Please note that the
path to the GC roots are all inside tomcat, our app is nowhere to be found.

We would appreciate any guidance or suggestions.

Thanks!

[image: image.png]

[image: image.png]


[image: image.png]


Possible memory leak in Tomcat 8.5.57 Websocket

2020-08-11 Thread Alex Maltinsky
Hi Folks

We ran into what looks like a memory leak in tomcat 8.5.57 on Ubuntu 18.04
running on Openjdk 11.0.5

Our app maintains permanent websocket connections with multiple clients
(also written in Java, using the Tyrus websocket client - version 1.13.1).
Recently, a few clients began misbehaving. They're opening multiple
websocket sessions in parallel which our app doesn't allow. When this
happens, the app closes the previous websocket session and starts talking
to the client over the new one session exclusively. This issue happened to
two of our clients that have a bunch of network connectivity issues which
somehow triggered this behavior. However, I'm not here to debug the
misbehaving clients, the client issue is being investigated in parallel.
However, it appears that this behavior triggered a memory leak in tomcat.
Slowly but surely our heap keeps filling up with byte arrays that seem to
have come from the misbehaving clients (we know this from the contents of
the arrays).
Below are the paths to the gc roots for a few of these arrays that contain
data from one such client. The heap dump was taken *over an hour after the
client was blocked by its IP address using iptables*. So we believe there's
no reason for these buffers to still exist in memory. Please note that the
path to the GC roots are all inside tomcat, our app is nowhere to be found.

We would appreciate any guidance or suggestions.

Thanks!

[image: image.png]

[image: image.png]


[image: image.png]


Re: Possible memory leak in Tomcat 8.5.57 Websocket

2020-08-11 Thread Alex Maltinsky
Okay, I've uploaded the images. Here are the links:

https://i.imgur.com/zAohUmm.png
https://i.imgur.com/SVp7x6R.png
https://i.imgur.com/F97A6b3.png

On Tue, 11 Aug 2020 at 20:21, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Alex,
>
> On 8/11/20 11:47, Alex Maltinsky wrote:
> > Hi Folks
> >
> > We ran into what looks like a memory leak in tomcat 8.5.57 on
> > Ubuntu 18.04 running on Openjdk 11.0.5
> >
> > Our app maintains permanent websocket connections with multiple
> > clients (also written in Java, using the Tyrus websocket client -
> > version 1.13.1). Recently, a few clients began misbehaving. They're
> > opening multiple websocket sessions in parallel which our app
> > doesn't allow. When this happens, the app closes the previous
> > websocket session and starts talking to the client over the new one
> > session exclusively. This issue happened to two of our clients that
> > have a bunch of network connectivity issues which somehow triggered
> > this behavior. However, I'm not here to debug the misbehaving
> > clients, the client issue is being investigated in parallel.
> > However, it appears that this behavior triggered a memory leak in
> > tomcat. Slowly but surely our heap keeps filling up with byte
> > arrays that seem to have come from the misbehaving clients (we know
> > this from the contents of the arrays). Below are the paths to the
> > gc roots for a few of these arrays that contain data from one such
> > client. The heap dump was taken *over an hour after the client was
> > blocked by its IP address using iptables*. So we believe there's no
> > reason for these buffers to still exist in memory. Please note that
> > the path to the GC roots are all inside tomcat, our app is nowhere
> > to be found.
> >
> > We would appreciate any guidance or suggestions.
> >
> > Thanks!
> >
> > image.png
> >
> > image.png
> >
> > image.png
>
> Your image attachments have been removed. Can you post them elsewhere
> + links in your message, or transcribe them into text?
>
> Alternatively, do you have a simple test case that reproduces the proble
> m?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl8y04IACgkQHPApP6U8
> pFhoSBAAjLc+roLwg8Qj7HVaHXGWOyucUqAsQOa7jMucQTQkMfs3PiuIfkMxvRp0
> SdRU0uK81E3gIjkwtjeACyeqZIxjExI2RIIe/A4kwtqcZmHkvE/wgayaWM4ncLlI
> tIrppKyEOb3G5aRwoRlaJ4TZxcm7EnvDKVLC8XTPZeQUtoKBS7zeVQFUZiW72gkM
> UU2RllLITeFsjTZGZfQ6I++XHOgrOMKhvswkxRl0zwSzBZM4Sg44xBUKQPj6b8iQ
> d3t6Z9Cy2ynTP1idI1reqEXHeajHLcrlG3VwDwOzQhhgN0TXL+5HEzomAFin9eaI
> D59tPPEClBmP1+1C3/Bse8XYOTUdDIzA7EoSEgXsaaQbkMmapUx6XUH1l0CGlzhI
> oMUvzkvmMuM4k/MLkD7elsG3YTORLK+ouuwd5gDd6o3xfSy3FXgsAbYxpRMQ/vcs
> zkuJ9trREe9uKCsb/MCtLx4cms3ndTo/Q44cEmpdHVMCeQNKnBeQzn9icEzJU7ib
> cF6fIHoI6ifLw9v1nzO1Lr/v3LiDm2WoptUZSLOcB0+dhaz+gLCId9gz6A0yw2DQ
> VzufR5whkZezS/6Rm40J6r8jLItrXfUALm6eDmulfGDUU6Y9JjQe/oUDdQYArKTE
> lVU7JBCc/4wVrZL6DsfnqDecfprRI01wTjXSJ8IP9s6xega2Czc=
> =R1Cn
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat's scalability

2006-06-19 Thread Alex Turner

Given that you aren't CPU bound, it's highly unlikely the problem is tomcat.

Alex.

On 6/19/06, Biernatowski Bartosz J <[EMAIL PROTECTED]> wrote:


I am about 90% sure the bottleneck is Tomcat or what's running on top of
Tomcat. Application uses JDBC queries to MS SQL server
Chips are Intel Xeon. My monitoring data:
Memory utilization under 30%, CPU under 10%. Using hardcore performance
tools and systematic approach.
The bottom line is that Tomcat/my application combo don't seem to handle
more than a certain number of users. All I want to do is to up the # of
users by 3.

So far it sounds that the approach of adding separate instance of Tomcat
and
using round robin is better than adding a separate JVM.


BJ Biernatowski
Application Developer, e-Business

-Original Message-
From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 10:49 AM
To: Tomcat Users List
Subject: Re: Tomcat's scalability

are you sure that tomcat is your bottleneck?
Your 4 CPU machine (which cpu's btw?) should be able to handle more
than 1000 users (unless you are speaking about suns cpu) without
problems. Maybe you should provide more info about your application.
Do you have any monitoring data?

Leon

On 6/19/06, Biernatowski Bartosz J <[EMAIL PROTECTED]> wrote:
> Hello,
> I was hoping somebody on the list might point me in the right
direction...
>
> I am trying to scale up Tomcat based web application currently
supporting
> ~100 users to 350 users.
>
> It seems that I have enough hardware: 2 load balanced servers x 4 CPUs
each
> with 4 GB of RAM which is underutilized for most of the time even though
> application performance slows dramatically at peak times.
>
> I was advised to install multiple JVMs in order to improve Tomcat's
> performance. Another option I considered was to install 2 instances
> of Tomcat on each server to see whether it would handle increased load.
>
> Would anybody know what kind of performance improvement would multiple
> JVM/Tomcat installations provide? Are there any benchmarks available?
>
> Thank you for any help!
> BJ
>
> BJ Biernatowski
> Application Developer
>
> This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that
any dissemination, distribution or copying of this e-mail, including its
contents and attachments, is prohibited. If you have received this e-mail
in
error, please notify the sender by a "reply to sender only" message and
delete this e-mail immediately and destroy all electronic and hard copies
of
the communication, including 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]


This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified that
any dissemination, distribution or copying of this e-mail, including its
contents and attachments, is prohibited. If you have received this e-mail in
error, please notify the sender by a "reply to sender only" message and
delete this e-mail immediately and destroy all electronic and hard copies of
the communication, including 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: Tomcat's scalability

2006-06-19 Thread Alex Turner

You've also totally failed to include numbers for I/O (don't forget, it's
not necessarily MB/sec that counts, it's requests/sec) and for Network
usage, and also for the perfomance pattern of the SQL Server system, which
is considerably more likely to be the bottleneck than the app seeing that
most people don't properly understand how to configure a database server.

Alex

On 6/19/06, Biernatowski Bartosz J <[EMAIL PROTECTED]> wrote:


I am about 90% sure the bottleneck is Tomcat or what's running on top of
Tomcat. Application uses JDBC queries to MS SQL server
Chips are Intel Xeon. My monitoring data:
Memory utilization under 30%, CPU under 10%. Using hardcore performance
tools and systematic approach.
The bottom line is that Tomcat/my application combo don't seem to handle
more than a certain number of users. All I want to do is to up the # of
users by 3.

So far it sounds that the approach of adding separate instance of Tomcat
and
using round robin is better than adding a separate JVM.


BJ Biernatowski
Application Developer, e-Business

-Original Message-
From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 10:49 AM
To: Tomcat Users List
Subject: Re: Tomcat's scalability

are you sure that tomcat is your bottleneck?
Your 4 CPU machine (which cpu's btw?) should be able to handle more
than 1000 users (unless you are speaking about suns cpu) without
problems. Maybe you should provide more info about your application.
Do you have any monitoring data?

Leon

On 6/19/06, Biernatowski Bartosz J <[EMAIL PROTECTED]> wrote:
> Hello,
> I was hoping somebody on the list might point me in the right
direction...
>
> I am trying to scale up Tomcat based web application currently
supporting
> ~100 users to 350 users.
>
> It seems that I have enough hardware: 2 load balanced servers x 4 CPUs
each
> with 4 GB of RAM which is underutilized for most of the time even though
> application performance slows dramatically at peak times.
>
> I was advised to install multiple JVMs in order to improve Tomcat's
> performance. Another option I considered was to install 2 instances
> of Tomcat on each server to see whether it would handle increased load.
>
> Would anybody know what kind of performance improvement would multiple
> JVM/Tomcat installations provide? Are there any benchmarks available?
>
> Thank you for any help!
> BJ
>
> BJ Biernatowski
> Application Developer
>
> This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that
any dissemination, distribution or copying of this e-mail, including its
contents and attachments, is prohibited. If you have received this e-mail
in
error, please notify the sender by a "reply to sender only" message and
delete this e-mail immediately and destroy all electronic and hard copies
of
the communication, including 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]


This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified that
any dissemination, distribution or copying of this e-mail, including its
contents and attachments, is prohibited. If you have received this e-mail in
error, please notify the sender by a "reply to sender only" message and
delete this e-mail immediately and destroy all electronic and hard copies of
the communication, including 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: Tomcat's scalability

2006-06-19 Thread Alex Turner

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


On 6/19/06, Biernatowski Bartosz J <[EMAIL PROTECTED]> wrote:
> I am about 90% sure the bottleneck is Tomcat or what's running on top of
> Tomcat. Application uses JDBC queries to MS SQL server
> Chips are Intel Xeon. My monitoring data:
> Memory utilization under 30%, CPU under 10%. Using hardcore performance
> tools and systematic approach.
> The bottom line is that Tomcat/my application combo don't seem to handle
> more than a certain number of users. All I want to do is to up the # of
> users by 3.

Sounds like your db connection pool is the problem. Maybe you should
check whether you have enough connections in the connection pool.



Connection pooling, ahh yes.  This is also a likely problem if you aren't
doing any.




> So far it sounds that the approach of adding separate instance of Tomcat
and
> using round robin is better than adding a separate JVM.
I think both options are equal. How do you plan to run a separate
tomcat in the same JVM?



Both options are equaly stupid.  Putting multiple intances of tomcat on a
single box is pretty worthless unless you have serious application
problems.  Tomcat is multi-threaded, and will by nature utilize a multi-CPU
setup.


If you ask me (and hey, we have thousands of concurrent users and a

lot more requests) you need a monitoring tool for your application
inside your application not just vmstat or top. You need to know which
servlet/action/whatever your presentation layer is takes the time and
trace it down in the persistence. Everything else is just kindergarten
:-)


>
>
> BJ Biernatowski
> Application Developer, e-Business

Leon

>
> -Original Message-
> From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 19, 2006 10:49 AM
> To: Tomcat Users List
> Subject: Re: Tomcat's scalability
>
> are you sure that tomcat is your bottleneck?
> Your 4 CPU machine (which cpu's btw?) should be able to handle more
> than 1000 users (unless you are speaking about suns cpu) without
> problems. Maybe you should provide more info about your application.
> Do you have any monitoring data?
>
> Leon
>
> On 6/19/06, Biernatowski Bartosz J <[EMAIL PROTECTED]>
wrote:
> > Hello,
> > I was hoping somebody on the list might point me in the right
direction...
> >
> > I am trying to scale up Tomcat based web application currently
supporting
> > ~100 users to 350 users.
> >
> > It seems that I have enough hardware: 2 load balanced servers x 4 CPUs
> each
> > with 4 GB of RAM which is underutilized for most of the time even
though
> > application performance slows dramatically at peak times.
> >
> > I was advised to install multiple JVMs in order to improve Tomcat's
> > performance. Another option I considered was to install 2 instances
> > of Tomcat on each server to see whether it would handle increased
load.
> >
> > Would anybody know what kind of performance improvement would multiple
> > JVM/Tomcat installations provide? Are there any benchmarks available?
> >
> > Thank you for any help!
> > BJ
> >
> > BJ Biernatowski
> > Application Developer
> >
> > This e-mail, including attachments, may include confidential and/or
> proprietary information, and may be used only by the person or entity to
> which it is addressed. If the reader of this e-mail is not the intended
> recipient or his or her authorized agent, the reader is hereby notified
that
> any dissemination, distribution or copying of this e-mail, including its
> contents and attachments, is prohibited. If you have received this
e-mail in
> error, please notify the sender by a "reply to sender only" message and
> delete this e-mail immediately and destroy all electronic and hard
copies of
> the communication, including 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]
>
>
> This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified that
any dissemination, distribution or copying of this e-mail, including its
contents and attachments, is prohibited. If you have received this e-mail in
error, please notify the sender by a "reply to sender only" message and
delete this e-mail immediately and destroy all electronic and hard copies of
the communication, including attachments.
>
>
> -
> To start a new topic, e-mail: users@tomcat.apac

Re: Tomcat's scalability

2006-06-20 Thread Alex Turner

Please see
http://java.sun.com/developer/technicalArticles/Programming/linux/
Java on linux has been natively multithreaded since 1.3

Please also note that having a max threads of 750 is pretty much gaurtenteed
to cause your system to grind to a halt under high load.  (Most linux
systems I've seen buckle somewhere around a load average of 75 or so, which
means 75 threads waiting for CPU time).

Bear in mind that if your application is CPU bound, then no more than the
number of CPUs you have can exucte threads at once, which on most systems is
either 2 or 4 CPUs, so just 2 or 4 threads!!  If you have some IO, and there
is always some waiting on the OS to deliver network packets, so it's worth
queing threads up a bit, but doing much more than 3 or 4 times the number of
CPUs you have is only going to cause your system to spend more time in
context switches, not in actual work time.  Setting maxThreads to 750 is
downright irresponsible.

A number less than 32 is probably more than your system will ever be able to
cope with if you are actualy doing any processing during the course of a
request and not just serving static content.  (there are some background
threads for various things like garbage collection in the JVM and in tomcat,
so a few extra are also warranted).  If in doubt, go low, and if you aren't
getting CPU saturation under high load, tune them up.

It's usefull to do 30 seconds of googling to find Suns actual statement
prior to posting and demostrating that 'AFAIK' is pretty lame, because you
didn't bother to take the time to actualy find out.

Alex.

On 6/20/06, Mladen Adamovic <[EMAIL PROTECTED]> wrote:


Leon Rosenberg wrote:
>> Isn't Tomcat and JVM still single threaded?
>> Single thread = single processor usage
> I don't think it was ever singlethreaded. And if it were, what would
> the Connector setting
> in the server.xml mean?
>  maxThreads="750" minSpareThreads="25" maxSpareThreads="75"
>
Max number of Java thread, IMHO.
Java thread is not the same as operating system thread.
In fact, JVM used to be single threaded on Linux and Windows and I'm not
quite sure has it changed recently.
So, you might have 800 Java threads but it is still one thread on
operating system.
When you run "ps aux | grep java" you always see one operating system
thread IMHO.
It means you don't exploit 4 processors if you have 4.
To exploit 4 processors you have to setup 4 JVM (4 tomcat instances) to
do round robin.
As long as you have 1 JVM active you don't exploit thread level
parallelism in operating system.

AFAIK

--
Mladen Adamovic
http://www.online-utility.org  http://www.shortopedia.com
http://www.froola.com  http://www.gift-idea4u.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: Tomcat's scalability

2006-06-21 Thread Alex Turner

This discussion focuses primarily on serving static files to a client, not
processing dynamic web pages.  Most people running tomcat are processing
dynamic pages, like getting data from a database and compositing a page
based on that data.

An FTP site, or a static web site will typically be I/O bound or Network
bound, and the only way to increase throughput it to increase the number of
I/Os per second that your server can manage or increase the size of your
network interface.  A java based dynamic website is typically not I/O bound,
but CPU bound, which posses a different set of challenges than a static FTP
server.

Alex.

On 6/21/06, Andrew Miehs <[EMAIL PROTECTED]> wrote:


Now that we are moving to the theoretical discussion, you will
probably want to have a look at

http://www.kegel.com/c10k.html

Regards

Andrew


On 21/06/2006, at 4:56 PM, Mladen Adamovic wrote:

> I spoke recently with guy from Microsoft (project manager from
> server division).
> He said that heavily loaded web server don't lose much time to
> switch processes but when you are out of free memory and server
> start to swap, performances degrade dramatically.
> I though that guy definitely knew what he was thought about.
>
> Lets see what operating system has to do when switch threads.
> Just to move all registers to/from memory? Anything else?


-
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: Is it possible to configure Tomcat in a way that it uses different CPUs for different parallel requests?

2006-07-04 Thread Alex Turner

This is the default behaviour.

Alex

On 7/4/06, KHZ (SAW) <[EMAIL PROTECTED]> wrote:


Hi world.

Are there Tomcat settings for achieving such a behaviour?

Regards,   Karl-Heinz.





Re: URGENT HELP NEEDED: mod_jk loadbalancing issues

2006-07-09 Thread Alex Turner

What is your load average under these circumstance?

Is each of the 10 tomcats on a seperate physical machine?

What are your max thread settings in Tomcat?

Are your tomcat machines CPU bound or I/O bound under full load?

Alex

On 7/9/06, Edmon Begoli <[EMAIL PROTECTED]> wrote:


Hi,

First of all - thanks Rainer for willing to look into this issue.

Environment description:

Web Server: Apache 2.0.52
mod_jk: 1.2.15
OS: RedHat ES 4.2
App. Server: Tomcat 5.5.15

Cluster topology: 4 webservers with mod_jk doing sticky loadbalancing into
10 tomcats

MOD_JK Configuration: Pretty much basic mod_jk and Tomcat settings for
AJP13

Description of the issue:

Under very heavy loads for our standards (about thousand of concurrent
users)
we start seeing errors (listed at end botton of this e-mail) in the mod_jk
error log.

Our concern is mod_jk behavior on the web server. We closely monitor
apache
and Apache itself is not under heavy stress. However, shortly after we
start
seeing these messages in the mod_jk's error log, web server becomes
unresponsive
and we have to re-start it.

While the web server server is unresponsive we monitor 8009 port - nothing
is going on it.

We monitor Tomcats and they are fine.

As soon as we re-start web servers traffic resumes. Then under heavy loads
things break again

We are planning on increasing the number of max threads on the Tomcats'
AJP connector to imrpove the throughput of the Tomcats.

However, our concern is with the web server side lock ups. It seems that
mod_jk cannot
recover after this oversaturation.


TAIL -F FROM THE MOD_JK LOG RIGHT BEFORE  IT "DIES"
__


[Fri Jul 07 09:59:43 2006] [info]  ajp_service::jk_ajp_common.c (1721):
Receiving from tomcat failed, recoverable operation attempt=0

[Fri Jul 07 09:59:43 2006] [info]  ajp_service::jk_ajp_common.c (1749):
Sending request to tomcat failed,  recoverable operation attempt=1

[Fri Jul 07 09:59:44 2006] [error]
ajp_connection_tcp_get_message::jk_ajp_common.c (961): Can't receive the
response message from tomcat, network problems or tomcat is down (:8009), err=-110

[Fri Jul 07 09:59:44 2006] [error] ajp_get_reply::jk_ajp_common.c (1503):
Tomcat is down or refused connection. No response has been sent to the
client (yet)

[Fri Jul 07 09:59:44 2006] [info]  ajp_service::jk_ajp_common.c (1721):
Receiving from tomcat failed, recoverable operation attempt=0

[Fri Jul 07 09:59:44 2006] [info]  ajp_service::jk_ajp_common.c (1749):
Sending request to tomcat failed,  recoverable operation attempt=1

[Fri Jul 07 09:59:44 2006] [error]
ajp_connection_tcp_get_message::jk_ajp_common.c (961): Can't receive the
response message from tomcat, network problems or tomcat is down (:8009), err=-110

[Fri Jul 07 09:59:44 2006] [error] ajp_get_reply::jk_ajp_common.c (1503):
Tomcat is down or refused connection. No response has been sent to the
client (yet)

[Fri Jul 07 09:59:44 2006] [info]  ajp_service::jk_ajp_common.c (1721):
Receiving from tomcat failed, recoverable operation attempt=0

[Fri Jul 07 09:59:44 2006] [info]  ajp_service::jk_ajp_common.c (1749):
Sending request to tomcat failed,  recoverable operation attempt=1

[Fri Jul 07 09:59:44 2006] [error]
ajp_connection_tcp_get_message::jk_ajp_common.c (961): Can't receive the
response message from tomcat, network problems or tomcat is down (:8009), err=-110

[Fri Jul 07 09:59:44 2006] [error] ajp_get_reply::jk_ajp_common.c (1503):
Tomcat is down or refused connection. No response has been sent to the
client (yet)

[Fri Jul 07 09:59:44 2006] [info]  ajp_service::jk_ajp_common.c (1721):
Receiving from tomcat failed, recoverable operation attempt=0

[Fri Jul 07 09:59:44 2006] [info]  ajp_service::jk_ajp_common.c (1749):
Sending request to tomcat failed,  recoverable operation attempt=1

[Fri Jul 07 09:59:45 2006] [error]
ajp_connection_tcp_get_message::jk_ajp_common.c (961): Can't receive the
response message from tomcat, network problems or tomcat is down (:8009), err=-110

[Fri Jul 07 09:59:45 2006] [error] ajp_get_reply::jk_ajp_common.c (1503):
Tomcat is down or refused connection. No response has been sent to the
client (yet)

[Fri Jul 07 09:59:45 2006] [info]  ajp_service::jk_ajp_common.c (1721):
Receiving from tomcat failed, recoverable operation attempt=0

[Fri Jul 07 09:59:45 2006] [info]  ajp_service::jk_ajp_common.c (1749):
Sending request to tomcat failed,  recoverable operation attempt=1

[Fri Jul 07 09:59:46 2006] [error]
ajp_connection_tcp_get_message::jk_ajp_common.c (961): Can't receive the
response message from tomcat, network problems or tomcat is down (:8009), err=-110

[Fri Jul 07 09:59:46 2006] [error] ajp_get_reply::jk_ajp_common.c (1503):
Tomcat is down or refused connection. No response has been sent to the
client (yet)

[Fri Jul 07 09:59:46 2006] [info]  ajp_service::jk_ajp_common.c (1721):
Receiving from tomcat failed, recoverable operation attemp

DigestAthenticator and session registeration

2006-07-13 Thread Alex Jalali
Hello,

I have extented the DigestAthenticator and everything is working fine. but
after the first authentication the register(...) method of the base class
does not create the internal session and set the cookie. So for every
request I have to go to database and re-authenticate.

This is version 5.5.15 but I also looked and .16 and .17 and something is
not working in register(...) of base class.

I am not sure how the internal session and setting of cookie works in
tomcat to override the register method but I think there is something
wrong. I pass the right parameters and test them and see they are correct
and are not null or anything. when I call register it does not do the job.

Anyone else has come across this problem?

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



Re: BOOBIES!

2006-07-25 Thread Alex Turner

Quite frankly, I sympathize with the original poster.  This list is very
unresponsive quite often, and I would never recommentd tomcat to a
commercial company because the mailing list support is terrible.  Heck, I've
even called commercial support vendors  for tomcat who have not returned my
phone calls.  The tomcat community needs to do a better job of helping
users, or they can watch users go over to BEA Weblogic and Websphere.  I
know I'm considering it as soon as I can afford a BEA or Websphere license.
When someone has to put 'BOOBIES' in the subject to get attention that
speaks of a wider problem than someone being insensitive.

Alex.

On 7/25/06, Dakota Jack <[EMAIL PROTECTED]> wrote:


What can be gained is a measure of civility.  I don't think someone who
deliberately does something offensive to achieve their own ends is in a
position to say when their behavior is properly handled.  Some people just
have a hard time putting themselves into the position of others, or don't
care whom they offend.  You would be, I would think, the very last person
in
the world to adjudicate when this topic is finished.  However, you might
have noticed that it was finished before you came back.

On 7/24/06, Harris, Thomas <[EMAIL PROTECTED]> wrote:
>
>
> I sent the original message, with an appropriate subject, over two weeks
> before the plea for attention follow-up with the very offensive subject.
> The original subject was "Shared code but different pages on different
> virtual hosts?" We're on a really tight schedule, and having waited two
> weeks for any answer was no longer something we could do, so my boss
> actually suggested getting a little attention on the message via this
> silly stunt.
>
> So, I did get some help on the topic in question, and lots more besides,
> It's was quite fun actually, reading some of the silliness that this one
> word has spawned. Someone mentioned the Superbowl of 2004, and I concur.
>
> Let's put this to rest... What can be gained by continuing on and on
> about how horribly offensive this subject line is.
>
> Tom
>
> -Original Message-
> From: Januski, Ken [mailto:[EMAIL PROTECTED]
> Sent: Sunday, July 23, 2006 8:26 AM
> To: Tomcat Users List; Tomcat Users List
> Subject: RE: BOOBIES!
>
> Like many I've resisted this thread because I figured it would be
> STUPID! STUPID, YES I SAID STUPID. Did that get your attention?
>
> Now let me ask: how many people read threads here whose subject is in
> caps followed by an explanation point? And what does that subject
> usually say? Something like HELP, TOMCAT DONT WORK, a type of spam or
> something similar. I almost always skip those messages. Some people have
> more patience than I and so do end up helping someone who has gotten
> desperate. More experienced users know that they're much more likely to
> get an answer to their question by choosing a more informative and less
> excited subject.
>
> So what does someone think when they see BOOBIES! and what did the
> author of that message think that they would think? Well I have little
> doubt that they expected anyone to think of birds and I doubt that that
> was the first reaction of any reader no matter how avid a birder. So I
> have a very hard time believing that the author had any intent other
> than to get a reaction of some sort from readers who saw the subject and
> didn't think bird. I don't think this has anything to do with puritanism
> or political correctness. I can't think of anything I like much less
> than political correctness. But it's very hard to see this as having
> anything to do with political correctness. To me it's just someone
> trying to be clever and then trying to cover their tracks when they find
> out that many uses don't actually find it clever. ENOUGH SAID!
>
>
>
>
> -Original Message-
> From: Robert Koberg [mailto:[EMAIL PROTECTED]
> Sent: Sun 7/23/2006 7:28 AM
> To: Tomcat Users List
> Subject: Re: BOOBIES!
>
> Wow... how do some people make it through the day without exploding from
> some terrible insult.
>
> I can't believe this thread subject has turned into such a big deal. I
> deleted the first 5 or so because I thought it was spam. Then I saw
> names responding which I recognized.
>
> I really don't understand how someone can be offended by a word like
> 'boobies' and can still use the Internet, or real life for that matter.
>
> grow up and grow a skin... Dantes Inferno invoked for using the word
> 'boobies.' The road to hell is paved with...
>
>
>
> Dakota Jack wrote:
> > Golly, Charles,
> >
> > Maybe you need some training?  Maybe you are the one who do

Single Sign-on Configuration with Apache

2006-09-14 Thread Alex Hepp

Hi!

I have a problem that I really need to solve. I have to find a way how 
to configure a tomcat installation, so that it works together with an 
Oracle Application Server Portal, respectively the SSO Server.


I know, that there is a module (mod_osso) for apache, but i am not sure 
how to configure Tomcat, so that a request to a configured URL is first 
redirected to the SSO, and afterwards to Tomcat, and how I then can 
retrieve the user information in a servlet.


Is anyone able to give me any hints? Thanks a lot for any help...

regards. Alex

-
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: Single Sign-on Configuration with Apache

2006-09-15 Thread Alex Hepp

Mark,

Mark Thomas schrieb:

When starting a new thread (ie sending a message to the list about a
new topic) please do not reply to an existing message and change the
subject line. To many of the list archiving services and mail clients
used by list subscribers this  makes your new message appear as part
of the old thread. This makes it harder for other users to find
relevant information when searching the lists.



i am very sorry about this, i just forgot about the message id. I didn't 
mean to 'hijack' a thread...



This is known as thread hijacking and is behaviour that is frowned
upon on this list. Frequent offenders will be removed from the list.
It should also be noted that many list subscribers automatically
ignore any messages that hijack another thread.

The correct procedure is to create a new message with a new subject.
This will start a new thread.


I will remember this for the future, and hope, that noone is offended, 
or angry...


Shall I start a new thread with this question, or shall i leave it now, 
and just remember it for the future?


Sorry again!

Regards. alex

-
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: a noob question : Eclipse & Tomcat Ant tasks

2006-09-19 Thread Alex Hepp

Hi!

Pierre Goupil schrieb:









I am not sure, but try using slashes instead of backslashes...

HTH
regds. alex

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



Mimetypes

2005-11-03 Thread ALEX HYDE
Hi All,

I've set up Tomcat to work inside of Apache. It's all
going ok and I am trying to serve up 3gp to phones. My
file worked ok on Sony Ericsson but on Nokia it
doesn't work. I have only configurred Tomcat and not
Apache to serve up 3gp mimetype. The Nokia does not
know what the file type is. has anyone got any
suggestions on what I might have configured wrong.

Thanks 

Alex



___ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com

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



Apache filters?

2005-11-03 Thread ALEX HYDE
Hi all,
 
I am using Tomcat to serve up my image content. I was considering moving this 
static content to Apache itself but I'm stuck on how to do dynamic 
authorisation of a directory in Apache. In Tomcat I can restrict access to the 
images directory by adding a filter and in this filter dynamically checking for 
a valid security pin in the url. But how would I do such a thing in Apache? I 
know Apache can do it based on user or requesting machine but this is more 
dynamic.
 
Cheers alot
 
Alex


-
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre.

Re: Google Map of active users on this list

2005-11-04 Thread ALEX HYDE
Very nice.

Africa's a bit under-represented.

--- Claire McLister <[EMAIL PROTECTED]> wrote:

> Hi,
> 
>   We've been working with Google Maps to see if we
> can automatically map 
> origins of emails to groups.
> 
>   As a trial, we've been mapping active emails to
> this group since Oct 
> 27th at:
> 
>   http://www.zeesource.net/maps/map.do?group=667
> 
>   Would like to hear from you what you think of this
> service.
> 
>   Thanks for listening.
> 
> Claire
> 
>   --
>   Claire McLister   
> [EMAIL PROTECTED]
>   1684 Nightingale Avenue Suite 201
>   Sunnyvale, CA 94087408-733-2737(fax)
> 
>   http://www.zeemaps.com
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 






___ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail 
http://uk.messenger.yahoo.com

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



Re: Apache filters?

2005-11-04 Thread ALEX HYDE
Hi Bruno,

I think that is the sort of thing I need. That sounds
pretty much equivelent to the Tomcat Filter.
Credentials will be stored on a database so fairly
easy to hook into.

I'm not sure what you mean by security boundary but
each request for a resource under the remit of Apache
will be individually authorised.

Presumably Apache must be used to lock down resources
based on dynamic things such as: - numbers of use of a
resource, or - time-based. Is this what you can add
with that mod? I wonder if there is anything
opensource out there.

Thanks alot Bruno. If you have any more details, that
would be great. 

--- Bruno Georges <[EMAIL PROTECTED]> wrote:

> Alex 
> There many approach to this, the first one that come
> to mind is mod-rewrite parsing the request and apply
> some processing if there is a match..
> Where do you store credentials? LDAP?
> Where is the security boundary in your design?
> Hope this helps
> Bruno Georges
> 
> Glencore International AG
> Tel. +41 41 709 3204
> Fax +41 41 709 3000
> 
> 
> - Original Message -
> From: ALEX HYDE [EMAIL PROTECTED]
> Sent: 04.11.2005 00:40
> To: users@tomcat.apache.org
> Subject: Apache filters?
> 
> Hi all,
>  
> I am using Tomcat to serve up my image content. I
> was considering moving this static content to Apache
> itself but I'm stuck on how to do dynamic
> authorisation of a directory in Apache. In Tomcat I
> can restrict access to the images directory by
> adding a filter and in this filter dynamically
> checking for a valid security pin in the url. But
> how would I do such a thing in Apache? I know Apache
> can do it based on user or requesting machine but
> this is more dynamic.
>  
> Cheers alot
>  
> Alex
> 
>   
> -
> To help you stay safe and secure online, we've
> developed the all new Yahoo! Security Centre.
> 
> 
> LEGAL DISCLAIMER. The contents of this e-mail and
> any attachments are strictly
> confidential and they may not be used or disclosed
> by someone who is not a
> named recipient.
> If you have received this email in error please
> notify the sender by replying
> to this email inserting the word "misdirected" as
> the message and delete this
> e-mail from your system.
> 
> 




___ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com

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



Re: Mimetypes

2005-11-05 Thread ALEX HYDE
Hey, Thanks for that Andoni.
 
I thought that was what it was originally but I set up some tests and the 
mime-type returned for the phone I was using was correct. 
 
It turns out it was more to do with the encoding of the file itself. I think I 
had gone a bit hardcore, in the sense of trying to get the phones to play files 
with a v.high bit and frame rates. Very useful message from the phone though!?
 
Thanks alot Andoni.

Andoni <[EMAIL PROTECTED]> wrote:
Have you looked at /conf/web.xml ?

In this file you have a list of file extentions and their associated mime
types. This tells the HTTP Server in Tomcat what MIME Type to associate with
them when they are being output.

I would recommend removing Apache from the process altogether while you are
having config problems. Set Tomcat's port to 80 from the default 8080 and
switch off Apache.

Hope that helps, keep writing if not.

Andoni.

- Original Message ----- 
From: "ALEX HYDE" 
Newsgroups: gmane.comp.jakarta.tomcat.user
Sent: Thursday, November 03, 2005 12:13 PM
Subject: Mimetypes


> Hi All,
>
> I've set up Tomcat to work inside of Apache. It's all
> going ok and I am trying to serve up 3gp to phones. My
> file worked ok on Sony Ericsson but on Nokia it
> doesn't work. I have only configurred Tomcat and not
> Apache to serve up 3gp mimetype. The Nokia does not
> know what the file type is. has anyone got any
> suggestions on what I might have configured wrong.
>
> Thanks
>
> Alex
>
>
>
> ___
> To help you stay safe and secure online, we've developed the all new
Yahoo! Security Centre. http://uk.security.yahoo.com


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



-
How much free photo storage do you get? Store your holiday snaps for FREE with 
Yahoo! Photos. Get Yahoo! Photos

Re: Could do with some guidance/help

2005-11-10 Thread ALEX HYDE
Richard,

I'm a novice myself so here's guessing

Silly question but have you looked at the Tomcat log?
That's usually a good starting place when you get an
internal server error. Maybe a path to one of your
classes has changed, eg, a filter? ie, your classes
don't match was web.xml expects.

Good luck.

--- Paul Singleton <[EMAIL PROTECTED]> wrote:

> I only use Tomcat standalone, and have no hunches
> about
> your particular problem, but sometimes IE hides the
> sordid details of error msgs and I find that Firefox
> gives them to you straight; also there's a
> LiveHTTPHeaders
> plugin which can be useful when troubleshooting?
> 
> good luck :-/
> 
> Paul Singleton
> 
> Richard Tomkins wrote:
> > Platform: Windows 200 Pro, Service Pack 4
> > Pentium 4, HyperThreaded, 512MB memory.
> > 
> > Installed software,
> > 
> > Oracle 10g Release 2, Personal Edition.
> > Apache 1.3.33
> > J2SDK 1.4.2_10
> > Tomcat 4.1.31
> > Mod_jk-1.2.14-apache-1.3.33.so
> > 
> > I have set up Tomcat server.xml with the requisite
> listeners to have it do
> > auto configuration. I a using the ajp13 connector,
> and I have tried both of
> > the configurations for this inside server.xml, the
> ajp13 on port 8009 and
> > the coyote/ajp13 on port 8009.
> > 
> > The Tomact examples all work as well as the
> administration and management
> > tools.
> > 
> > My problem is that I have an application that I
> have to install on a number
> > of desktops for internal test purposes.
> > 
> > The application is written in jsp and works with
> an earlier version of
> > Apache and Tomact 3.x.mumble.
> > 
> > With the implementation I am working with, on the
> first page I get a message
> > that an "Internal Server Error" has occurred. If I
> right mouse click and
> > choose refresh, the expected page shows up on the
> browser.
> > 
> > If I do this via, HYPERLINK
> >
>
"http://localhost:8080/testsoft/index.html"http://localhost:8080/testsoft/in
> > dex.html, the display works everytime, unlike my
> experience with HYPERLINK
> >
>
"http://locahost/testsoft.html"http://locahost/testsoft.html
> which should
> > work. Many web pages after do work, and as I said
> previously, the Tomact
> > examples all work with both methods.
> > 
> > Something between Apache and Tomcat is causing me
> some pain.
> > 
> > If anyone has any ideas to throw my way, please
> do.
> > 
> > 
> > Regards, Richard Tomkins
> > 
> > 
> > 
> > 
> 
> 
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.1.362 / Virus Database: 267.12.8/165 -
> Release Date: 9/Nov/2005
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




___ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com

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



Re: can't get #include to work

2005-11-16 Thread ALEX HYDE
Is that supposed to be a comment and not an include?



<%@ include file="myinclude.html" %>

--- Mark Thomas <[EMAIL PROTECTED]> wrote:

> [EMAIL PROTECTED] wrote:
> > I'm trying to include a file as my footer section.
>  I have formatted the section in home.html as:
> > 
> > 
> > 
> > after doing this and viewing the file through my
> local_host:8080 i don't see the footer.html file
> showing up.
> > 
> > from what I can see I need to enable SSI within
> tomcat.  I'm supposed to add 
> > 
> > Options +Includes
> > to my  httpd.conf or .htaccess file.
> This is to install SSI for the Apache web server
> (httpd).
> 
> > I'm running tomcat 5.5.9 on a windows XP box, I
> know, shame on me but it's all I have right now.
> You need to uncomment the SSI servlet definition AND
> mapping in the 
> conf/web.xml file
> 
> It sounds like you need to read the Tomcat
> documentation. The SSI how 
> to would be a good place to start.
> 
>
http://tomcat.apache.org/tomcat-5.5-doc/ssi-howto.html
> 
> mark
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




___ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com

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



manager for some users

2005-11-22 Thread Alex Moreno
Hello everybody,

i´m working in a university where we have a tomcat server running some
different aplications developed by ourselves. We have different people
working on each application and each one of them needs to restart at some
different moments their applications.

The problem is that the department don´t want to give us manager access for
all the applications. I´ve been looking for the way of giving manager access
to only one or two application, depending on the user.

For example, alex should be able to access as manager (to restart the app)
with permissions on postgrados application, but not able to see presupuestum
app. In the other way, the user Maria should be able to access to
presupuestum but not to postgrados.

Can it be done in tomcat? I really need this, in advance thanks for your
help.

Regards.


Re: manager for some users

2005-11-22 Thread Alex Moreno
The problem is that some partners has said me that this is insecure and
should only be used on beta application servers. At least this is what the
department says us to deny this petition.


On 11/22/05, Kyle <[EMAIL PROTECTED]> wrote:
>
> If you set which ever server.xml parameter it is that auto-reloads an
> application (I think it's reloadable="true", or something like that) and
> just have your users recompile their entire app each time and then ftp
> it into the relevant directory, tomcat should automatically reload each
> app for them without anyone needing manager access.
>
>
> Alex Moreno wrote:
>
> >Hello everybody,
> >
> >i´m working in a university where we have a tomcat server running some
> >different aplications developed by ourselves. We have different people
> >working on each application and each one of them needs to restart at some
> >different moments their applications.
> >
> >The problem is that the department don´t want to give us manager access
> for
> >all the applications. I´ve been looking for the way of giving manager
> access
> >to only one or two application, depending on the user.
> >
> >For example, alex should be able to access as manager (to restart the
> app)
> >with permissions on postgrados application, but not able to see
> presupuestum
> >app. In the other way, the user Maria should be able to access to
> >presupuestum but not to postgrados.
> >
> >Can it be done in tomcat? I really need this, in advance thanks for your
> >help.
> >
> >Regards.
> >
> >
> >
>
> --
> 
> Kind Regards
>
> Kyle Lange
>
> Tel: +61 (0)431 88 3978
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: database connection pooling

2005-11-22 Thread ALEX HYDE
Khawaja,

Just to add to what the others said. When you close
the connection it doesn't actually close the
connection, it returns it to the pool. You close it to
return it, not to "actually" close it. It doesn't mean
literally terminate the connection, otherwise you're
right, there would not be much point in having a pool!

Not sure if this is what you meant or not.

--- KEREM ERKAN <[EMAIL PROTECTED]> wrote:

> When pooling on Tomcat, the connection must be
> closed.
> 
> I think, by saying "closing would defeat the purpose
> of connection pooling",
> Khawaja may be thinking about pooling in Tomcat as
> some persistent
> connection method, and while it is a persistent
> connection with Tomcat and
> the DB server which it connects to, the code that
> works on Tomcat sees the
> connection as a regular connection not a persistent
> connection. So unlike
> some persistent connection pooling methods (for
> example oci8 on php), in
> Tomcat, the connection must be closed, or it will
> hang unless some mechanism
> sets the connection as idle, or until Tomcat is
> restarted.
> 
> Regards,
> 
> Kerem
> 
> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, November 22, 2005 2:04 PM
> To: Tomcat Users List
> Subject: Re: database connection pooling
> 
> Hi, you should definitely close the connection right
> after the method that is invoked.  The connection
> should be closed in the 'finally' block.
> 
> May we know the reason why you think the closing
> would
> defeat the purpose of connection pooling?
> 
> --- Khawaja Shams <[EMAIL PROTECTED]> wrote:
> 
> > Hello,
> > when using connection pooling, i get a connection
> > from the context. I am
> > curious if I am supposed to close this connection
> > when I am done using it.
> > To me, it seems like closing it would defeat the
> > purpose of connection
> > pooling. Any guidance would be appreciated. Thanks
> > in advance.
> > 
> > 
> > Best Regards,
> > Khawaja Shams
> > 
> 
> 
> 
>   
>   
> __ 
> Yahoo! Mail - PC Magazine Editors' Choice 2005 
> http://mail.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 




___ 
Yahoo! Model Search 2005 - Find the next catwalk superstars - 
http://uk.news.yahoo.com/hot/model-search/

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



Re: Filters

2005-11-25 Thread ALEX HYDE
Carl,

I'm quite new to this but I'd guess that the Filter is
instantiated at start-up by Tomcat. You might direct
your new requests, plus the old requests for the asp
pages, to Tomcat, using say Apache. Using a filter you
could intercept *.asp and then forward/redirect to the
new resource.

--- Carl Olivier <[EMAIL PROTECTED]> wrote:

> Greetings.
>  
> I have a questions regarding Filter servlets.  If a
> request is made for a
> non-existent/non *.jsp or servlet URI - will the
> Filter be instantiated?
> Reason I ask is because I want to interect old
> bookmarked requests for an
> old site - which has been migrated to a new tomcat
> based JSP site - however
> the old site was ASP based.
>  
> Many users of the old site would have bookmarked
> something like:
> /index.asp?PageID=16 or something similar - and I am
> hoping to be able to
> intercept that - using a Filter seemed a logical
> choice - and send back a
> redirect to the new URL /some.jsp for those
> requests.
>  
> Thanks in advance,
>  
> Carl
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




___ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com

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



Re: TOMCAT + DATASOURCE + CONNECTION POOL

2005-12-12 Thread ALEX HYDE
Hey,
  
  I think though I'm not 100%
  
  When you declare the datasource in web.xml (or is Server.xml?) it  creates a 
pool factory for you under the covers (I think using Jakarta  DBCP). When you 
use JNDI look-up it asks the factory for a pool. You  are then magically using 
a pool. You specify the pool details in the  declaration in web.xml.

  Gluck.
  
Karthik <[EMAIL PROTECTED]> wrote:  

Hi

   I have sucessfully created a JDBC connection using DataSource and JNDI on
Tomcat5.x

   Is it necessary for create a Connection POOL using this DataSource based
Jdbc Connnection
   or will the DataSource itself provides the Connection POOL for managing
the JDBC connections
   on startup ,if so what needs to be done to increase the size of the
connection pool size.





with regards
Karthik


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





-
  Play Santa's Celebrity Xmas Party, an exclusive game from Yahoo! 

Re: Securing File System Resources ?

2005-12-13 Thread ALEX HYDE
Version 1 is the way I did. 
  
  Things I had to bare in mind are:
  - are you actually logging users in or are they authorised on a per 
individual file basis
  - can the user re-access the file or is it a one off access?
  
  Gluck
  
David Smith <[EMAIL PROTECTED]> wrote:  Either one or two are excellent choices 
with 1 being the best IMHO.  It
could be as simple as some other servlet places a flag in the session
that essentially says this user is good for downloading this file for
this session.  The servlet filter sees that and offers the file, or
failing to see the the flag, redirects the user to a friendly error page.

-David

Dov Rosenberg wrote:

>Our application has its own security model that controls access to our
>information based on our own roles and permissions. We store files related
>to our application on the file system where our application is running.
>These associated files are served out by a web server. Our goal is to come
>up with a scheme where we could apply our security  model to control access
>to these files via the web server. For example ­ someone associates a PDF
>with some meta data. We don¹t want the user to be able to bookmark the
>underlying URL and email it to their friends for them to download without
>having them authenticated by our service.
>
>We are looking at a couple of different ideas.
>
>1. Create a servlet filter to sit in front of the resources requests and
>somehow tie that into our application logic
>2. Create a regular proxy type of servlet that can accept requests and
>validate them using our security model
>3. Figure out a way to secure the filesystem using a Proxy server of some
>type.
>
>Any other thoughts or ideas are appreciated. Thanks in advance
>
>
>
>  
>


-- 
===
David Smith
Network Operations Supervisor
Department of Entomology
College of Agriculture & Life Sciences
Cornell University
2132 Comstock Hall
Ithaca, NY  14853
Phone: 607.255.9571
Fax: 607.255.0939


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





-
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre.

Re: Antwort: RE: Tomcat JDBC connection with Mysql

2005-12-15 Thread ALEX HYDE
Hi All,
  
  I have been developing a system using Tomcat on my Windows box at home.  I am 
now ready to deploy it to a server. I was thinking of using Fedora  Core 
because it is cheaper and I heard it has a fiarly good reputation.  Could 
anyone pass on any experiences of running Tomcat 4 on Linux or  even Fedora? I 
am starting with a clean box and will need to add java  and tomcat. COUld 
anyone point me in the dircetion of nay good  tutorials on this?
  
  Thanks all

Jan Behrens <[EMAIL PROTECTED]> wrote:  look here --> 
http://dev.mysql.com/doc/refman/4.1/en/connection-access.html

rtfm ;)

marju jalloh  schrieb am 12.12.2005 13:33:54:

> But how to Grant permission to an ip host
> 
> 
> Karthik  wrote:  hI
> 
> tHE PROBLEMS IS PRESENT WITHIN THE mysql SERVER,U NEED TO GIVE 
PERMISSION TO
> THE ip HOST U ARE USING
> 
> TRY USING THE GRANT PERMISSION AND USE THE SAME,BUT U HAVE TO FLUSH OUT 
ALL
> acl PREVELIAGES AVALIABEL IN MYSQL DB
> 
>USE A FRONT END LIKE MYSQL FRONT TO DO THIS
> 
> 
> 
> HOPE THIS HELPS.
> 
> 
> 
> 
> WITH REGARS
> kARTHIK
> 
> 
> 
> -Original Message-
> From: marju jalloh [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 12, 2005 4:53 PM
> To: Tomcat Users List
> Subject: Tomcat JDBC connection with Mysql
> 
> 
>  I can`connect to my database with via  servlet. The connection works 
well
> in PHP but not with servlet. I have  googled but no solution.
> 
>   this is my error page I got
> 
>   java.sql.SQLException: Data source rejected establishment of 
connection,
> message from server: "Host 'localhost.localdomain' is  not allowed to
> connect to this MySQL server"
>   at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:650)
>   at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
>   at com.mysql.jdbc.Connection.(Connection.java:452)
>   at
> 
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
>   at java.sql.DriverManager.getConnection(DriverManager.java:525)
>   at java.sql.DriverManager.getConnection(DriverManager.java:171)
>   at Liep.doGet(Liep.java:30)
>   ...
>   ...
>   Can anyone help or give me a pointer to a website
> 
>   Byfour
> 
> 
> 
> -
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> -
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping 

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





-
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre.

RE: Antwort: RE: Tomcat JDBC connection with Mysql

2005-12-15 Thread ALEX HYDE
Thanks for that Richard,
  
  I have to use fedora core 3 but I can use Tomcat 5 and probably should! 
Cheers for the heads up.
  
  Alex

Richard Mixon <[EMAIL PROTECTED]> wrote:  Jan,

Tomcat runs just fine on Linux. Use the most recent version (Fedora Core 4
is fine, or OpenSuse 10, or ...). These should come with a fairly recent
version of Tomcat (5.x or 5.5.x) or the packages should be available.

I prefer to install Tomcat myself on Linux, from a downloaded binary (tar.gz
file) as some of the Linux distributions break things up in various ways,
that I find a bit confusing (though I can also usually see the logic of it
too).

However, why in the world would you be developing with Tomcat 4 - it is two
major versions behind. If you had an existing production version to support,
that would be more understandable.  But you are starting out clean it seems
- there are many security and performance fixes are in Tomcat 5.5.

HTH - Richard


-Original Message-
From: ALEX HYDE [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 15, 2005 10:46 AM
To: Tomcat Users List
Subject: Re: Antwort: RE: Tomcat JDBC connection with Mysql

Hi All,
  
  I have been developing a system using Tomcat on my Windows box at home.  I
am now ready to deploy it to a server. I was thinking of using Fedora  Core
because it is cheaper and I heard it has a fiarly good reputation.  Could
anyone pass on any experiences of running Tomcat 4 on Linux or  even Fedora?
I am starting with a clean box and will need to add java  and tomcat. COUld
anyone point me in the dircetion of nay good  tutorials on this?
  
  Thanks all

Jan Behrens  wrote:  look here -->
http://dev.mysql.com/doc/refman/4.1/en/connection-access.html

rtfm ;)

marju jalloh  schrieb am 12.12.2005 13:33:54:

> But how to Grant permission to an ip host
> 
> 
> Karthik  wrote:  hI
> 
> tHE PROBLEMS IS PRESENT WITHIN THE mysql SERVER,U NEED TO GIVE
PERMISSION TO
> THE ip HOST U ARE USING
> 
> TRY USING THE GRANT PERMISSION AND USE THE SAME,BUT U HAVE TO FLUSH 
> OUT
ALL
> acl PREVELIAGES AVALIABEL IN MYSQL DB
> 
>USE A FRONT END LIKE MYSQL FRONT TO DO THIS
> 
> 
> 
> HOPE THIS HELPS.
> 
> 
> 
> 
> WITH REGARS
> kARTHIK
> 
> 
> 
> -Original Message-
> From: marju jalloh [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 12, 2005 4:53 PM
> To: Tomcat Users List
> Subject: Tomcat JDBC connection with Mysql
> 
> 
>  I can`connect to my database with via  servlet. The connection works
well
> in PHP but not with servlet. I have  googled but no solution.
> 
>   this is my error page I got
> 
>   java.sql.SQLException: Data source rejected establishment of
connection,
> message from server: "Host 'localhost.localdomain' is  not allowed to 
> connect to this MySQL server"
>   at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:650)
>   at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
>   at com.mysql.jdbc.Connection.(Connection.java:452)
>   at
> 
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
>   at java.sql.DriverManager.getConnection(DriverManager.java:525)
>   at java.sql.DriverManager.getConnection(DriverManager.java:171)
>   at Liep.doGet(Liep.java:30)
>   ...
>   ...
>   Can anyone help or give me a pointer to a website
> 
>   Byfour
> 
> 
> 
> -
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> -
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping

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




  
-
To help you stay safe and secure online, we've developed the all new Yahoo!
Security Centre.


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





-
How much free photo storage do you get? Store your holiday snaps for FREE with 
Yahoo! Photos. Get Yahoo! Photos

URLConnection

2005-12-16 Thread ALEX HYDE
Hi All,
  
  I need to make a very simple get request from a remote web server each time a 
user first comes into the site. 
  
  I wanted to just use the core HttpURLConnection class. It will be  thread 
safe because the object will be used and created in method  scope. In the Sun 
javadoc it says that underneath the covers, the  Connection can be shared. So 
the question is, is this an expensive  operation or am I ok to just create a 
new HttpURLConnection each time a  user first enters the site? I noticed that 
Apache Commons have a  version of an HttpClient, in which they explicitly 
mention pooling  connections in a multi-threaded environment. Can I just use 
the  standard HttpURLConnection or will I quickly run out of  
resources/connections? Should I be using something along the lines of  the 
Commons Client
  
  Thanks alot
  


-
Yahoo! Messenger  NEW - crystal clear PC to PC calling worldwide with voicemail 

Re: Mod_jk and Security

2005-12-21 Thread ALEX HYDE
I'm abstracting it to a db with a timeout included.
That way both Tomcat and Apache can check for a valid
user. 

--- Dave Morrow <[EMAIL PROTECTED]> wrote:

> Hi all.  I have a website running under Tomcat 5.5.9
> 
> I would like to use mod_jk to allow Apache to serve
> all static content however, I cannot figure out how
> to serve this content only if the user has already
> logged into the application.  This application uses
> Tomcat sessions.
> 
> Anyone have experience in this?
> 
> 
> David A. Morrow
> Technical Systems Lead
> Autodata Solutions Company
> [EMAIL PROTECTED]
> http://www.autodata.net
> 
> NEW !!! Tel: (519) 963-3020
> Fax: (519) 451-6615 
> 
> < Poor planning on your part does not necessarily
> constitute an emergency on my part! >
> 
> This message has originated from Autodata Solutions.
> The attached material is the Confidential and
> Proprietary Information of Autodata Solutions. 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 delete
> this message and notify the Autodata system
> administrator at [EMAIL PROTECTED]
> 
> 
> 




___ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com

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



Re: Comparing Tomcat Performance on Windows vs. Linux

2006-01-05 Thread ALEX HYDE
Stupid question Remy but are you refering to the
proces per java thread issue that had effected Linux?
I am well behind the times so is this all resolved? I
am soon to set-up a Tomcat server, preferably on Linux
FC3 with a 2.6 kernal. Would you know whether this is
suitable for running Tomcat under a reasonable load?

Thanks alot

--- Remy Maucherat <[EMAIL PROTECTED]> wrote:

> On 1/5/06, Michael Czeiszperger
> <[EMAIL PROTECTED]> wrote:
> > I thought that Tomcat users would be interested to
> know that we just
> > published an in-depth comparison of Tomcat
> performance on Windows and
> > Linux.
> >
> > The articles are available here:
> >
> > http://webperformance.com/library/reports
> >
> > It describes the very different behavior of the
> two platforms under
> > load, and shows there is a significant different
> in performance.
> > Under the restricted conditions of the test Linux
> was able to handle
> > 32% more load than Windows with identical versions
> of Tomcat on
> > identical hardware.
> 
> With the usage of APR in Tomcat 5.5.x, I would say
> the difference will
> be even bigger, as APR on Linux will use more
> efficient IO calls than
> on Windows.
> 
> So use Linux :) (note: please, don't use any Redhat
> Linux 2.4s kernels, though)
> 
> --
> x
> Rémy Maucherat
> Developer & Consultant
> JBoss Group (Europe) SàRL
> x
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




___ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com

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



Serving secured static content

2006-01-11 Thread ALEX HYDE
Dear group,
  
  I have been looking at how to best serve static content from my web-site. 
Most of the content is static. 
  
  I was looking at using Apache as a front to Tomcat and have that all up  and 
running. The problem is securing the content. I have written an  Apache plug-in 
using mod_perl but I'm no expert and am concerned about  how this might 
perform, for example, db connection pooling. 
  
  What is the the most recent recommendation on serving static content now? I 
can see a few options:
  - use Tomcat
  - use Apache and write a plug-in
  - use Pippo or seomthing like that
  
  Thanks alot.
   


-
Yahoo! Photos – NEW, now offering a quality print service from just 8p a photo.

RE: Using Tomcat 5.5 as a standalone web server

2006-01-11 Thread ALEX HYDE
Adam,
  
  I think I just posted a question on nearly this same topic.
  
  I found something called Pippo for static content and would be easier to 
configure as it sits in Tomcat. 
  
  Do you have security considerations? Have you had to add modules for securing 
content in Apache?   

Adam Johnston <[EMAIL PROTECTED]> wrote:  I like the sound of that idea - 
videos tend to change rarely, and are
prime candidates for caching. Is anyone actually using this
configuration?
Thanks. 

-Original Message-
From: Wouter Boers [mailto:[EMAIL PROTECTED] 
Sent: 10 January 2006 16:01
To: 'Tomcat Users List'
Subject: RE: Using Tomcat 5.5 as a standalone web server

There is quite an easy sollution. 

Run squid as you main webserver and as a web accelator in front of your
tomcat. From the squid config you can decide what your want cached and
what now. I don't understand why this is not done more often since its
A) a very easy sollution
B) does not loose any of the funtionality tomcat can offer you
C) allow to fine grain the load of tomcat completely

Only downsite, the squid cache in core memory gives of course the best
performance so as much memory as possible will help. On the other hand.
The HTML of much sites fits easily in 500MB core memory.

Regards, Wouter 

-Original Message-
From: Adam Johnston [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 10, 2006 3:43 PM
To: users@tomcat.apache.org
Subject: Using Tomcat 5.5 as a standalone web server

Hello all,
 
I am running a reasonable sized site, on Linux Red Hat + Tomcat 5.5.7.
The site is serving mainly Flash movies and servlets with streaming
video through a commercial codec, plus a full HTML version of the site.
Currently, I have Tomcat 5.5.7 integrated with Apache 2.0.46, which was
(very) difficult to set up, and now I am looking to rebuild my server
into a better configuration, I want to simplify my admin by running
Tomcat on its own to serve all content. 
 
My question is this : does anyone have experience of running a 500 000 -
1 000 000 page impressions / month site, including  elements such as I
mention above, on Tomcat alone? I want to avoid the web server
integration if Tomcat is up to it, but I would love to hear if anyone
else has been successful with Tomcat standalone before I do?
 
Many thanks!
 
Adam

 


This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential
or otherwise protected from disclosure. Dissemination, distribution or
copying of this e-mail or the information herein by anyone other than
the intended recipient, or an employee or agent responsible for
delivering the message to the intended recipient, is prohibited. If you
have received this e-mail in error, please immediately notify us by
calling the Help Desk at +44 20 7675
9666

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




This  email is intended only for the person or entity to which it is  addressed 
and may contain information that is privileged, confidential  or otherwise 
protected from disclosure. Dissemination, distribution or  copying of this 
e-mail or the information herein by anyone other than  the intended recipient, 
or an employee or agent responsible for  delivering the message to the intended 
recipient, is prohibited. If you  have received this e-mail in error, please 
immediately notify us by  calling the Help Desk at +44 20 7675 9666

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





-
Yahoo! Messenger  NEW - crystal clear PC to PC calling worldwide with voicemail 

Re: Images caching

2006-01-16 Thread ALEX HYDE
Hey Bello,

I'm fairly new to this but don't mind putting my two
pence worth in. 

I'm not that sure about the client side but I've heard
mention of something called Squid which can cache
static content quite well and would sit as a proxy in
front of Tomcat. 

Gluck

--- Bello Martinez  Sergio <[EMAIL PROTECTED]> wrote:

> Hi all,
> I have a web application in Tomcat 5.0 (standalone)
> that does image swapping
> for some mouse events. 
> My problem is that IE does a GET request everytime I
> change an image's src
> atribute. No matter if I
> preload all document images with imgX=new Image();
> imgX.src = '...', the
> browser always request the image
> from the server when I put the mouse over an image.
> I've tried to change
> browser cache settings, too.
> Does anybody know how can I do to avoid this? I've
> read resin lets you
> define things like ' url-pattern="*.gif" expires="60D"/>'
> Is there a way to do this with Tomcat? I would like
> to avoid using Apache
> for the moment.
> Thanks a lot,
> 
> Sergio
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




___ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com

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



Connection Pool Woes

2006-01-20 Thread Alex Turner
I am using Tomcat 5.5.12 on RedHat ES 4.

I have a server that is set to maxThreads="5", maxSpareThreads="5",
and when I use a Simply Data Source, that does not pooling, if I hit
the page a lot, I get over 30 connections opened, with database
connections that are not closing quickly at all.  If this runs in
production, I'm going to run out of database connections.

If I try a pooling datasource, the same thing happens, except the
server hangs on what I assume is the process to open a new connection
once it hit's the connection pool's maxConnections number.

I am using JSTL sql and core to do database queries, and I have a
servlet called InitServlet that instantiates a DataSource and sets it
as the default datasource.

I am using Postgresql as my database, and using Jdbc3PoolingDataSource
as my pooling datasource, and PGSimpleDataSource for my simple data
source.

What can I do to get these connections to close once a servlet or JSP
has finished running?  The plan is do have dozens of applications
running on this server, and if each app has it's own connection set,
I'm gonna run out of connections really fast.

Alex

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



Re: Connection Pool Woes

2006-01-20 Thread Alex Turner
It looks like the connection object was not being garbage collected
promptly (imagine that), and because it wasn't explicitly closed, it
was just hanging open until garbage collection happened (I'm more used
to python's garbage collector that is a bit more prompt).

Alex

On 1/20/06, Duan, Nick <[EMAIL PROTECTED]> wrote:
> The only way to close db connections is to do within your servlet/jsp
> application, i.e. java.sql.Connection.close().  But remember, the sql
> connections in the web apps are not the physical connections.  The
> physical connections are maintained by the db pool and they will remain
> open after the connections in the apps are closed, until the connection
> timeout is reached.
>
> The first thing is to make sure that the sql (or logical) connections
> are indeed closed in the app after an http session or user session is
> completed.  The next thing may be to reduce the timeout interval of the
> db connection pool.
>
> ND
>
> -Original Message-
> From: Alex Turner [mailto:[EMAIL PROTECTED]
> Sent: Friday, January 20, 2006 10:37 AM
> To: users@tomcat.apache.org
> Subject: Connection Pool Woes
>
> I am using Tomcat 5.5.12 on RedHat ES 4.
>
> I have a server that is set to maxThreads="5", maxSpareThreads="5",
> and when I use a Simply Data Source, that does not pooling, if I hit
> the page a lot, I get over 30 connections opened, with database
> connections that are not closing quickly at all.  If this runs in
> production, I'm going to run out of database connections.
>
> If I try a pooling datasource, the same thing happens, except the
> server hangs on what I assume is the process to open a new connection
> once it hit's the connection pool's maxConnections number.
>
> I am using JSTL sql and core to do database queries, and I have a
> servlet called InitServlet that instantiates a DataSource and sets it
> as the default datasource.
>
> I am using Postgresql as my database, and using Jdbc3PoolingDataSource
> as my pooling datasource, and PGSimpleDataSource for my simple data
> source.
>
> What can I do to get these connections to close once a servlet or JSP
> has finished running?  The plan is do have dozens of applications
> running on this server, and if each app has it's own connection set,
> I'm gonna run out of connections really fast.
>
> Alex
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Connection Pool Woes

2006-01-20 Thread Alex Turner
How do you deal with this when using pure JSTL sql calls using a
connection?  How does JSTL sql library release the connection at the
end of a page to ensure that connections don't get leaked?  For the
case when I'm using a servlet, I have put in an explicit close() call
on the connection, but some pages are pure JSP.

Alex.

On 1/20/06, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:
>
>
> > -Original Message-
> > From: Alex Turner [mailto:[EMAIL PROTECTED]
> > Subject: Re: Connection Pool Woes
> >
> > It looks like the connection object was not being garbage collected
> > promptly (imagine that), and because it wasn't explicitly closed, it
> > was just hanging open until garbage collection happened (I'm more used
> > to python's garbage collector that is a bit more prompt).
>
> Garbage collection should have nothing to do with it; don't confuse
> finalizers with finally clauses.  If your application operation is
> dependent on a finalizer, you're in a world of hurt.  There is no
> guarantee that a finalizer will _ever_ be run.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Setting up connection pools "on the fly"...

2006-01-20 Thread Alex Turner
Maybe you don't even want a connection pool, rather a simple
non-pooling datasource.  If you generate a pool of connections for
each and every database, you may end up with a great many open
connections to your database server that hardly ever get used.  I
don't know too much about MySQL, but  in most other databases, each
connection has certain allocated resources, and the database typically
limits the max connections.  I have a similar situation, but I use a
simple datasource, and a servlet to create a new datasource for each
database on initialization based on a database entries. You can easily
create a datasource on the fly in a servlet.  I don't know if this is
the 'right' answer, but it works for me.

Alex


On 1/20/06, Warrick Wilson <[EMAIL PROTECTED]> wrote:
> I've got a project where there's a basic interface, with some basic
> database access. However, when someone "signs up", then a new MySQL
> database will be allocated for them. There's security associated with
> it, and the user will have to log in to identify himself.
>
> How can I create a new connection pool for that new database for my
> web app? My current pool is set up in context.xml - do I modify that
> on the fly from my web app?
>
> What I'm doing currently is figuring out who the user is and which
> database he's associated with, and when I do any database work, the
> first statement is "USE " to get the proper database.
>
> Is there a better approach? More like a proper approach? (Says he who
> isn't sure he fully understands connection pools yet)
>
> --
> Warrick Wilson
> [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



root context

2006-01-21 Thread ALEX HYDE
Is it posible to set the root context to be a directory that doesn't yet exist, 
ie, a war file, that is yet to be exploded. Tomcat complained it could not find 
the context.


-
Yahoo! Photos – NEW, now offering a quality print service from just 8p a photo.

Re: Connection Pool Woes

2006-01-23 Thread Alex Turner
I'll just point out here that you actualy haven't pointed out any issue.

I asked a question as to how, and you repsonded that it was an issue
without ever explaing how, or if there even is a problem.

Somehow I doubt the JSTL authors were so short sighted as not to
release database connections properly.  I'm sure they had production
usage in mind when it was written, I'm just wondering how.

All you have written is FUD without any actual data or knowledge
included that would give me a way to make a decision based in fact. 
Give me some hard facts if you have any as to why I shouldn't use JSTL
sql library.

Alex.

On 1/23/06, Chris McCormack <[EMAIL PROTECTED]> wrote:
> Its poor practise to have a sql: jstl tag in production ready code.
>
> > How do you deal with this when using pure JSTL sql calls using a
> > connection?  How does JSTL sql library release the connection at the
> > end of a page to ensure that connections don't get leaked?
>
> For reasons exactly like this.
>
> __
> This email has been scanned for all viruses by the MessageLabs SkyScan
> service. For more information on a proactive anti-virus service working
> around the clock, around the globe, visit http://www.messagelabs.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Connection Pool Woes

2006-01-23 Thread Alex Turner
How does registering my pooling datasource with a naming directory
help connection management?  (Honest question - I really don't know)

Alex.

On 1/23/06, Asad Habib <[EMAIL PROTECTED]> wrote:
> You should use JNDI with your connection pool to ensure that connections
> are being managed appropriately.
>
> - Asad
>
>
> On Mon, 23 Jan 2006, Chris McCormack wrote:
>
> > Its poor practise to have a sql: jstl tag in production ready code.
> >
> >> How do you deal with this when using pure JSTL sql calls using a
> >> connection?  How does JSTL sql library release the connection at the
> >> end of a page to ensure that connections don't get leaked?
> >
> > For reasons exactly like this.
> >
> > __
> > This email has been scanned for all viruses by the MessageLabs SkyScan
> > service. For more information on a proactive anti-virus service working
> > around the clock, around the globe, visit http://www.messagelabs.com
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: problems running Tomcat

2006-02-08 Thread ALEX HYDE
You could try: http://10.2.254.103:8080

Riccardo Roasio <[EMAIL PROTECTED]> wrote:  Hi, i'm triyng to install Tomcat; i 
do like this:


tar xzvf apache-tomcat.tar.gz

mv apache-tomcat /usr/local/tomcat

cd tomcat

export TOMCAT_HOME=/usr/local/tomcat

and i triyed to run it with usr/local/tomcat/bin/startup.sh

it seems to start but if i try to see http://10.2.254.103 ( the address 
of the machine) from a browse  it says impossible to connect...


What's wrong?
Thanks


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





-
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre.

Symlinked directories

2006-02-08 Thread Alex Turner
Hi,

I'm using tomcat 5.5.12 on linux, and I'm wondering how I can get
tomcat to follow symlinks in a web app directory?

I have $CATALINA_ROOT/webapps/ROOT/pictures ->
/service/stuff/pictures, but tomcat ignores the symlink

Thanks,

Alex Turner

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



Re: jdbc context

2006-02-13 Thread ALEX HYDE
You might use JNDI in a way that's not tied to the  servlet engine. This could 
seperate it from the servlet engine  altogether, maybe LDAP or something.

Hadraba Petr <[EMAIL PROTECTED]> wrote:  Hi,

maybe helps this, but it's working on Tomcat 5.5.15:-(

http://mail-archives.apache.org/mod_mbox/tomcat-users/200602.mbox/[EMAIL 
PROTECTED]


PETR

On 2/13/06, chen jacky  wrote:
> hi,
>   Do you mean add the following code in the web.xml?
> 
>   DB Connection
>   jdbc/TestDB
>   javax.sql.DataSource
>   Container
>   
>
> But this still need to add the jdbc config in the server.xml,right?
> Can you give me some suggestions?
>
> >From: "Duan, Nick" 
> >Reply-To: "Tomcat Users List" 
> >To: "Tomcat Users List" 
> >Subject: RE: jdbc context
> >Date: Mon, 13 Feb 2006 10:11:34 -0500
> >
> >You should be able to add the context info in your web.xml file.  In
> >other words, instead of making the JDBC resource available to all web
> >apps, you make it only to particular applications.  If this JDBC
> >connection is only used by the workflow web app, defining it in web.xml
> >is actually preferred.
> >
> >ND
> >
> >-Original Message-
> >From: jacky [mailto:[EMAIL PROTECTED]
> >Sent: Monday, February 13, 2006 5:07 AM
> >To: users@tomcat.apache.org
> >Subject: jdbc context
> >
> >hi,
> >I have deploy a workflow webapp in Tomcat4.1.31. First time, i add
> >the following code in server.xml:
> >
> >
> >   
> >   
> >   

> >  maxActive
> > > >-->
> >  100
> > 

> > 

> >  maxIdle
> > > >0 for no limit. -->
> >  30
> > 

> > 

> >  maxWait
> > > >ms.An exception is thrown if this timeout is exceeded.Set to -1 to 
> > wait
> >indefinitely. -->
> >  15000
> > 

> > 

> >  removeAbandoned
> > 
> >  true
> > 

> > 

> >  removeAbandonedTimeout
> > > >seconds a DB connection has been idle before it is considered 
> > abandoned.
> >-->
> >  60
> > 

> > 

> >  logAbandoned
> > 
> >  false
> > 

> > 

> >  factory
> > 
> >  org.apache.commons.dbcp.BasicDataSourceFactory
> >   

> >
> >
usernamesa

> > 
password

> > 
driverClassName
> >
> >com.microsoft.jdbc.sqlserver.SQLServerDriver

> > 
url
> >
> >jdbc:microsoft:sqlserver://localhost:1433;databaseName=myworkflow
> >

> >   
> >
> >
> >It works well. But now, we need to migrate myworkflow into another
> >tomcat4.1.31, in which the server.xml can't be modified.
> >So what shall i do to deploy the jdbc context? Thanks for your help!
> >
> >  Best Regards.
> >jacky
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>




-
Yahoo! Messenger  NEW - crystal clear PC to PC calling worldwide with voicemail 

Adding a Customized authenticator

2006-02-25 Thread Alex Jalali
Hello,

I would like to extend the DigestAuthenticator class or BaseAuthenticator
and use that instead of the tomcat default. I have done that but I don't
know how to have it referenced in web.xml under security-constraint. Or
maybe in server.xml similar to the way you can create a customized Ream and
have it referenced in the server.xml as your custom realm.

Is there a  element I can add perhaps under security-constraint
element?
I like to add something like this to let tomcat know that it should use this
for authentication instead..

???

com.xxx.MyAuthenticator

???


I have this in my web.xml. 


 

  MyFooRealm
  xxx
  /*
 GET 
 OPTIONS 
 POST
 PUT
 HEAD
 PROPFIND
 PROPPATCH
 MKCOL
 COPY
 MOVE
 DELETE
 LOCK
 UNLOCK


  xxx
  xxx


  NONE
 
  
  
DIGEST
Server Realm
  

  
Authorized  Users Group
xxx
  






Adding a Customized authenticator

2006-02-25 Thread Alex Jalali

> Hello,
> 
> I would like to extend the DigestAuthenticator class or BaseAuthenticator
> and use that instead of the tomcat default. I have done that but I don't
> know how to have it referenced in web.xml under security-constraint. Or
> maybe in server.xml similar to the way you can create a customized Ream
> and have it referenced in the server.xml as your custom realm.
> 
> Is there a  element I can add perhaps under
> security-constraint element?
> I like to add something like this to let tomcat know that it should use
> this for authentication instead..
> 
> ???
> 
>   com.xxx.MyAuthenticator
> 
> ???
> 
> 
> I have this in my web.xml. 
> 
> 
>  
> 
>   MyFooRealm
>   xxx
>   /*
>  GET 
>  OPTIONS 
>POST
>PUT
>HEAD
>PROPFIND
>PROPPATCH
>MKCOL
>COPY
>MOVE
>DELETE
>LOCK
>UNLOCK
> 
> 
>   xxx
>   xxx
> 
> 
>   NONE
>  
>   
>   
> DIGEST
>   Server Realm
>   
> 
>   
> Authorized  Users Group
> xxx
>   
> 
> 
> 
> 


RE: Adding a Customized authenticator

2006-02-25 Thread Alex Jalali
So where would this go? under  ?? can you be more
specific.



 

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker
Sent: Saturday, February 25, 2006 1:15 PM
To: users@tomcat.apache.org
Subject: Re: Adding a Customized authenticator


"Alex Jalali" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> I would like to extend the DigestAuthenticator class or 
> BaseAuthenticator and use that instead of the tomcat default. I have 
> done that but I don't know how to have it referenced in web.xml under 
> security-constraint. Or maybe in server.xml similar to the way you can 
> create a customized Ream and have it referenced in the server.xml as 
> your custom realm.
>
> Is there a  element I can add perhaps under 
> security-constraint element?
> I like to add something like this to let tomcat know that it should 
> use this for authentication instead..
>
> ???
> 
> com.xxx.MyAuthenticator
> 
> ???
>

The syntax is:

 Any other
attributes you specify on the  element will be passed
JavaBean-style to MyAuthenticator.

>
> I have this in my web.xml.
>
>
> 
>
>  MyFooRealm
>  xxx
>  /*
> GET
> OPTIONS
> POST
> PUT
> HEAD
> PROPFIND
> PROPPATCH
> MKCOL
> COPY
> MOVE
> DELETE
> LOCK
> UNLOCK
>
>
>  xxx
>  xxx
>
>
>  NONE
>
>  
>  
>DIGEST
> Server Realm
>  
>
>  
>Authorized  Users Group
>xxx
>  
>
>
>
>
> 




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


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



RE: How to separate tomcat instances?

2006-02-28 Thread Alex Jalali
To save some disk space you could have one complete set of the binary
distribution and from your 3 directories, create symbolic links to static
files. They are most everything except config and log files and the startup
scripts. This is also good when you are upgrading tomcat or want to make
changes that should apply to all copies.



-Original Message-
From: Peter Crowther [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 27, 2006 9:14 AM
To: Tomcat Users List
Subject: RE: How to separate tomcat instances?

> From: lk [mailto:[EMAIL PROTECTED]
> I'm not sure my solutions is correct: I have 3 different directory, 
> and each directory contains a complete binary distribution of tomcat.
> And I have to startup each tomcat instance.
> Is it the good way?

It's not a *bad* way, as you can upgrade each one independently if required.
You could save a little disk space by merging the installations, but only a
few megabytes.

Yes, you'll have to start each instance - each is a separate process.
You could write a script to automate this.

- Peter

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



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



RE: Where is org.apache.catalina.realm.DataSourceRealm ?

2006-02-28 Thread Alex Jalali
It is contained within /tomcat/server/lib/catalina-optional.jar

After you create the class placed it under /tomcat/server/classes For some
reason when I place it in WEB-INF/classes, tomcat couldn't find it. Maybe my
class path error anyway

For configuration this is an example for mysql. I extended the JDBCRealm for
this...   




 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 28, 2006 2:12 AM
To: users@tomcat.apache.org
Subject: Where is org.apache.catalina.realm.DataSourceRealm ?

Hi,

We need a little extension to our configured DataSourceRealm. One of our
ideas ist to implement a custom realm which is mostly the same as
org.apache.catalina.realm.DataSourceRealm, but extended with a few lines of
our own code. Unfortunately, we cant find the
org.apache.catalina.realm.DataSourceRealm.class, but it is in the
src-package.

Is it possible to extend org.apache.catalina.realm.DataSourceRealm ?

If not, how exactly is it instantiatet ? It seems to be registered on the
fly to the MBean Server, can anyone tell me a little bit more about that
process or point me to some documentation where this task is described ?

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


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



Optimizing tomcat

2006-03-02 Thread Alex Jalali
Hello,

I have the following setup.

Java jdk 1.4.2
tomcat 5.0.19
Apache 2.0
mod_jk 2.0

ok there are 3 instances of tomcat and one of them with 4 webapps
contexts. and 3 large applications that are used a lot. And I do some
preloading of some data from database into objects at start up...

About every week or so I get out of memory errors... Some of them are due
to Java advanace imageing API. Its a little buggy but also sometimes
because of tomcat needing more memory. and I am fixing some of my own apps
bugs...

So my questions:

1. I experimented with setting JVM memory options larger but I am not sure
what's a good amount for each of the tomcats? 256MB.. 512MB...??

I only have 1GB of RAM and 2GB of swap and the machine has 2 Xeon and runs
Redhat.

2. based on what should I make changes to these settings? or should just
take the defaults?

maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" acceptCount="100"

3. If I upgrade JDK and tomcat would that improve things? I did see some
bugs related to JDK 1.4.2 but 1.5 could have some other things too :)

4. I don't use jsp and infact I could even run things on Jserv so what
tomcat version is faster and needs less memory?


Thanks











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



Re: DataSourceRealm Configuration Question (5.5.15)

2006-03-02 Thread Alex Jalali
It can be in the context. I have mine within the 
> Can a JNDI DataSourceRealm be defined in my web app's context.xml file,
> or must it be in the container's server.xml file?
>
> Thanks
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>




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



Re: Quick question

2006-03-02 Thread Alex Jalali
You would have to add those to the ../WEB-INF/lib/

In this case for javax.mail.* you would need to downlaod the java mail API
and put the mail.jar under that folder. Any package that you place in that
folder will be added to your class path automaticly. (for that conetext)
so there is no need to do anything else...

If you have more then one context and need to have a package available for
all of your webapps then you can place the .jar files in
tomcat/common/lib/...







> Hi,
>
> apologies if this is an easy quesion but time is not on my side:
>
> 1. At my company we use Sun Application Server 8.1 for development and
> production.
>
> However, its not the lightest, fastest software in the world and I'm
> thinking about switching to Tomcat for development and later in the
> development cycle back to Sun.
>
> Is it possible? I tried to deploy my war but i got errors about missing
> classes. these classes are part of the EE Java. For example javax.mail.*.
>
> Is that the diffrence between Tomcat and Sun? Or is it an easy fix?
>
> I don't use any enterprise features like EJBs or JMS.
>
> Thanks
>
> R
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



Re: Accessing the webapps

2006-03-03 Thread Alex Jalali
If I understand you correctly, then you need to set this property of context


 Hi all,
>
> I'm currently using Tomcat 5.0.28 On Linux.
> I have a webapps which is myfirstwebapp
> It is under $CATALINA_BASE/webapps.
>
> When i use a web browser using http://localhost:8080/myfirstwebapp, it
> works
> fine.
> What i want to do is to change the URL to
> http://localhost:8080/myappwithout
> changing the name of the webapps (ie
> $CATALINA_BASE/webapps/myfirstwebapp).
>
> Is there someting i can put in the context file in
> $CATALINA_BASE/conf/Catalina/localhost/myfirstwebapp.xml ?
>
> Many thanks for you help,
>
> Kind Regards,
>
> Farid.
>


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



Re: Testing DataSourceRealms

2006-03-03 Thread Alex Jalali
>
> I'm working on setting up BASIC authentication using container managed
> security in Tomcat 5.5.15.  However, It's not working so now I'm
> wondering if my set up is wrong.  The JNDI DataSource definitely works,
> I'm not so sure about the realm.  Is there another way to test it?
> Would you mind looking at my configuration files?
>
> This is what I have so far:
>
> *Context.xml*
>
> 
> 
>  type="javax.sql.DataSource"
> driverClassName="oracle.jdbc.driver.OracleDriver"
> url="jdbc:oracle:thin:@server:1521:SID"
> username="scott" password="tiger" maxActive="20" maxIdle="10"
> removeAbandoned="true"
> logAbandoned="true"
> maxWait="-1"/>
>
>  debug="99"
> dataSourceName="jdbc/NppDB"
> userTable="NPPUSER" userNameCol="EMAIL" userCredCol="PASSWORD"
> userRoleTable="USER_ROLE" roleNameCol="ROLE"/>
> 
>
> *web.xml*
> ...
> 
> jdbc/NppDB
> javax.sql.DataSource
> Container
> Shareable
> 
>
> 
> 
> 
> The whole site
> 
> /*
> POST
> GET
> 
> 
> member
> 
> 
>
> 
> member
> 
>
> 
> vendor
> 
>
> 
> BASIC
> NPP


Maybe I am wrong on this but I think this should be
org.apache.catalina.realm.DataSourceRealm

you reference NPP but I don't see that name in your realm


> 
> ...
> *end web.xml*
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



RE: Testing DataSourceRealms

2006-03-03 Thread Alex Jalali
Ok I got it... In the web.xml you need this reference

MyFooRealm


And in your realm you need to give it an app name.   


-Original Message-
From: James Reynolds [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 03, 2006 7:16 PM
To: Tomcat Users List [EMAIL PROTECTED]
Subject: RE: Testing DataSourceRealms

response inline...


-Original Message-
From: Alex Jalali [mailto:[EMAIL PROTECTED]
Sent: Fri 3/3/2006 4:09 PM
To: Tomcat Users List
Subject: Re: Testing DataSourceRealms
 
>
> I'm working on setting up BASIC authentication using container managed 
> security in Tomcat 5.5.15.  However, It's not working so now I'm 
> wondering if my set up is wrong.  The JNDI DataSource definitely 
> works, I'm not so sure about the realm.  Is there another way to test it?
> Would you mind looking at my configuration files?
>
> This is what I have so far:
>
> *Context.xml*
>
>  
>  type="javax.sql.DataSource"
> driverClassName="oracle.jdbc.driver.OracleDriver"
> url="jdbc:oracle:thin:@server:1521:SID"
> username="scott" password="tiger" maxActive="20" maxIdle="10"
> removeAbandoned="true"
> logAbandoned="true"
> maxWait="-1"/>
>
>  debug="99"
> dataSourceName="jdbc/NppDB"
> userTable="NPPUSER" userNameCol="EMAIL" userCredCol="PASSWORD"
> userRoleTable="USER_ROLE" roleNameCol="ROLE"/> 
>
> *web.xml*
> ...
> 
> jdbc/NppDB
> javax.sql.DataSource
> Container
> Shareable
> 
>
> 
> 
> 
> The whole site
> 
> /*
> POST
> GET
> 
> 
> member
> 
> 
>
> 
> member
> 
>
> 
> vendor
> 
>
> 
> BASIC
> NPP


Maybe I am wrong on this but I think this should be
org.apache.catalina.realm.DataSourceRealm

you reference NPP but I don't see that name in your realm


That's what I thought at first.  However, it turns out that the 
contains the descriptive text that shows up in the browser's popup dialog.

> 
> ...
> *end web.xml*
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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





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



RE: Testing DataSourceRealms

2006-03-03 Thread Alex Jalali
Also I don't know if you already have this... But in your context should
have privileged true...





 

-Original Message-
From: James Reynolds [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 03, 2006 7:16 PM
To: Tomcat Users List [EMAIL PROTECTED]
Subject: RE: Testing DataSourceRealms

response inline...


-Original Message-
From: Alex Jalali [mailto:[EMAIL PROTECTED]
Sent: Fri 3/3/2006 4:09 PM
To: Tomcat Users List
Subject: Re: Testing DataSourceRealms
 
>
> I'm working on setting up BASIC authentication using container managed 
> security in Tomcat 5.5.15.  However, It's not working so now I'm 
> wondering if my set up is wrong.  The JNDI DataSource definitely 
> works, I'm not so sure about the realm.  Is there another way to test it?
> Would you mind looking at my configuration files?
>
> This is what I have so far:
>
> *Context.xml*
>
>  
>  type="javax.sql.DataSource"
> driverClassName="oracle.jdbc.driver.OracleDriver"
> url="jdbc:oracle:thin:@server:1521:SID"
> username="scott" password="tiger" maxActive="20" maxIdle="10"
> removeAbandoned="true"
> logAbandoned="true"
> maxWait="-1"/>
>
>  debug="99"
> dataSourceName="jdbc/NppDB"
> userTable="NPPUSER" userNameCol="EMAIL" userCredCol="PASSWORD"
> userRoleTable="USER_ROLE" roleNameCol="ROLE"/> 
>
> *web.xml*
> ...
> 
> jdbc/NppDB
> javax.sql.DataSource
> Container
> Shareable
> 
>
> 
> 
> 
> The whole site
> 
> /*
> POST
> GET
> 
> 
> member
> 
> 
>
> 
> member
> 
>
> 
> vendor
> 
>
> 
> BASIC
> NPP


Maybe I am wrong on this but I think this should be
org.apache.catalina.realm.DataSourceRealm

you reference NPP but I don't see that name in your realm


That's what I thought at first.  However, it turns out that the 
contains the descriptive text that shows up in the browser's popup dialog.

> 
> ...
> *end web.xml*
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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





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



RE: Testing DataSourceRealms

2006-03-03 Thread Alex Jalali
I know I was making a point about privileged...


-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 03, 2006 8:31 PM
To: Tomcat Users List
Subject: RE: Testing DataSourceRealms

> From: Alex Jalali [mailto:[EMAIL PROTECTED]
> Subject: RE: Testing DataSourceRealms
> 
> Also I don't know if you already have this... But in your context 
> should have privileged true...
> 
> 

It's not , it's  - case matters.  Likewise, the file name
in META-INF must be context.xml, not Context.xml as the OP had in his first
post.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.

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



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



Upgrade has broken my jndi

2006-03-07 Thread ALEX HYDE
Hi All,

I've seen this one all over the user group but I seem
to have come to a dead end with this. I have upgraded
from tomcat 4 to 5 and I can't seem to get my app
working again. 

The part that has broken is the jndi datasource
look-up. I notice that I'm definitly not the first to
experience this problem. Perhaps things might have
been made a bit clearer. I thought I had set things up
correctly. I have extracted my old context from
server.xml and added it under my web app context. 



  

I now have this error where it had been working in
version 4. 

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of cla
ss '' for connect URL 'null'  

Thanks for your help.



___ 
Win a BlackBerry device from O2 with Yahoo!. Enter now. 
http://www.yahoo.co.uk/blackberry

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



Re: Upgrade to Tomcat 5.5 has broken my jndi

2006-03-08 Thread ALEX HYDE
Thanks for the help. 
  
  I seem to be able to get it working when I have a context file under my  
web-app in the meta-inf directory. But I am still unable to properly  configure 
a global datasource. Here is my context.xml. very  standard:
  
  
  
  
  
  
  
  

  If I remove this and instead add this to server.xml
  
  
  
  
  
  It no longer finds the datasource. My web.xml looks like this:
  
  
  JNDI Test
  
   Welcome to JNDI
   
  
  hello 
  jdbc/testdb
  javax.sql.DataSource
  SERVLET 
  
  
  
  I tried this, but it is failing to parse:
  
  
  JNDI Test
  
   Welcome to JNDI
   
  
  hello 
  jdbc/testdb
  javax.sql.DataSource
  
  
  
  Any input would be great. Thanks alot.
  
[EMAIL PROTECTED] wrote:  Follows is to do:

extract your Resource section from server.xml and copy to context.xml. I did 
the same and my jndi works very fine.

György 


"Tomcat Users List"  schrieb am 07.03.06 22:58:18:
> 
> here are the docs
> http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
> 
> I don't see them declare the "factory" attribute in 5.5, you didn't tell 
> us what version you were on
> 
> Filip
> 
> ALEX HYDE wrote:
> > Hi All,
> >
> > I've seen this one all over the user group but I seem
> > to have come to a dead end with this. I have upgraded
> > from tomcat 4 to 5 and I can't seem to get my app
> > working again. 
> >
> > The part that has broken is the jndi datasource
> > look-up. I notice that I'm definitly not the first to
> > experience this problem. Perhaps things might have
> > been made a bit clearer. I thought I had set things up
> > correctly. I have extracted my old context from
> > server.xml and added it under my web app context. 
> >
> > 
> > debug="0" reloadable="true"
> > crossContext="true">
> >
> >   
> > type="javax.sql.DataSource"
> >  maxActive="10" maxIdle="7" maxWait="5"
> > driverClassName="com.mysql.jdbc.Driver"
> >  url="jdbc:mysql://localhost:1521/testdb"
> > username="user1" password=""
> > factory="org.apache.commons.dbcp.BasicDataSourceFactory"
> >  />
> >
> > I now have this error where it had been working in
> > version 4. 
> >
> > org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
> > create JDBC driver of cla
> > ss '' for connect URL 'null'  
> >
> > Thanks for your help.
> >
> >
> >   
> > ___ 
> > Win a BlackBerry device from O2 with Yahoo!. Enter now. 
> > http://www.yahoo.co.uk/blackberry
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
Mit freundlichen Grüßen

Dr. György Kelemen
Email: [EMAIL PROTECTED]
Mobil: 0173 534 5668

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




-
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre.

RE: User authentication

2006-03-08 Thread Alex Jalali

Hello all,
Whatr is best way to create loging authentication if u had multipal login
form/pages.
please help me out.

When you say multiple form pages, are they all the same? Or do they login to
different webapps? If different webapps, you could use the SingleSignOn 
  

Can you explain more about your login form(s)?

--
Cup of Java + Suger of XML = Secure WebApp

XML makes me nauseous. I guess I must me diabetic :)



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



Apache Tomcat Redirect Match

2006-03-09 Thread ALEX HYDE
Hi All,
  
  Has Tomcat got an equivelent of Apache's HTTP's Redirect Match?
  
  Thanks alot
  

-
Yahoo! Photos – NEW, now offering a quality print service from just 8p a photo.

Re: How print HTTPResponse before sent to client?

2006-03-09 Thread Alex Jalali
This is a good tool to use

http://sourceforge.net/project/showfiles.php?group_id=55568&release_id=115444

> Hi.
>
> I use TomCat 5.5. on Windows and need to print the HTTPResponse stream
> that i send
> It is only a short text (50 characters or so) and i need to see it to
> help me with the debugging.
>
> Hope you can help me out!
>
> Best regards
> Øyvind
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



Re: Architecture question for all you gurus out there

2006-03-09 Thread Alex Jalali
It’s always better to not have fat clients and put as much of the logic on
the server side.

You say that this is a webapp client? So that means that your forms are
static. So your only choice is to use script language that runs on client
machine. This is also a bad thing. Since you don't know much about the
client machines.

I'm not familiar with this PowerBuilder but it sounds like a 2 tier system
where most everything is in the client side and some database in the back.
like .asp or php...

I would have instead of translating all logic to java, also reevaluate and
create a new structure. It’s like when you translate a human language you
don't do it word by word you also look at grammar and other contexts...

Finally if your client code MUST have a lot of build-in logic then perhaps
a web client is not a good solution for you. Maybe a Java application is
better. It can have event handling for your fields but the logic could
remain in the server side. You could for example use RMI for
communication.

Another option may be web services and XML...








> We have a fairly large client/server app that we converted to a java
> webapp.
> The original app was in powerbuilder. there were 2 types of rules applied
> to
> field rendering:
>
> 1) any rule that could be handled when the screen loaded was handled via
> screen level events, e.g., if a screen had fields with default values, or
> hidden fields under certain conditions, then these would be applied at
> screen entry via an onchange event for the screen
> 2) computed fields were handled via onChange events on the field, e.g., if
> field x changes, change field y
>
> The 'field rules' could be any valid powerscript expression
>
> What we have done is mimicked this in java. we process the same way as
> above, except we dynamically convert (very painfully) the powerscript into
> java syntax, then run the rules as above, by passing the converted rules
> to
> an embedded java interpreter (BeanShell)
>
> The problem is if you have sophisticated rules, or rules which affect many
> different fields, e.g., if field x changes, change field y, but if field y
> changes, change field z, etc... This becomes very slow - up to 15 seconds
> for a screen to render or change completely. Not to mention the complexity
> of the rules management.
>
> Is there a better way???
>
> John McClain
> Senior Software Engineer
> TCS Healthcare
> [EMAIL PROTECTED]
> (530)886-1700x235
> "Skepticism is the first step toward truth"
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



Re: TomCat + mod_jk performance

2006-03-17 Thread Alex Jalali
If you have lots of static html pages then apache is much better at
handling them. For other dynamic content like .jsp tomcat has to handle
the requests. So thats why you would have apache + the mod_jk connector.
If all your files are jsp and you don't need static page serving or other
features of Apache, then you can run tomcat stand-alone.


for testing load you can use Jmeter

http://jakarta.apache.org/jmeter/index.html



--
Alex Jalali
I(2) Drive Team!

I(2) Drive Online Storage
http://www.i2drive.com
--

> Hi,
>
> My server is a bit 'slow'. It takes me a while to receive my pages
> when I hit the site.
>
> How fast is tomcat when using apache +  mod_jk?
> Is there any performance test I can apply on my server to check if it
> is tomcat or my badwidth?
>
> Thank you
>
> Vanessa Campos
> [EMAIL PROTECTED]
> ICQ 35381281
>
> "Efetivamente, para o homem, enquanto homem, nada tem valor a menos que
> ele possa executa-lo com entusiasmo" Max Weber
>
>
>
>
>
>
>
>
> ___
> Yahoo! doce lar. Faça do Yahoo! sua homepage.
> http://br.yahoo.com/homepageset.html
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



RE: TomCat + mod_jk performance

2006-03-17 Thread Alex Jalali
Interesing article. I've done more basic tests with tomcat 5.0.19 and jdk
1.4.2 and apache 2.0.??  apache was faster.

Maybe the problem is when I was testing static pages, it wasn't tomcat as
stand-alone vs. apache it was apache vs. tomcat + connector + apache

also I run the test locally on a windows machine. so perhaps java runs
slower on windows.

Although i do have this question about non-static pages. Which do you
think is faster? let say you have 1GB ram and 2 CPUs. running a) apache +
1 tomcat or b) apache + 2 tomcat in cluster via mod_jk? would having 2 JVM
on the same server that has two CPU's run faster or it wouldn't make any
diffrence?
do you know of any tests done for clusters






>> From: Alex Jalali [mailto:[EMAIL PROTECTED]
>> Subject: Re: TomCat + mod_jk performance
>>
>> If you have lots of static html pages then apache is much better at
>> handling them.
>
> Have you actually measured this on the current version of Tomcat, or are
> you just echoing what you've heard?  If you try 5.5.x with the APR
> connector, I think you'll find little difference in performance between
> Tomcat and httpd for static content.
>
> This is an interesting read:
> http://tomcat.apache.org/articles/benchmark_summary.pdf
>
> (Note that the above article does not reflect the latest improvements in
> Tomcat performanc.)
>
> There are reasons to front-end Tomcat with httpd, but static content
> performance is no longer one of them.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



Re: Better Linux Distribution for production environment

2006-03-23 Thread Alex Turner
I used to use RedHat, but switched to SuSe as the package selection was more
up to date.  RedHat seems to lag seriously behind current versions of
software, and many third party apps require the latest and greatest, which
RedHat often doesn't provide in it's enterprise solution.  Is RedHat tested
better, perhaps, but it doesn't matter if it doesn't come with what I need.

Alex

On 3/23/06, korbben <[EMAIL PROTECTED]> wrote:
>
>
> Hi all,
> Which Linux distribution can i choose for production environment ?
> (server:
> 4go ram, 1 processor, Apache, MySql, Tomcat with 20 webapps).
> Thanks.
> Korbben.
> --
> View this message in context:
> http://www.nabble.com/Better-Linux-Distribution-for-production-environment-t1329639.html#a3549917
> Sent from the Tomcat - User forum at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Recommended Specs for Oracle 10g db server

2006-03-25 Thread Alex Turner
Turn off hyperthreading for starters.
Oracle requires a minimum of 5 seperate logical disks to function at optimal
in a production environment.  You will need a good raid controller, and a
good disk array to get any kind of decent insert speed.
You will need to do some serious oracle tuning, there are some good books
available out there for this.  But at the very least you need to set the SGA
to about 2.5 Gig, and tune the other memory usage things.  Profile your
database and find out which queries are running slow and why.  Look at
statspack (at least that's what we use in Oracle 9i) which can generate some
good reports.

Alex

On 3/25/06, Mohan Wickramasinghe <[EMAIL PROTECTED]> wrote:
>
> We have 12 jboss nodes using a single oracle 10g db server with following
> specs...
>
> 4GB RAM
> Dual CPU HT 3.2GHz Intel
> RHEL 4 smp
>
> We see load average going to 10 on a very regular basis and 30-90 during
> peak hours and see the database as the bottleneck to our application
> performance.
>
> We also had issue with c3p0 connections from nodes having issues and
> upgraded it.
>
> Can someone recommend machine (HW) specs for a oracle 10g database under
> these conditions please.
>
> regards
> mohan
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


  1   2   3   4   >