Re: How do you access all sessions from a servlet in tomcat 6.0?

2007-09-18 Thread Lyallex
How about creating a SessionListener class SomeSessionListener implements HttpSessionListener ... Register it in web.xml in the sessionCreated method of your listener get a reference to the new session from the HttpSessionEvent you can now access the getLastAccessedTime(), maybe store the refs

How do you access all sessions from a servlet in tomcat 6.0?

2007-09-18 Thread gary . l . johnstone
We have tomcat configured to allow users sessions to stay alive for 12 hours. This is because this is how they like to work, login once at the start of the day and shutdown at the end of the day. I have a need to track their actual activity, like a concurrent license tool, and thought the best

Re: Changing ROOT context

2007-09-18 Thread Waseem Azhar
Just open your server.xml add line Context path= docBase=your-app-name debug=99 reloadable=true/ in the next line of your host configuration example : Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=

Re: How do you access all sessions from a servlet in tomcat 6.0?

2007-09-18 Thread gary . l . johnstone
Thanks Duncan after a quick read on session listeners that looks like it will do the trick. Gary ___ Gary Johnstone Engineering IT Cummins Turbo Technologies Ltd +44 1484 440532 _ This e-mail transmission and any attachments to it are intended solely for

Re: grant codeBase not working for my jar

2007-09-18 Thread Sam Halliday
On 18 Sep 2007, at 03:08, Mark Thomas wrote: I am not sure if my mail client is mangling the urls you are using but it looks like you are using '/' characters after 'file:' Must be your e-mail client... I've tried jar and file (no slash after file:)

Tomcat configuration for customizing apps

2007-09-18 Thread Roman Agapkin
Hello people, I would like to conifgure Tomcat for developing on Alfresco CMS (www.alfresco.com) My problem is that i've got the application itself (alfresco.war) in my tomcat webapps folder and my classes which extend the application (for example some new modules) I've got a 'dynamic web

Tomcat Security - implementing custom security

2007-09-18 Thread alee amin
Hi, I was able to implement the form based tomcat security on my web app. It was good. But because of some restriction from client i need to modify it. The password is placed as in encryppted form in DB, so i can not rely on tomcat authenticate method which simple select the username/password

Re: Tomcat Security - implementing custom security

2007-09-18 Thread Mikolaj Rydzewski
alee amin wrote: The password is placed as in encryppted form in DB, so i can not rely on tomcat authenticate method which simple select the username/password from DB and match it. I have seen the implementation of ( org.apache.catalina.realm.JDBCRealm). Have you tried using 'digest'

Tomcat status

2007-09-18 Thread Andrew Hole
Is there a function to check the status of tomcat? A simple JSP p.e., i make an http request to tomcat port, and if i don't get response, I say that status is down. I want to create a simple JSP resume of all tomcat instances status Thanks,

Re: Tomcat status

2007-09-18 Thread Bj
if you're using apache httpd and mod_jk in front of your tomcats, you have a status page with a lot of information. Also bundled with tomcat, you have the manager webapp which has a status page. -- Bj On 9/18/07, Andrew Hole [EMAIL PROTECTED] wrote: Is there a function to check the status of

unknown protocol: httpg

2007-09-18 Thread DEMESY Nicolas
Hi, I would like to contact httpg servers with a servlet host on a tomcat server and I have an error : java.net.MalformedURLException: unknown protocol: httpg at java.net.URL.init(URL.java:395) at java.net.URL.init(URL.java:283) when I do : SimpleProvider p = new SimpleProvider();

RE: Changing ROOT context

