R: how to read files in file system

2012-09-18 Thread Ge Gestione Elaboratori(IBM Business Partner)
Excuse me Dan: attached the screenshot. paolo -Messaggio originale- Da: Daniel Mikusa [mailto:dmik...@vmware.com] Inviato: martedì 11 settembre 2012 13.51 A: Tomcat Users List Oggetto: Re: how to read files in file system On Sep 11, 2012, at 3:11 AM, IBM partner Gestione Elaboratori

Re: R: how to read files in file system

2012-09-18 Thread mailingl...@j-b-s.de
Try: URI uri = new URI(file//c:/..); // win Or file:///yourdir/.. on unix (note 3 /). From uri you can get the url and from here you can open an inputstream or you can use new File(url.toFile()) To access a resource from your classpath the following will do: URL url =

Re: warDirectory property wrong evaluated in release version 2.0 ?

2012-09-18 Thread Olivier Lamy
Thanks it's now fixed. 2012/9/17 Florian Maertl florian.maer...@macquarie.com: Jira is raised: https://issues.apache.org/jira/browse/MTOMCAT-175 Thanks Florian -Original Message- From: Olivier Lamy [mailto:ol...@apache.org] Sent: Montag, 17. September 2012 15:19 To: Tomcat

Re: Problems loading external jar in my app !

2012-09-18 Thread joel badia escolà
I tried all the things that you expose, but without results :( Is it possible that the Debian installation disable tomcat auto WEB-INF checking? If it's possible, can you tell me where I can find this magic configuration file? I have another theory, Is it possible that the jar i'm using needs

Re: Problems loading external jar in my app !

2012-09-18 Thread Konstantin Kolinko
2012/9/18 joel badia escolà basto...@gmail.com: I tried all the things that you expose, but without results :( Is it possible that the Debian installation disable tomcat auto WEB-INF checking? If it's possible, can you tell me where I can find this magic configuration file? 1. It is not

Re: Problems loading external jar in my app !

2012-09-18 Thread joel badia escolà
The placement it's correct i'm using Debian and my app it's deployed in /var/lib/tomcat6/webapps/ROOT/DiseaseDiscovery (where $CATALINA_BASE=/var/lib/tomcat6). This is the full tree of my webapp: . |-- disease_discover.jsp |-- disease_discover.jsp~ |-- disease_simpts.jsp |-- disease_simpts.jsp~

Re: Problems loading external jar in my app !

2012-09-18 Thread Vishwanath Washimkar
Hi , why are you putting your webapplication under /var/lib/tomcat6/webapps/ROOT/DiseaseDiscovery . This make DiseaseDirecovery a part of the root web appliction. Put the webapplication in under the webapps directory : /var/lib/tomcat6/webapps/ROOT/DiseaseDiscovery I think u jars are not

Re: Problems loading external jar in my app !

2012-09-18 Thread Konstantin Kolinko
2012/9/18 joel badia escolà basto...@gmail.com: The placement it's correct i'm using Debian and my app it's deployed in /var/lib/tomcat6/webapps/ROOT/DiseaseDiscovery (where $CATALINA_BASE=/var/lib/tomcat6). This is the full tree of my webapp: . |-- disease_discover.jsp |--

Re: Problems loading external jar in my app !

2012-09-18 Thread Vishwanath Washimkar
remove the DiseaseDiscovery and put it in webapps directory and u should be good to go. Make it simple On Tue, Sep 18, 2012 at 6:11 PM, Konstantin Kolinko knst.koli...@gmail.comwrote: 2012/9/18 joel badia escolà basto...@gmail.com: The placement it's correct i'm using Debian and my app it's

Re: Problems loading external jar in my app !

2012-09-18 Thread André Warnier
Konstantin Kolinko wrote: 2012/9/18 joel badia escolà basto...@gmail.com: ... 2. You have not read the wikipedia article I think that we should implement a filter on the list, which automatically throws away any top-posted message. ;-)

Accessing CoyoteRequest attributes in a Servlet

2012-09-18 Thread Philip Kahle
Hi all, I am trying to set up a Java Web Application using Servlets and JSPs in Tomcat 7. User authentication should be done on a central Shibboleth Identity Provider. I have already configured Apache including mod_ssl, mod_proxy_ajp and the shib2 module following these instructions:

Re: Problems loading external jar in my app !

2012-09-18 Thread joel badia escolà
1. The ROOT web application is the wrong place for your files. All web applications are independent. The ROOT application is just one of them. Perfect with this i solve the problem ;) 2. You have not read the wikipedia article I'm not sure if I understand completely the full article,

Re: Accessing CoyoteRequest attributes in a Servlet

2012-09-18 Thread André Warnier
Philip Kahle wrote: Hi all, I am trying to set up a Java Web Application using Servlets and JSPs in Tomcat 7. User authentication should be done on a central Shibboleth Identity Provider. I have already configured Apache including mod_ssl, mod_proxy_ajp and the shib2 module following these

Re: Problems loading external jar in my app !

2012-09-18 Thread André Warnier
joel badia escolà wrote: 1. The ROOT web application is the wrong place for your files. All web applications are independent. The ROOT application is just one of them. Perfect with this i solve the problem ;) 2. You have not read the wikipedia article I'm not sure if I understand

Re: Accessing CoyoteRequest attributes in a Servlet

2012-09-18 Thread André Warnier
André Warnier wrote: Philip Kahle wrote: Hi all, I am trying to set up a Java Web Application using Servlets and JSPs in Tomcat 7. User authentication should be done on a central Shibboleth Identity Provider. I have already configured Apache including mod_ssl, mod_proxy_ajp and the shib2

Fwd: Setting initial memory for a Tomcat Windows Service

2012-09-18 Thread Patrick Flaherty
Hello, Is this a bug or am I doing this wrong ? Thanks again, Pat Begin forwarded message: From: Patrick Flaherty pflah...@rampageinc.com Date: September 13, 2012 6:19:34 PM EDT To: Tomcat Users List users@tomcat.apache.org Subject: Re: Setting initial memory for a Tomcat Windows Service

mod_jk vs. mod_proxy

2012-09-18 Thread Shanti Suresh
All, I wanted your opinion on this topic. I was heavily into using mod_jk a few years back. But I have since started using mod_proxy for the following reasons: (1) mod_proxy is easier to configure (2) I remember reading that mod_jk is deprecated (3) Logging for mod_proxy appears inline with

Re: Verifying mod_jk is installed

2012-09-18 Thread André Warnier
John Rellis wrote: Hey, I would very much appreciate some help, flying blind at the moment. I want to use mod_jk as a load balancer to two remote tomcat instances and I am failing so I need to verify the steps. I have installed mod_jk, I will paste the mod_jk log to the end of the email. Is

Re: mod_jk vs. mod_proxy

2012-09-18 Thread Daniel Mikusa
On Sep 18, 2012, at 10:04 AM, Shanti Suresh wrote: All, I wanted your opinion on this topic. I was heavily into using mod_jk a few years back. But I have since started using mod_proxy for the following reasons: (1) mod_proxy is easier to configure (2) I remember reading that mod_jk is

Re: Fwd: Setting initial memory for a Tomcat Windows Service

2012-09-18 Thread David kerber
On 9/18/2012 10:03 AM, Patrick Flaherty wrote: Hello, Is this a bug or am I doing this wrong ? I'm not totally sure what you're asking about, but I have found that tomcat7w does not always reflect the current settings if you have made changes. IIRC, I usually need to restart it to get it

Re: Verifying mod_jk is installed