2007-09-18 Thread Caldarale, Charles R
From: Waseem Azhar [mailto:[EMAIL PROTECTED] Subject: Re: Changing ROOT context Just open your server.xml add line Context path= docBase=your-app-name debug=99 reloadable=true/ Please read the doc before responding. Putting Context elements in server.xml has been strongly discouraged

problem with https and apache+httpd+tomcat

2007-09-18 Thread Christian Andersson
Hi there I have a problem with tomcat, but first version information for some of the applications used. Apache/2.2.3 (Mandriva Linux/PREFORK-1.1.20060mlcs4) Apache Tomcat/6.0.13 java version 1.6.0_01 Java(TM) SE Runtime Environment (build 1.6.0_01-b06) Java HotSpot(TM) 64-Bit Server VM (build

Re: Tomcat status

2007-09-18 Thread Andrew Hole
Could you tell me wich page? On 9/18/07, Bj [EMAIL PROTECTED] wrote: if you're using apache httpd and mod_jk in front of your tomcats, you have a status page with a lot of information. Also bundled with tomcat, you have the manager webapp which has a status page. -- Bj On 9/18/07,

Re: Servlet Redeployment in Production

2007-09-18 Thread lightbulb432
Christopher Schultz-2 wrote: What does Tomcat do when, in production, a new version of a WAR file that's currently being accessed is deployed? I've heard generally that you don't enable the auto-deployment feature in production, but assume you're aiming for a five-nines environment and

RE: how to obtain server ip address

2007-09-18 Thread Propes, Barry L
did you try getRemoteAddr()? -Original Message- From: Lilianne E. Blaze [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 18, 2007 12:08 AM To: Tomcat Users List Subject: Re: how to obtain server ip address Check java.net.NetworkInterface, it lets you enumerate all interfaces and

Re: unknown protocol: httpg

2007-09-18 Thread David Delbecq
Hello Nicolas, java.net.URL is trying to instanciate a handler for protocol httpg and fails. Looking at your code, i suppose org.globus.axis.util.Util.registerTransport() is supposed to add an handler. This works find in standalone application, but in J2EE environment the URL class can not see

Re: mod_jk and Apache httpd 2.2 [UPDATE]

2007-09-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, I changed my JkLogLevel to debug and here's the output I get when I request a URL that should be mapped to a Tomcat instance: [Tue Sep 18 10:52:36.989 2007] [4317:3080799920] [debug] map_uri_to_worker::jk_uri_worker_map.c (597): Attempting to

Re: grant codeBase not working for my jar

2007-09-18 Thread Mark Thomas
Sam Halliday wrote: and confirmed that this is where the jar file is... but tomcat is still refusing to give the permissions on a per-jar basis. Maybe this is a bug with the Ubuntu release? This is all standard JVM stuff. The only bit Tomcat adds is the odd PrivilegedAction but that won't stop

Re: Servlet Redeployment in Production

2007-09-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 lb, lightbulb432 wrote: Christopher Schultz-2 wrote: I would argue that autodeploy doesn't help much in this case, but we'll stick with that assumption for this discussion. I realize it wouldn't help for things like database changes, but

RE: Distributed web services: Tomcat or Jboss?

2007-09-18 Thread Matthias Klein
Unless EJB would provide a significant advantage in this type of project, I was not planning on using EJB. But would they offer advantages? In case I can do without - do you have any recommendation as for container, frameworks, tools? Thanks Matt -Original Message- From: Christopher

RE: Distributed web services: Tomcat or Jboss?

2007-09-18 Thread Matthias Klein
Good points, thanks -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Dienstag, 18. September 2007 17:39 To: Tomcat Users List Subject: Re: Distributed web services: Tomcat or Jboss? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mattias, Matthias Klein

Re: Distributed web services: Tomcat or Jboss?

2007-09-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mattias, Matthias Klein wrote: Unless EJB would provide a significant advantage in this type of project, I was not planning on using EJB. But would they offer advantages? I personally dislike EJBs, but my experience was a long time ago... perhaps

RE: With JK 1.2.x using route causes problems with redirect?

2007-09-18 Thread Henk Fictorie
Brian.Horblit wrote: # Set w4 properties worker.w4.socket_keepalive=1 worker.w4.socket_timeout=20 worker.w4.reply_timeout=2 worker.w4.retries=2 worker.w4.connection_pool_timeout=60 worker.w4.type=ajp13 worker.w4.host=localhost worker.w4.port=8034 worker.w4.lbfactor=1

Re: With JK 1.2.x using route causes problems with redirect?

2007-09-18 Thread Rainer Jung
Henk Fictorie wrote: Brian.Horblit wrote: # Set w4 properties worker.w4.socket_keepalive=1 worker.w4.socket_timeout=20 worker.w4.reply_timeout=2 worker.w4.retries=2 worker.w4.connection_pool_timeout=60 worker.w4.type=ajp13 worker.w4.host=localhost worker.w4.port=8034

Tomcat 6 Admin Application

2007-09-18 Thread Fredy Provoste
Hi there, i want to know if there's any admin application (like in Tomcat 5) for Tomcat 6 available??, i've lookin in tomcat 6 source code with no luck Thanks

Re: mod_jk and Apache httpd 2.2 [UPDATE]

2007-09-18 Thread Rainer Jung
Hi Chris, Christopher Schultz wrote: Strange... it looks like mod_jk is initializing itself more than once. I even tried the binary available online for Apache httpd 2.2.4 (2.2.6 wasn't available), and it appears to be giving me the same results. I would guess: the redundant log lines come

Re: mod_jk and Apache httpd 2.2 [UPDATE]

2007-09-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, Thanks for the reply. Rainer Jung wrote: I would guess: the redundant log lines come from virtual servers. Okay. I don't believe I have more than one virtual server, so I would have expected maybe a maximum of two initialized messages.

Re: Tomcat 6 Exception Language

2007-09-18 Thread David Delbecq
To pass parameter to tomcat service and configure it: http://www.google.be/search?q=tomcat6+service+parameters Fredy Provoste a écrit : Thak you so much Christopher, see that your information is for a Linux Enviromente, i'm working in windows, and i have tomcat installed as service, so the

Re: Tomcat 6 Admin Application

2007-09-18 Thread Brantley Hobbs
JMX? I'm intrigued by your idea and would like to subscribe to your newsletter. Is there a canned application that can use JMX to provide similar information as the old admin app? Thanks, Brantley Mark Thomas wrote: Fredy Provoste wrote: Hi there, i want to know if there's any admin

Re: mod_jk and Apache httpd 2.2 [UPDATE]

2007-09-18 Thread Rainer Jung
Going to infinity+1: I would guess: the redundant log lines come from virtual servers. Okay. I don't believe I have more than one virtual server, so I would have expected maybe a maximum of two initialized messages. See below. All of my JkMounts are in a single VirtualHost, and they are

RE: With JK 1.2.x using route causes problems with redirect?

2007-09-18 Thread Brian.Horblit
Henk and Rainer, My sincerest apologies! I don't know how many times I checked that config without noticing the error. Sorry to waste your time. Probably too many edits/tests wore my eyes out. :-( I fixed that domain up and yes indeed, it seems to be working. I did 6 combinations of server

Re: With JK 1.2.x using route causes problems with redirect?

2007-09-18 Thread Rainer Jung
[EMAIL PROTECTED] wrote: Henk and Rainer, My sincerest apologies! I don't know how many times I checked that config without noticing the error. Sorry to waste your time. Probably too many edits/tests wore my eyes out. :-( No problem. I learned something too (redirect=route), and found another

Re: mod_jk and Apache httpd 2.2 [RESOLVED ; still have questions]

2007-09-18 Thread Rainer Jung
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, So, I dumped my configuration entirely and tried to get something served from somewhere other than the default virtual host. It turns out that the default virtual host does not set a ServerName, which apparently

Re: mod_jk and Apache httpd 2.2 [RESOLVED ; still have questions]

2007-09-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, So, I dumped my configuration entirely and tried to get something served from somewhere other than the default virtual host. It turns out that the default virtual host does not set a ServerName, which apparently really confuses Apache httpd

RE: Tomcat 6 Admin Application

2007-09-18 Thread Caldarale, Charles R
From: Brantley Hobbs [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat 6 Admin Application Is there a canned application that can use JMX to provide similar information as the old admin app? Try the MBeans tab of the JConsole program that comes with Sun JDKs. You'll need to start Tomcat with

RE: With JK 1.2.x using route causes problems with redirect?

2007-09-18 Thread Brian.Horblit
When I get multicast working in my Linux environment I'll put it under load and do the same failover tests to see how it fares when it is working harder! Maybe I'll do the same for the route/redirect method too. ---Original Message- --From: Rainer Jung [mailto:[EMAIL PROTECTED] --Sent:

RE: With JK 1.2.x using route causes problems with redirect?

2007-09-18 Thread Brian.Horblit
Rainer, I thought I should just note that part of the exotic config (using route and the like) is driven by the fact that the workers.properties file is not dynamically reloadable. We have had a modified version of the JK2 connector running for years and we heavily use the capability to

Re: mod_jk and Apache httpd 2.2 [RESOLVED ; still have questions]

2007-09-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, Rainer Jung wrote: I still have a few questions, though: 1. I still get the JkShmFile error (didn't specify such a directive; should I? If I don't need it, can I disable the feature to avoid the error message?) I'm afraid we

Re: How do you access all sessions from a servlet in tomcat 6.0?

2007-09-18 Thread Lilianne E. Blaze
Just be aware it will get messy if the webapp is distributed. One suggestion - don't configure the sessions for 12h maxInactiveInterval. Keep the default 30m (or was it 15m? whatever), and change it to 12h only after login. Otherwise guest-sessions will expire in 12h too, and that's just

RE: AccessControlException with Embedded Tomcat 5.5.23

2007-09-18 Thread Caldarale, Charles R
From: S D [mailto:[EMAIL PROTECTED] Subject: AccessControlException with Embedded Tomcat 5.5.23 1. How do I enforce the use of the catalina.policy file with embedded Tomcat? You need to set the following _two_ system properties: -Djava.security.manager

Sticky servlet

2007-09-18 Thread Kamil Burzynski
Hello, I would like to create one of my servlets to be 'sticky': to be sure that Tomcat will never try to remove this servlet from memory. Is load-on-startup enough? I know that it will start my servlet as soon as tomcat starts, but will tomcat ever try to remove such servlet? E.g. if there will

Re: Sticky servlet

2007-09-18 Thread David Delbecq
In j2ee specs, there is no provision for unloading an unused servlet. Once a servlet has been tarted (load-on-startup or triggered by user query), i never get unloaded, unless webapp gets unloaded, which occurs at shutdown or during a redeploy (administrative task) Kamil Burzynski a écrit :

Re: Need help in the compatibility for Windows Vista.

2007-09-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pavan, PavanSingaraju wrote: I have an web application in Tomcat 5.0.18. I am running it on Windows XP operating system. I am planning to upgrade the OS to Windows Vista. Just out of curiosity, why are you upgrading from XP to Vista? Is this a

Re[2]: Sticky servlet

2007-09-18 Thread Kamil Burzynski
Hello, In j2ee specs, there is no provision for unloading an unused servlet. Once a servlet has been tarted (load-on-startup or triggered by user query), i never get unloaded, unless webapp gets unloaded, which occurs at shutdown or during a redeploy (administrative task) Thanks for quick

Re: Tomcat 6 Exception Language

2007-09-18 Thread Fredy Provoste
jojoo yes, the apache service manager has options to configure it, sorry, and thanks 2007/9/18, David Delbecq [EMAIL PROTECTED]: To pass parameter to tomcat service and configure it: http://www.google.be/search?q=tomcat6+service+parameters Fredy Provoste a écrit : Thak you so much

Static files Localization

2007-09-18 Thread Kakinari, Takashi
Hi, When I investigate localization capaability on Tomcat, I foound following document. http://www.jajakarta.org/tomcat/tomcat3.2-4.0/tomcat-3.2.3/doc/tomcat-localization-howto.html However when I checked this functionality on Tomcat 4, 5, and 6, I can't find out StaticInerceptor

Re: problem with https and apache+httpd+tomcat [SOLVED]

2007-09-18 Thread Christian Andersson
Hi Rainer, and thanks for trying to help me. I had been trying most of what you wrote, and it still looked like it was tomcat, but there was one thing that struck me while doing all these tests/changes mod_jk transfers the knowledge of the hostname and port used in Apache htpd to the AJP

RE: Static files Localization

2007-09-18 Thread Caldarale, Charles R
From: Kakinari, Takashi [mailto:[EMAIL PROTECTED] Subject: Static files Localization Is this feature obsoleted or replaced to alternetives? Modern versions of Tomcat use standard Java internationalization: http://java.sun.com/javase/technologies/core/basic/intl/ You can find localized

Re: Sticky servlet

2007-09-18 Thread David Smith
However if you read servlet spec 2.4, SRV.2.3.4 you'll find the following direct quote: The servlet container is not required to keep a servlet loaded for any particular period of time. A servlet instance may be kept active in a servlet container for a period of milliseconds, for the

Re: Distributed web services: Tomcat or Jboss?

2007-09-18 Thread Nicholas Sushkin
Also check out Glassfish/OpenESB/Netbeans. Sun just released Netbeans 6 beta 1 and Glassfish v2. http://open-esb.dev.java.net/ On Tuesday 18 September 2007, Christopher Schultz wrote: Matthias, Matthias Klein wrote: As I am starting a new project, I am unsure whether to use Tomcat/Axis

Re: Need help in the compatibility for Windows Vista.

2007-09-18 Thread PavanSingaraju
Chris, Thank you for the information. I did proposed for moving it to linux, and am waiting for management's response. The new machine had Vista, and to host it on that machine, i wanted to check if there are some issues with it. This mail did answered my question. Thanks once again. --

Re: Static files Localization

2007-09-18 Thread Bill Barker
Chuck's comments refer to localization of Tomcat error messages. The page the OP refers to is something more like Apache httpd's mod_negotiation, which isn't supported in any supported version of Tomcat (i.e. 3.3.x+). The main reason is that it is pretty easy to implement this as a Filter in

Re: Sticky servlet

2007-09-18 Thread Bill Barker
Kamil Burzynski [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I would like to create one of my servlets to be 'sticky': to be sure that Tomcat will never try to remove this servlet from memory. Is load-on-startup enough? I know that it will start my servlet as soon as

Re: How do you access all sessions from a servlet in tomcat 6.0?

2007-09-18 Thread Lyallex
On 9/18/07, Lyallex [EMAIL PROTECTED] wrote: How about creating a SessionListener class SomeSessionListener implements HttpSessionListener ... Register it in web.xml in the sessionCreated method of your listener get a reference to the new session from the HttpSessionEvent you can now

Question about JNDI + Connection Pool + Mysql (Tomcat 6)

2007-09-18 Thread Fredy Provoste
Hi again, i've been deployed a webapp called libreria in Tomcat 6, i tried to configure a mysql connection pool, so in the path libreria . . META-INF/context.xml put the lines Context path=/libreria docBase=libreria debug=5 privileged=true reloadable=true Resource

Re: Question about JNDI + Connection Pool + Mysql (Tomcat 6)

2007-09-18 Thread Titi Wangsa
try changing username=usuarioweb to user=usuarioweb from http://www.docjar.com/docs/api/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.html#setUser(java.lang.String) On 9/19/07, Fredy Provoste [EMAIL PROTECTED] wrote: Hi again, i've been deployed a webapp called libreria in Tomcat 6, i tried

Re[2]: Sticky servlet

2007-09-18 Thread Kamil Burzynski
Hello, Please read the other responses to this thread, since they are correct that there is no guarantee. However, the current implementation of TC (3.3-6.0) will not unload a Servlet unless the entire context is reloaded (with a slight exception for JSP pages). But then you are programming