2012-09-18 Thread John Rellis
André, Thanks! OK, so I put JkMount /jkmanager/ jkstatus JkMount /jkmanager/* jkstatus Into apache2.conf and no success. I did however put it in sites-available/default VirtualHost *:80 ServerAdmin webmaster@localhost JkMount /jkmanager/ jkstatus

Re: Verifying mod_jk is installed

2012-09-18 Thread André Warnier
John Rellis wrote: André, Thanks! OK, so I put JkMount /jkmanager/ jkstatus JkMount /jkmanager/* jkstatus Into apache2.conf and no success. I did however put it in sites-available/default VirtualHost *:80 ServerAdmin webmaster@localhost JkMount /jkmanager/

Re: Setting initial memory for a Tomcat Windows Service

2012-09-18 Thread Patrick Flaherty
On Sep 18, 2012, at 10:11 AM, David kerber wrote: On 9/18/2012 10:03 AM, Patrick Flaherty wrote: Hello, Is this a bug or am I doing this wrong ? I'm not totally sure what you're asking about, but I have found that tomcat7w does not always reflect the current settings if you have made

Re: Setting initial memory for a Tomcat Windows Service

2012-09-18 Thread David kerber
On 9/18/2012 11:29 AM, Patrick Flaherty wrote: On Sep 18, 2012, at 10:11 AM, David kerber wrote: On 9/18/2012 10:03 AM, Patrick Flaherty wrote: Hello, Is this a bug or am I doing this wrong ? I'm not totally sure what you're asking about, but I have found that tomcat7w does not always

Re: Verifying mod_jk is installed

2012-09-18 Thread John Rellis
On Tue, Sep 18, 2012 at 3:56 PM, André Warnier a...@ice-sa.com wrote: John Rellis wrote: André, Thanks! OK, so I put JkMount /jkmanager/ jkstatus JkMount /jkmanager/* jkstatus Into apache2.conf and no success. I did however put it in sites-available/default

Re: Setting initial memory for a Tomcat Windows Service

2012-09-18 Thread Patrick Flaherty
On Sep 18, 2012, at 11:39 AM, David kerber wrote: On 9/18/2012 11:29 AM, Patrick Flaherty wrote: On Sep 18, 2012, at 10:11 AM, David kerber wrote: On 9/18/2012 10:03 AM, Patrick Flaherty wrote: Hello, Is this a bug or am I doing this wrong ? I'm not totally sure what you're asking

Re: Setting initial memory for a Tomcat Windows Service

2012-09-18 Thread David kerber
On 9/18/2012 11:52 AM, Patrick Flaherty wrote: On Sep 18, 2012, at 11:39 AM, David kerber wrote: On 9/18/2012 11:29 AM, Patrick Flaherty wrote: On Sep 18, 2012, at 10:11 AM, David kerber wrote: On 9/18/2012 10:03 AM, Patrick Flaherty wrote: Hello, Is this a bug or am I doing this wrong

Re: Verifying mod_jk is installed

2012-09-18 Thread David kerber
On 9/18/2012 11:46 AM, John Rellis wrote: On Tue, Sep 18, 2012 at 3:56 PM, André Warniera...@ice-sa.com wrote: John Rellis wrote: André, Thanks! OK, so I put JkMount /jkmanager/ jkstatus JkMount /jkmanager/* jkstatus Into apache2.conf and no success. I did however put

Re: Accessing CoyoteRequest attributes in a Servlet

2012-09-18 Thread Philip Kahle
Am 18.09.2012 15:47, schrieb André Warnier: André Warnier wrote: Philip Kahle wrote: Hi all, I am trying to set up a Java Web Application using Servlets and JSPs in Tomcat 7. User authentication should be done on a central Shibboleth Identity Provider. I have already configured Apache

Re: Setting initial memory for a Tomcat Windows Service

2012-09-18 Thread Patrick Flaherty
On Sep 18, 2012, at 12:08 PM, David kerber wrote: On 9/18/2012 11:52 AM, Patrick Flaherty wrote: On Sep 18, 2012, at 11:39 AM, David kerber wrote: On 9/18/2012 11:29 AM, Patrick Flaherty wrote: On Sep 18, 2012, at 10:11 AM, David kerber wrote: On 9/18/2012 10:03 AM, Patrick Flaherty

Re: Accessing CoyoteRequest attributes in a Servlet

2012-09-18 Thread Mark Thomas
On 18/09/2012 17:13, Philip Kahle wrote: Am 18.09.2012 15:47, schrieb André Warnier: André Warnier wrote: Philip Kahle wrote: Hi all, I am trying to set up a Java Web Application using Servlets and JSPs in Tomcat 7. User authentication should be done on a central Shibboleth Identity

Latest Tomcat release question...

2012-09-18 Thread Tony Anecito
Hi All,   Has anyone tried the newest Tomcat release and noticed any performance differences? My startup is 20 seconds but it is not often I restart my Tomcat server due to it being so stable but I am interested in any performance gain when it is executing and a request is going through the

Re: mod_jk vs. mod_proxy

2012-09-18 Thread Shanti Suresh
Hi Dan, On Tue, Sep 18, 2012 at 10:10 AM, Daniel Mikusa dmik...@vmware.com wrote: I've not heard this. Where did you read this? My apologies! I read wrong. It must have been about mod_jk2. I found this article helpful.

Re: Clustering Question

2012-09-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John, On 9/17/12 5:20 PM, John Rellis wrote: Thanks Chris. My replies will be a little sporadic as I am cooking a 10 pm dinner :) From what I was reading I thought I could hit some sort of manager there but it was never able to, when I hit

Tomcat7 + WebSocket + mod_jk

2012-09-18 Thread sfwicket
My WebSocket connection is closing briefly after opening because I have Apache httpd on port 80 with mod_jk running in front of my Tomcat instance on port 8080. When I connect directly on 8080 to Tomcat the WebSocket app works. What is the recommended configuration to allow a WebSocket app to

Re: Tomcat7 + WebSocket + mod_jk

2012-09-18 Thread Mark Thomas
On 18/09/2012 20:07, sfwicket wrote: My WebSocket connection is closing briefly after opening because I have Apache httpd on port 80 with mod_jk running in front of my Tomcat instance on port 8080. When I connect directly on 8080 to Tomcat the WebSocket app works. What is the

Re: Latest Tomcat release question...

2012-09-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tony, On 9/18/12 1:58 PM, Tony Anecito wrote: Has anyone tried the newest Tomcat release and noticed any performance differences? My startup is 20 seconds but it is not often I restart my Tomcat server due to it being so stable but I am

Re: Latest Tomcat release question...

2012-09-18 Thread Mark Thomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 18/09/2012 20:27, Christopher Schultz wrote: There are 3 things I can think of that could make your Tomcat start slowly: 1. Insufficient entropy in /dev/random 2. DNS timeouts 3. Your webapp does a lot of stuff on startup One of which is

Re: mod_jk vs. mod_proxy

2012-09-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Shanti, On 9/18/12 10:04 AM, Shanti Suresh wrote: All, I wanted your opinion on this topic. I was heavily into using mod_jk a few years back. But I have since started using mod_proxy for the following reasons: (1) mod_proxy is easier to

Re: Tomcat7 + WebSocket + mod_jk

2012-09-18 Thread sfwicket
Assuming you mean you can't use mod_jk with a WebSocket app... More generally speaking, what is the Best Practice for configuring a production environment stack utilizing a Tomcat Web App which uses WebSockets? Load Balancer, Apache, Tomcat - and specifically - the proxying of traffic on port

Re: Tomcat7 + WebSocket + mod_jk

2012-09-18 Thread Nikos Viorres
Unless you are going to need more than one web container i really don't see the reason to use Apache HTTPD as a reverse proxy, provided that you have installed and are using the APR connector. As for the anwser to the question how do you achieve proxying of websocket communication i think there is

Re: Tomcat7 + WebSocket + mod_jk

2012-09-18 Thread sfwicket
So run a single instance of Tomcat on port 80 with no HAProxy or Apache and hit it directly in production env sounds like the only answer? And subsequently all static content deployed with that web app will be served by Tomcat? With no load distribution between instances using an LB? Looking for

Re: Tomcat7 + WebSocket + mod_jk

2012-09-18 Thread Mark Thomas
On 18/09/2012 21:07, sfwicket wrote: So run a single instance of Tomcat on port 80 with no HAProxy or Apache and hit it directly in production env sounds like the only answer? And subsequently all static content deployed with that web app will be served by Tomcat? With no load distribution

Re: Tomcat7 + WebSocket + mod_jk

2012-09-18 Thread Nikos Viorres
Tomcat (with the APR connector) serves static content just fine. Unless you need load balancing tomcat will do just fine. On Tue, Sep 18, 2012 at 11:07 PM, sfwicket li...@bgb.net wrote: So run a single instance of Tomcat on port 80 with no HAProxy or Apache and hit it directly in production

Re: Tomcat7 + WebSocket + mod_jk

2012-09-18 Thread Nikos Viorres
That is of course a solution, but then prepare to have problems with firewalls, proxies etc. On Tue, Sep 18, 2012 at 11:09 PM, Mark Thomas ma...@apache.org wrote: On 18/09/2012 21:07, sfwicket wrote: So run a single instance of Tomcat on port 80 with no HAProxy or Apache and hit it

Re: Tomcat7 + WebSocket + mod_jk

2012-09-18 Thread Mark Thomas
On 18/09/2012 21:13, Nikos Viorres wrote: That is of course a solution, but then prepare to have problems with firewalls, proxies etc. Separate hostname then, still on port 80. Mark - To unsubscribe, e-mail:

Re: Tomcat7 + WebSocket + mod_jk

2012-09-18 Thread Nikos Viorres
If i am not mistaken, this is considered XSS and is not allowed, although a different port is. I was looking at websockets a couple of months ago for an enterprise app and decided against using them for these problems, i went with Long polling and async requests instead which are compabtible with

Re: Tomcat7 + WebSocket + mod_jk

2012-09-18 Thread Mark Thomas
On 18/09/2012 21:27, Nikos Viorres wrote: If i am not mistaken, this is considered XSS and is not allowed, Yes, you are mistaken. The WebSocket spec specifically considers this scenario and there are security controls in place if you wish to use them. Mark although a different port is. I was

Re: Tomcat7 + WebSocket + mod_jk

2012-09-18 Thread Nikos Viorres
Thanks, i ll look into that On Tue, Sep 18, 2012 at 11:30 PM, Mark Thomas ma...@apache.org wrote: On 18/09/2012 21:27, Nikos Viorres wrote: If i am not mistaken, this is considered XSS and is not allowed, Yes, you are mistaken. The WebSocket spec specifically considers this scenario and

Re: Latest Tomcat release question...

2012-09-18 Thread Tony Anecito
Thanks Christopher, I have not started using 7.0.30 yet and I do have connection pools setup on startup I believe 5 or 6 of them which may account for the 20 seconds. What I was interested in is after startup using 7.0.30 has anyone noticed a performance improvement for their apps? Thanks,

RE: Tomcat7 + WebSocket + mod_jk

2012-09-18 Thread Hedrick, Brooke - 43
-Original Message- From: sfwicket [mailto:li...@bgb.net] Sent: Tuesday, September 18, 2012 3:08 PM To: users@tomcat.apache.org Subject: Re: Tomcat7 + WebSocket + mod_jk So run a single instance of Tomcat on port 80 with no HAProxy or Apache and hit it directly in production env sounds

Re: Latest Tomcat release question...

2012-09-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tony, On 9/18/12 4:55 PM, Tony Anecito wrote: Thanks Christopher, I have not started using 7.0.30 yet and I do have connection pools setup on startup I believe 5 or 6 of them which may account for the 20 seconds. What I was interested in is

Re: Clustering Question

2012-09-18 Thread John Rellis
On Sep 18, 2012 7:26 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John, On 9/17/12 5:20 PM, John Rellis wrote: Thanks Chris. My replies will be a little sporadic as I am cooking a 10 pm dinner :) From what I was

WebSocketServlet BASIC auth

2012-09-18 Thread Gismor3
Hello everybody, I'm testing a web application to use WebSocket with Tomcat 7.0.30. I would like my WebSocket connection to be protected and accessible only from authenticated user. In particular I would like to use the BASIC authentication. From what I understand I thought that by adding the

Re: WebSocketServlet BASIC auth

2012-09-18 Thread Mark Thomas
On 18/09/2012 23:04, Gismor3 wrote: What do I need to do in order to restrict the access to the application? Thanks in advance The WebSocket protocol does not include any concept of an authentication challenge. I tested this recently and the browsers drop the connection if they get a 401

Re: Accessing CoyoteRequest attributes in a Servlet

2012-09-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 9/18/12 9:47 AM, André Warnier wrote: Still talking about mod_jk, basically anything you set in Apache httpd using SetEnv for example, gets passed to Tomcat as a request attribute, through the AJP protocol. You need to use JkEnvVar if

Re: Latest Tomcat release question...

2012-09-18 Thread Tony Anecito
Hi Christopher,   Thanks for the heads up about the memory issue. I looked over the release notes before I posted here and did not remember reading that.  I do not use spring either and glad for that but I do use JAX-WS and am working on swithing to JAX-RS and there are quite a few libraries