How to detect expired session vs. no session?
Hi, How can I tell between a request using an expired session vs a request with no session at all? I need to show different messages to users being kicked due to inactivity and to anonymous users. Thanks! Regards, Joseph Lam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to detect expired session vs. no session?
if you call request.getSession(false) this will return null if the request is not associated with a request already. the false param turns off the default behaviour of creating a new session when none exists. -Original Message- From: LAM Kwun Wa Joseph [mailto:[EMAIL PROTECTED] Sent: Wednesday 08 December 2004 08:23 To: [EMAIL PROTECTED] Subject: How to detect expired session vs. no session? Hi, How can I tell between a request using an expired session vs a request with no session at all? I need to show different messages to users being kicked due to inactivity and to anonymous users. Thanks! Regards, Joseph Lam - 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: Implementing Realm
Sorry if I'm being stupid, but it simply doesn't match my experiences. I'm using tomcat 4.1.30 as it is with standard MemoryRealm implementation. The username/passwords are created using the tomcat-users.xml, but If I change these without restarting tomcat the usernames and passwords are not being updated. Example: I enter a webapp with security constraints with my old password: xxx Then I change the user-role element in conf/tomcat-users.xml so that the password is now: yyy I start a new browser. In order to get a new client. Enter the new password... No entrance. Entering the old password gives a much better result though... in server.xml there is a userdatabase element, that is documented as a !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- In the implementation (MemoryUserDatabase.java) there is no sign what so ever that it detects an update in the tomcat-users.xml file. The first method used is findUser(...) that just returns a value from a HashMap... Regards Morten At 14:50 07-12-2004, you wrote: Hi, Yeah, I'm sure. It's easy to see using the Admin webapp. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Morten Andersen [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 4:50 AM To: Tomcat Users List Subject: RE: Implementing Realm At 16:10 17-11-2004, you wrote: Note that all of Tomcat's built-in Realms support runtime changes to the data store, be it a file or a database. Are you sure. MemoryRealm seems only to be updated as Tomcat is restarted. Morten Andersen Master of applied mathematics and computer science Associate professor The Maersk Institute of Production technology at Southern Danish University www.mip.sdu.dk Campusvej 55 DK-5230 Odense M Denmark +45 65 50 36 54 +45 61 71 11 03 Jabber id: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Morten Andersen Master of applied mathematics and computer science Associate professor The Maersk Institute of Production technology at Southern Danish University www.mip.sdu.dk Campusvej 55 DK-5230 Odense M Denmark +45 65 50 36 54 +45 61 71 11 03 Jabber id: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to detect expired session vs. no session?
But does it have the same effect for a request with an expired session vs a request with no session at all? I think it will return null in both cases. if you call request.getSession(false) this will return null if the request is not associated with a request already. the false param turns off the default behaviour of creating a new session when none exists. -Original Message- From: LAM Kwun Wa Joseph [mailto:[EMAIL PROTECTED] Sent: Wednesday 08 December 2004 08:23 To: [EMAIL PROTECTED] Subject: How to detect expired session vs. no session? Hi, How can I tell between a request using an expired session vs a request with no session at all? I need to show different messages to users being kicked due to inactivity and to anonymous users. Thanks! Regards, Joseph Lam - 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: How to detect expired session vs. no session?
if you call request.getSession(false) this will return null if the request is not associated with a request already. the false param turns off the default behaviour of creating a new session when none exists. On Wed, 2004-12-08 at 04:35, LAM Kwun Wa Joseph wrote: But does it have the same effect for a request with an expired session vs a request with no session at all? I think it will return null in both cases. How about reading the request headers to see if there is a jspsessionid? If a sessionid exists and getSession(false) returns null, you have an expired session. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : Threads issues in Tomcat 5.0.28
2. you can use kill -3 command to dump the thread stack and execute the same command few seconds later. You obtain two stack trace that you can compare to identify the potential source of inativity. -Message d'origine- De : Matt Robinson [mailto:[EMAIL PROTECTED] Envoyé : mercredi 8 décembre 2004 03:32 À : [EMAIL PROTECTED] Objet : Threads issues in Tomcat 5.0.28 Hi, We have 5 instances of Tomcat 5.0.28 running on their own high performance servers (dual XEON / 2GB RAM, etc) receiving AJP13 connector requests via our main web server which has IIS 5, IIS redirector, and Tomcat4. This works great even under high loads except for one thing: after several hours of usage (could be 3 hours or up 24 hours), the number of Tomcat threads on the 5.0.28 systems will suddenly increase at a rapid rate until Tomcat no longer responds to requests. It will hit the max # threads (which defaults to 200) and essentially freeze until it is restarted. This is strange because this behavior does not seem to correspond to increased usage of the particular server it occurs on. We are not sure what is triggering this and what those Tomcat threads are waiting on [they remain busy, waiting and unable to be reused by Tomcat]. My questions are: 1. Has anyone else experienced this kind of Thread explosion problem? 2. Is there a way to find out exactly what each Tomcat Thread is doing/waiting for? 3. Is there a way to periodically clear Tomcat's threadpool -- i.e. get rid of waiting/busy/unusued threads. We are working on ways to automatically restart Tomcat once a certain # of threads is reached, but this is not an acceptable solution, only a temporary workaround of course. Many thanks in advance __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo - 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]
Multiple domains on single machine
Hi I have setup a test machine so that it should host two sites 1. http://admin 2. http://support But only one (http://admin) is accessible and the other one is not. Can you give any pointers. I set up virtual hosts as (httpd.conf): NameVirtualHost *:80 VirtualHost *:80ServerName adminServerAdmin [EMAIL PROTECTED]DocumentRoot E:/admin.support.cp.net/html/ErrorDocument 404 E:/admin.support.cp.net/notfound.htmlErrorLog logs/admin.support.cp.net-error_logLogFormat "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedLogFormat "%h %l %u %t \"%r\" %s %b" commonLogFormat "%{Referer}i - %U" refererLogFormat "%{User-agent}i" agentCustomLog logs/admin.support.cp.net-access_log combinedAlias /icons/ E:/admin.support.cp.net/icons/ScriptAlias /cgi-bin/ E:/admin.support.cp.net/cgi-bin/Directory "E:/admin.support.cp.net/html"Options FollowSymLinks IncludesDirectoryIndex index.html index.jspAllowOverride AuthConfig/DirectoryAddType text/x-server-parsed-html .html/VirtualHost VirtualHost *:80 DocumentRoot E:/support1.cp.net ServerName support ServerAdmin[EMAIL PROTECTED] ErrorLog logs/support-error_log LogFormat "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %s %b" common LogFormat "%{Referer}i - %U" referer LogFormat "%{User-agent}i" agent CustomLog logs/support-access_log combined Alias /pdf/ E:/support1.cp.net/content/pdf/ Alias /images/ E:/support1.cp.net/images/ ScriptAlias /cgi-bin/ E:/support1.cp.net/cgi-bin/ ErrorDocument 404 E:/support1.cp.net/notfound.jsp # Allow Server Side includes (SSI) Directory "E:/support1.cp.net" Options FollowSymLinks Includes AllowOverride AuthConfig allow from all /Directory AddType text/x-server-parsed-html .html/VirtualHost Similarly I added following to server.xml: Host Name="support" Context path="" docBase="E:/support1.cp.net" debug="0" reloadable="true" / /Host Host Name="admin" Context path="" docBase="E:/admin.support.cp.net" debug="0" reloadable="true" / /Host I also added lines to the "hosts" file on that machine: IP-Address admin IP-Address support. Thanks Mayuresh. ?xml version=1.0 encoding=ISO-8859-1? !-- Copyright 1999-2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- Server !-- You can add a home attribute to represent the base for all relative paths. If none is set, the TOMCAT_HOME property will be used, and if not set . will be used. webapps/, work/ and log/ will be relative to this ( unless set explicitely to absolute paths ). -- ContextManager workDir=work !-- Global modules -- LoaderInterceptor11 useApplicationLoader=true / TrustedLoader / LogSetter name=tc_log timestamps=true verbosityLevel=INFORMATION / LogEvents enabled=false / !-- Backward compat: read the Context declarations from server.xml-- ContextXmlReader config=conf/server.xml / !-- Separated Context -- ContextXmlReader config=conf/apps.xml / AutoDeploy source=modules target=modules redeploy=true / AutoWebApp dir=modules host=DEFAULT trusted=true/ AutoDeploy source=webapps target=webapps / AutoWebApp dir=webapps host=DEFAULT / PolicyLoader securityManagerClass=java.lang.SecurityManager policyFile=conf/tomcat.policy / SimpleMapper1 / SessionExpirer checkInterval=60 / !-- For development you can use randomClass=java.util.Random -- SessionIdGenerator randomClass=java.security.SecureRandom randomFile=/dev/urandom / !-- == context processing modules == -- !-- This will be the default profile ( all except the global modules can be set per context ) -- LogSetter name=servlet_log timestamps=true verbosityLevel = INFORMATION path=logs/servlet-${MMdd}.log / LogSetter name=JASPER_LOG timestamps=true path=logs/jasper-${MMdd}.log verbosityLevel = INFORMATION / WebXmlReader validate=true / ErrorHandler showDebugInfo=true / WorkDirSetup cleanWorkDir=false / !-- Test -- Host Name=support Context path= docBase=E:/support1.cp.net debug=0 reloadable=true/ /Host
RE: How to detect expired session vs. no session?
I haven't tested this, but I *think* that a request containing an expired session will still return a non-null session object, but a different instance to the one that would have been returned pre-timeout. But I don't know that for a fact. why not just test it out yourself, it's not that hard, just shorten the timeout interval first so that you don't have to wait 30 mins to do your test ;) -Original Message- From: LAM Kwun Wa Joseph [mailto:[EMAIL PROTECTED] Sent: Wednesday 08 December 2004 09:35 To: [EMAIL PROTECTED] Subject: RE: How to detect expired session vs. no session? But does it have the same effect for a request with an expired session vs a request with no session at all? I think it will return null in both cases. if you call request.getSession(false) this will return null if the request is not associated with a request already. the false param turns off the default behaviour of creating a new session when none exists. -Original Message- From: LAM Kwun Wa Joseph [mailto:[EMAIL PROTECTED] Sent: Wednesday 08 December 2004 08:23 To: [EMAIL PROTECTED] Subject: How to detect expired session vs. no session? Hi, How can I tell between a request using an expired session vs a request with no session at all? I need to show different messages to users being kicked due to inactivity and to anonymous users. Thanks! Regards, Joseph Lam - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HttpSessionListener Interface - Mail Archive not working so apologies for repost
I am sure this has ben tackled by somebody before. In my web.xml I have web-app id=WebApp display-nameSite/display-name listener listener-classhelpers.SessionHelper/listener-class /listener servlet My SessionHelper class implements HttpSessionListener and in my local test environment it works fine. But on my Tomcat I get zilch nowt yadda. Any thoughts? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HttpSessionListener Interface - Mail Archive not working so apologies for repost
My SessionHelper class implements HttpSessionListener and in my local test environment it works fine. But on my Tomcat I get zilch nowt yadda. What do you mean when you say you get nothing on Tomcat? What are you trying to do? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HttpSessionListener Interface - Mail Archive not working soapologies for repost
Sorry what I mean is that the methods implemented for the HttpSessionListener do not get called when I invoke a new session. Original Message Follows From: Ben Souther [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: HttpSessionListener Interface - Mail Archive not working soapologies for repost Date: Wed, 08 Dec 2004 05:53:06 -0500 My SessionHelper class implements HttpSessionListener and in my local test environment it works fine. But on my Tomcat I get zilch nowt yadda. What do you mean when you say you get nothing on Tomcat? What are you trying to do? - 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: HttpSessionListener Interface - Mail Archive not working soapologies for repost
Sorry what I mean is that the methods implemented for the HttpSessionListener do not get called when I invoke a new session. You've extended HttpServlet, implemented HttpSessionListener, and the code in the sessionCreated(HttpSessionEvent event) method is not being called when you create a new session? Can you post your code? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HttpSessionListener Interface - Mail Archive not workingsoapologies for repost
Hi Ben, I have not extended httpservlet, I don't see why I would have to do this? package helpers; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; public class SessionHelper implements HttpSessionListener { public void sessionCreated(HttpSessionEvent sessionEvent) { int x = 1; // Not called } public void sessionDestroyed(HttpSessionEvent sessionEvent) { int x = 2; // Not called } } Original Message Follows From: Ben Souther [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: HttpSessionListener Interface - Mail Archive not workingsoapologies for repost Date: Wed, 08 Dec 2004 06:11:51 -0500 Sorry what I mean is that the methods implemented for the HttpSessionListener do not get called when I invoke a new session. You've extended HttpServlet, implemented HttpSessionListener, and the code in the sessionCreated(HttpSessionEvent event) method is not being called when you create a new session? Can you post your code? - 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 detect expired session vs. no session? (Solved)
Confirmed that request.getSession(false)==null for both expired session requests and anonymous requests, if I have %@ page session=false % in my pages. I just figured out the follow which work exactly what I wanted: boolean hasSessionID = (request.isRequestedSessionIdFromURL() || request.isRequestedSessionIdFromCookie()); if (hasSessionID !request.isRequestedSessionIdValid()) { // expired/invalidated session } else { // no session at all } I haven't tested this, but I *think* that a request containing an expired session will still return a non-null session object, but a different instance to the one that would have been returned pre-timeout. But I don't know that for a fact. why not just test it out yourself, it's not that hard, just shorten the timeout interval first so that you don't have to wait 30 mins to do your test ;) -Original Message- From: LAM Kwun Wa Joseph [mailto:[EMAIL PROTECTED] Sent: Wednesday 08 December 2004 09:35 To: [EMAIL PROTECTED] Subject: RE: How to detect expired session vs. no session? But does it have the same effect for a request with an expired session vs a request with no session at all? I think it will return null in both cases. if you call request.getSession(false) this will return null if the request is not associated with a request already. the false param turns off the default behaviour of creating a new session when none exists. -Original Message- From: LAM Kwun Wa Joseph [mailto:[EMAIL PROTECTED] Sent: Wednesday 08 December 2004 08:23 To: [EMAIL PROTECTED] Subject: How to detect expired session vs. no session? Hi, How can I tell between a request using an expired session vs a request with no session at all? I need to show different messages to users being kicked due to inactivity and to anonymous users. Thanks! Regards, Joseph Lam - 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] - 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: HttpSessionListener Interface - Mail Archive not workingsoapologies for repost
I have not extended httpservlet, I don't see why I would have to do this? You don't... sorry (was still on first cup of coffeee ;)) You've tried putting println statements in the sessionCreated and sessionDestroyed methods to verify that they're not being called? On Wed, 2004-12-08 at 06:16, Mark Benussi wrote: Hi Ben, I have not extended httpservlet, I don't see why I would have to do this? package helpers; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; public class SessionHelper implements HttpSessionListener { public void sessionCreated(HttpSessionEvent sessionEvent) { int x = 1; // Not called } public void sessionDestroyed(HttpSessionEvent sessionEvent) { int x = 2; // Not called } } Original Message Follows From: Ben Souther [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: HttpSessionListener Interface - Mail Archive not workingsoapologies for repost Date: Wed, 08 Dec 2004 06:11:51 -0500 Sorry what I mean is that the methods implemented for the HttpSessionListener do not get called when I invoke a new session. You've extended HttpServlet, implemented HttpSessionListener, and the code in the sessionCreated(HttpSessionEvent event) method is not being called when you create a new session? Can you post your code? - 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]
Server Status and connection information
I see in the manager app that only server status information about connections to the manager app has extended information attached to it. For our production webapp the only information is that it is a Keep alive connection, and it has no metric about bytes sent or received, or what the request or vhost is. Only what the host is. How can I enable the more finegrained information for our webapp? (The connection status, what the request is, and bytes sent/received) Also, how does the manager keep track of errors? I.e. what kind of errors increments the Error coun t in the manager? I couldn't find any documentation about this part of the manager in the tomcat documentation.. Hope someone can help me. -- \ Olve S. Hansen \ mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Inside eclipse...
Vamsee Kanakala wrote: Hi all, I have a problem when I start tomcat from inside eclipse I found out the problem. It's not about the plugin per se, it must be the fact that eclipse starts tomcat or something... Anyways, I googled for similar error messages, turns out that security.policy in JAVA_HOME/jre/lib/security/security.policy has to be changed so (5432 is postgres' port): grant { permission java.security.AllPermission; permission java.net.SocketPermission 127.0.0.1:1024-, listen; permission java.net.SocketPermission 127.0.0.1:5432, accept, connect, listen, resolve; }; Now tomcat works happily with postgres. Thanks, Vamsee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HttpSessionListener Interface - Mail Archive notworkingsoapologies for repost
Solved. For any of you using Websphere Studio to attach and debug a remote Tomcat instance be warned. The line numbers seem to be one out on my class and it worked when I put more than one LOC and a few more debug points (As well as some logging thanks Ben ;) ) Original Message Follows From: Ben Souther [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: HttpSessionListener Interface - Mail Archive notworkingsoapologies for repost Date: Wed, 08 Dec 2004 07:00:10 -0500 I have not extended httpservlet, I don't see why I would have to do this? You don't... sorry (was still on first cup of coffeee ;)) You've tried putting println statements in the sessionCreated and sessionDestroyed methods to verify that they're not being called? On Wed, 2004-12-08 at 06:16, Mark Benussi wrote: Hi Ben, I have not extended httpservlet, I don't see why I would have to do this? package helpers; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; public class SessionHelper implements HttpSessionListener { public void sessionCreated(HttpSessionEvent sessionEvent) { int x = 1; // Not called } public void sessionDestroyed(HttpSessionEvent sessionEvent) { int x = 2; // Not called } } Original Message Follows From: Ben Souther [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: HttpSessionListener Interface - Mail Archive not workingsoapologies for repost Date: Wed, 08 Dec 2004 06:11:51 -0500 Sorry what I mean is that the methods implemented for the HttpSessionListener do not get called when I invoke a new session. You've extended HttpServlet, implemented HttpSessionListener, and the code in the sessionCreated(HttpSessionEvent event) method is not being called when you create a new session? Can you post your code? - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Thread safety for RequestDispatcher
I'm looking at design options for a servlet that uses forwarding. If I were to get a RequestDispatcher in the init method (from ServletContext) and store it as a static field, it would save getting a RequestDispatcher for every request object. That may minimise unnecessary repetition, but I wonder if it is safe to have multiple request threads forwarded via the same RequestDispatcher instance? Previous mailings say that forwarding should be handled by the same thread as the request. I couldn't find any guidance here or on the Web about multiple threads accessing the same RequestDispatcher. -- URL:http://www.codestyle.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OutOfMemory! Tomcat meets sudden spikes of used memory sometimes.
Hi folks, I am puzzled by the situation that Tomcat 4.1.31 meets sudden spikes of used memory sometimes. Then it will increase to throw OutOfMemory Exception and tomcat is hanging. Those memory spikes appear in my Web application for a long time. The odd thing is that it does not seem to progressively go up but rather spike up with each next full GC will clean less objects out. This is three pictures of the gc log. http://my.sme.cn/jsp/main/memoryleak.png http://my.sme.cn/jsp/main/memoryleak2.png http://my.sme.cn/jsp/main/memoryleak3.png I used HPjtune tool to watch the gc log. System using windows 2000 server, 2*CPU, 2G memory, JSDK 1.4.2_05, tomcat 4.1.31, And set -Xms1250m -Xmx1250m -server -XX:+UseParallelGC -Xloggc:D:\tomcat\logs\gc.log At first, I doubt if my app program has memory leak. But the application only runs by JSPs and javabeans.(I abandon using DBCP pool and any thread operation because of the memory leak.) I think simple JSPs can't cause the memory spike. I have a monitor.jsp to show my application status. http://my.sme.cn/jsp/main/monitor.jsp The WebSite uses normally below 100M memory heap through my monitor.jsp. It can run a few days, or a few hours before the spike appears. It is irregular. I read the access_log and want to find answer. But I can't find any clue. Then, I think tomcat 4.1.* has some bugs causing the memory leak. I upgraded my application to tomcat 5.0.18, but I met same thing. The WebSite's hits is more than 200,000 per day. I try to use OptimizeIt 6 profile to watch memory status, but OptimizeIt always exits after runs 2~3 hours. I guess this program maybe need using progressive memory of system to log things and analyze those when I notice Optimizeit used 1.6G system memory.(and OptimizeIt 6 profile only runs under tomcat 4.1.*! So I return to tomcat 4.1.31) I don't know how to cause the thing and how to find solution. Any suggestion is appreciated. Thanks. Li Zhenxing - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
taglib-application config
It appears that the application taglib docs are out of date, and I'm trying to configure this taglib. One example of it being out of date is that it refers to application.tld, which currently is taglibs-application, not application. Even the example fails to load. Maybe this is because I'm using version 5.0.30 of tomcat, or 1.5.0 jdk, which might be incompatible. Is the application taglib no longer developed? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Best place to store files ?
Hi, What Wendy said is right on, so I'm glad you're already down that path. If the files are temporary, i.e. you don't mind them being erased when the server restarts, you can use the javax.servlet.context.tempdir context attribute. That's the portable, preferred way to handle temporary files. For permanent files, do what Wendy said. Tomcat is not deficient or lacking here in any way: if something is lacking, it's the Servlet Spec, but I personally don't think it's lacking because there's still a use-case for the no-filesystem servlet container. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Eric VERGNAUD [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 8:52 PM To: Tomcat Users List Subject: Re: Best place to store files ? le 8/12/04 0:15, Wendy Smoak à [EMAIL PROTECTED] a écrit : From: Eric VERGNAUD [EMAIL PROTECTED] Yes it's simple. I was just wondering whether there was a preferred method for this, and maybe a folder in the Tomcat directory for that purpose. Nothing in the Servlet Specification requires Tomcat to provide you with a permanent place to put uploaded files. My advice would be to put them outside of Tomcat, and write a thin layer to insulate the Servlet from whatever decisions you're making today. That way, if you decide at some point in the future to put the files in a database, or do something else with them, you don't have to mess with the Servlet code. Your Servlet shouldn't know or care where the files are, it should just call 'read' or 'write' and let the data access layer deal with the details. Which is what I already do. As a matter of fact, the layer I'm using makes it look like a database. The only thing I was looking for is the preferred place for storing files. If there is none, that's ok. --- Eric VERGNAUD - JLynx Software Cutting-edge technologies and services for software companies web: http://www.jlynx.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OutOfMemory! Tomcat meets sudden spikes of used memory sometimes.
The fact that you have the same symptons in tomcat 4 and in 5 points towards your application as being the culprit. Is there any reason why you chose tomcat 5.0.18 instead of one of the many newer releases? I would find another profiler that works with both and try your tests again. Ta Matt -Original Message- From: Li Zhenxing [mailto:[EMAIL PROTECTED] Sent: 08 December 2004 13:47 To: [EMAIL PROTECTED] Subject: OutOfMemory! Tomcat meets sudden spikes of used memory sometimes. Hi folks, I am puzzled by the situation that Tomcat 4.1.31 meets sudden spikes of used memory sometimes. Then it will increase to throw OutOfMemory Exception and tomcat is hanging. Those memory spikes appear in my Web application for a long time. The odd thing is that it does not seem to progressively go up but rather spike up with each next full GC will clean less objects out. This is three pictures of the gc log. http://my.sme.cn/jsp/main/memoryleak.png http://my.sme.cn/jsp/main/memoryleak2.png http://my.sme.cn/jsp/main/memoryleak3.png I used HPjtune tool to watch the gc log. System using windows 2000 server, 2*CPU, 2G memory, JSDK 1.4.2_05, tomcat 4.1.31, And set -Xms1250m -Xmx1250m -server -XX:+UseParallelGC -Xloggc:D:\tomcat\logs\gc.log At first, I doubt if my app program has memory leak. But the application only runs by JSPs and javabeans.(I abandon using DBCP pool and any thread operation because of the memory leak.) I think simple JSPs can't cause the memory spike. I have a monitor.jsp to show my application status. http://my.sme.cn/jsp/main/monitor.jsp The WebSite uses normally below 100M memory heap through my monitor.jsp. It can run a few days, or a few hours before the spike appears. It is irregular. I read the access_log and want to find answer. But I can't find any clue. Then, I think tomcat 4.1.* has some bugs causing the memory leak. I upgraded my application to tomcat 5.0.18, but I met same thing. The WebSite's hits is more than 200,000 per day. I try to use OptimizeIt 6 profile to watch memory status, but OptimizeIt always exits after runs 2~3 hours. I guess this program maybe need using progressive memory of system to log things and analyze those when I notice Optimizeit used 1.6G system memory.(and OptimizeIt 6 profile only runs under tomcat 4.1.*! So I return to tomcat 4.1.31) I don't know how to cause the thing and how to find solution. Any suggestion is appreciated. Thanks. Li Zhenxing - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any opinions expressed in this E-mail may be those of the individual and not necessarily the company. This E-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this E-mail in error and that any use or copying is strictly prohibited. If you have received this E-mail in error please notify the beCogent postmaster at [EMAIL PROTECTED] Unless expressly stated, opinions in this email are those of the individual sender and not beCogent Ltd. You must take full responsibility for virus checking this email and any attachments. Please note that the content of this email or any of its attachments may contain data that falls within the scope of the Data Protection Acts and that you must ensure that any handling or processing of such data by you is fully compliant with the terms and provisions of the Data Protection Act 1984 and 1998. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HttpServletResponse.setStatus and setContentType
Hi, You know, the JavaDoc for HttpServletResponse#setStatus is pretty clear on this ;) Use sendError for errors, setStatus for normal responses. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Dunlop, Aaron [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 5:44 PM To: Tomcat Users List Subject: HttpServletResponse.setStatus and setContentType I have a standard HTTP servlet acting as an XML web service endpoint, running on an embedded Tomcat 5.0.30. I of course use HttpServletResponse.setContentType to specify that the response is text/xml. When the request is successful and I set a 2xx HTTP response code, the Content-Type header looks as expected. But if an error is detected and I return an HTTP error code (using setStatus), the Content- Type header specifies text/html;charset=utf-8 instead of text/xml. It doesn't seem to matter whether I call setContentType before or after setStatus, and all the 4xx and 5xx codes I've tried trigger this behavior. I'd just ignore it, but unfortunately, the WSI Basic Profile specifies that a SOAP fault must return a 500 along with the XML fault. And some clients (ahem... .NET...) seem to choke trying to parse the fault when the wrong content-type is returned. I didn't find anything in the specs or documentation that indicated to me that this was required behavior, but perhaps I'm missing something. Any ideas? Thanks in advance, Aaron Dunlop - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Best place to store files ?
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Tomcat is not deficient or lacking here in any way: if something is lacking, it's the Servlet Spec, but I personally don't think it's lacking because there's still a use-case for the no-filesystem servlet container. Hmm. Sorry, Yoav, but I think that's specious. There's still a use-case for the motorcycle, but it doesn't invalidate the use-case for the station wagon. Similarly, there is a use-case for the no-filesystem servlet container, but I would argue that that is a special case (possibly achieved via configuration) of a more general servlet container. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Implementing Realm
Hi, I'm using tomcat 4.1.30 as it is with standard MemoryRealm implementation. Ahh, I assumed you were using 5.x, my bad there. I haven't used 4.x in a while and don't want to waste time on it, so I believe you. The username/passwords are created using the tomcat-users.xml, but If I change these without restarting tomcat the usernames and passwords are not being updated. I didn't say the file is monitored and the realm updated automatically. But you can make changes using the admin webapp and they are reflected when committed. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Best place to store files ?
Hi, From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Tomcat is not deficient or lacking here in any way: if something is lacking, it's the Servlet Spec, but I personally don't think it's lacking because there's still a use-case for the no-filesystem servlet container. Hmm. Sorry, Yoav, but I think that's specious. There's still a use-case for the motorcycle, but it doesn't invalidate the use-case for the station wagon. Similarly, there is a use-case for the no-filesystem servlet container, but I would argue that that is a special case (possibly achieved via configuration) of a more general servlet container. I didn't say the no-filesystem container use-case pre-empts the one with filesystem. So specious is not a good word. But then again, I don't really care if you think it's specious or not, as I said, this is Spec-mandated and not Tomcat's call to make. Accordingly, any complaints of the specious and other type should be directed to the Servlet Expert Group. Yoav Shapira http://www.yoavshapira.com This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple domains on single machine
Any pointers on this one please...its urgent - Original Message - From: Mayuresh Kshirsagar To: [EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 3:27 PM Subject: Multiple domains on single machine Hi I have setup a test machine so that it should host two sites 1. http://admin 2. http://support But only one (http://admin) is accessible and the other one is not. Can you give any pointers. I set up virtual hosts as (httpd.conf): NameVirtualHost *:80 VirtualHost *:80 ServerName admin ServerAdmin [EMAIL PROTECTED] DocumentRoot E:/admin.support.cp.net/html/ ErrorDocument 404 E:/admin.support.cp.net/notfound.html ErrorLog logs/admin.support.cp.net-error_log LogFormat %h %l %u %t \%r\ %s %b \%{Referer}i\ \%{User-Agent}i\ combined LogFormat %h %l %u %t \%r\ %s %b common LogFormat %{Referer}i - %U referer LogFormat %{User-agent}i agent CustomLog logs/admin.support.cp.net-access_log combined Alias /icons/ E:/admin.support.cp.net/icons/ ScriptAlias /cgi-bin/ E:/admin.support.cp.net/cgi-bin/ Directory E:/admin.support.cp.net/html Options FollowSymLinks Includes DirectoryIndex index.html index.jsp AllowOverride AuthConfig /Directory AddType text/x-server-parsed-html .html /VirtualHost VirtualHost *:80 DocumentRoot E:/support1.cp.net ServerName support ServerAdmin [EMAIL PROTECTED] ErrorLog logs/support-error_log LogFormat %h %l %u %t \%r\ %s %b \%{Referer}i\ \%{User-Agent}i\ combined LogFormat %h %l %u %t \%r\ %s %b common LogFormat %{Referer}i - %U referer LogFormat %{User-agent}i agent CustomLog logs/support-access_log combined Alias /pdf/ E:/support1.cp.net/content/pdf/ Alias /images/ E:/support1.cp.net/images/ ScriptAlias /cgi-bin/ E:/support1.cp.net/cgi-bin/ ErrorDocument 404 E:/support1.cp.net/notfound.jsp # Allow Server Side includes (SSI) Directory E:/support1.cp.net Options FollowSymLinks Includes AllowOverride AuthConfig allow from all /Directory AddType text/x-server-parsed-html .html /VirtualHost Similarly I added following to server.xml: Host Name=support Context path= docBase=E:/support1.cp.net debug=0 reloadable=true / /Host Host Name=admin Context path= docBase=E:/admin.support.cp.net debug=0 reloadable=true / /Host I also added lines to the hosts file on that machine: IP-Address admin IP-Address support. Thanks Mayuresh. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OutOfMemory! Tomcat meets sudden spikes of used memory sometimes.
Hi, Besides what Dale said, which is true, I'd like to point out a couple of other additional things. Those memory spikes appear in my Web application for a long time. The odd When a spike appears for a long time it's not a spike: it's the steady state. This is three pictures of the gc log. http://my.sme.cn/jsp/main/memoryleak.png http://my.sme.cn/jsp/main/memoryleak2.png http://my.sme.cn/jsp/main/memoryleak3.png Please don't jump to determine it's a memory leak just because more memory is used. I used HPjtune tool to watch the gc log. System using windows 2000 server, 2*CPU, 2G memory, JSDK 1.4.2_05, tomcat 4.1.31, And set -Xms1250m -Xmx1250m -server -XX:+UseParallelGC - Xloggc:D:\tomcat\logs\gc.log So you're setting the heap size to a constant 1250MB. How can there be big jumps all over the place? At first, I doubt if my app program has memory leak. But the application only runs by JSPs and javabeans.(I abandon using DBCP pool and any thread operation because of the memory leak.) I think simple JSPs can't cause the memory spike. I have a monitor.jsp to show my application status. http://my.sme.cn/jsp/main/monitor.jsp I bet your app is more likely than Tomcat to have a leak ;) Simple JSPs can cause memory spikes, as can simple servlets. DBCP and threads do NOT necessarily cause increased memory usage. The WebSite uses normally below 100M memory heap through my monitor.jsp. It can run a few days, or a few hours before the spike appears. It is irregular. I read the access_log and want to find answer. But I can't find any clue. Perhaps it's high load causing the spike? That would be normal and expected. The WebSite's hits is more than 200,000 per day. I try to use OptimizeIt 6 profile to watch memory status, but OptimizeIt always exits after runs 2~3 hours. I guess this program maybe need using progressive memory of system to log things and analyze those when I notice Optimizeit used 1.6G system memory.(and OptimizeIt 6 profile only runs under tomcat 4.1.*! So I return to tomcat 4.1.31) Yes, OptimizeIt, like other profilers, can routinely use an order of magnitude more memory than your app itself. I don't know how to cause the thing and how to find solution. Any suggestion is appreciated. Thanks. Get a test system, put your app on it, run it with a profiler, and simulate load using a test tool of your choice, e.g. JMeter, ab, wget, grinder, whatever. Then see where memory is retained during your spikes. Yoav Shapira http://www.yoavshapira.com This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Thread safety for RequestDispatcher
Hi, You're right that a static request dispatcher is a negligible performance gain for a large thread-safety risk. You can obviously test it out with a client that will send multiple concurrent test requests. But if you don't have the time or desire to test it out, you can know that obtaining a request dispatcher is usually a low-latency operation in Tomcat, and therefore the performance gain is not worth the risk. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Phil Shaw [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 7:59 AM To: [EMAIL PROTECTED] Subject: Thread safety for RequestDispatcher I'm looking at design options for a servlet that uses forwarding. If I were to get a RequestDispatcher in the init method (from ServletContext) and store it as a static field, it would save getting a RequestDispatcher for every request object. That may minimise unnecessary repetition, but I wonder if it is safe to have multiple request threads forwarded via the same RequestDispatcher instance? Previous mailings say that forwarding should be handled by the same thread as the request. I couldn't find any guidance here or on the Web about multiple threads accessing the same RequestDispatcher. -- URL:http://www.codestyle.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Threads issues in Tomcat 5.0.28
Hi, Once you get the thread dump, post it, and we can try to help you figure out what's wrong. The Tomcat thread pools should automatically recover unused threads, subject to your configuration (see the maxSpareThreads and releated Connector configuration attributes). Yoav Shapira http://www.yoavshapira.com -Original Message- From: Arnab Chakravarty [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:50 PM To: Tomcat Users List Subject: RE: Threads issues in Tomcat 5.0.28 Hey, I see your problem similar to mine some time in the past. What you need to is the following: - Lower the number of threads and keep it close to 120-150 threads. - Are you using a database, if yes, check if the DB connection pool is the bottleneck - Yes, you can find what the 200 threads are doing by taking a threaddump. The way to do this is to use the command - kill -QUIT tomcat pid. Hope this helps. Arnab -Original Message- From: Matt Robinson [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 8:02 AM To: [EMAIL PROTECTED] Subject: Threads issues in Tomcat 5.0.28 Hi, We have 5 instances of Tomcat 5.0.28 running on their own high performance servers (dual XEON / 2GB RAM, etc) receiving AJP13 connector requests via our main web server which has IIS 5, IIS redirector, and Tomcat4. This works great even under high loads except for one thing: after several hours of usage (could be 3 hours or up 24 hours), the number of Tomcat threads on the 5.0.28 systems will suddenly increase at a rapid rate until Tomcat no longer responds to requests. It will hit the max # threads (which defaults to 200) and essentially freeze until it is restarted. This is strange because this behavior does not seem to correspond to increased usage of the particular server it occurs on. We are not sure what is triggering this and what those Tomcat threads are waiting on [they remain busy, waiting and unable to be reused by Tomcat]. My questions are: 1. Has anyone else experienced this kind of Thread explosion problem? 2. Is there a way to find out exactly what each Tomcat Thread is doing/waiting for? 3. Is there a way to periodically clear Tomcat's threadpool -- i.e. get rid of waiting/busy/unusued threads. We are working on ways to automatically restart Tomcat once a certain # of threads is reached, but this is not an acceptable solution, only a temporary workaround of course. Many thanks in advance __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo - 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] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: wrongly URI-decoded request.getPathInfo()
Hi, I guess you're not a big fan of JavaDocs? ;) Check out the JavaDoc for HttpServletRequest#getPathInfo, especially the Returns section, which is fairly unambiguous as these things go: Returns: a String, decoded by the web container, specifying extra path information that comes after the servlet path but before the query string in the request URL; or null if the URL does not have any extra path information Decoded is the key word above. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Garret Wilson [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 9:50 PM To: Tomcat Users List Subject: wrongly URI-decoded request.getPathInfo() I'm using Tomcat 5.5.4. I have an HTTP servlet mapped to /servlet/*. I send a request to the servlet on localhost like this: http://localhost/webapp/servlet/test/encoded%2Ffilename Here's what I get from the servlet request: request URI: /webapp/servlet/test/encoded%2Ffilename request URL: http://localhost/webapp/servlet/test/encoded%2Ffilename path info: /test/encoded/filename Why did Tomcat unencode my filename for request.getPathInfo()? This really throws a kink into things---I'm going to have to ignore path info and do a lot of work with the request URI and/or URL to find out the actual path passed to my servlet! Why on earth would Tomcat unencode my URI? How can I get the *real* path info? Garret - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Server Status and connection information
Hi, I see in the manager app that only server status information about connections to the manager app has extended information attached to it. That's not exactly true. The application status, VM state, and thread pool status is output for all applications on the Host. Have you tried doing /status/all to get a complete status? Also, how does the manager keep track of errors? I.e. what kind of errors increments the Error coun t in the manager? I couldn't find any documentation about this part of the manager in the tomcat documentation.. Hope someone can help me. It's not very well documented: a doc patch would be welcome. The source code is at http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/webapps/manage r/WEB-INF/classes/org/apache/catalina/manager/StatusManagerServlet.java? rev=1.15view=markup. Yoav Shapira http://www.yoavshapira.com This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I don't know what's wrong.
Yes, I do have JBoss-3.2.5 running on this server. I have also recently found out that the data is on a windows server running MSSQL. Any ideas on how to test that connectivity? Merry Christmas Happy New Year! Warron French Sr. Network Engineer Xtria, LLC 8045 Leesburg Pike #400 Vienna, VA 22182 Desk: 703-821-6110 Main: 703-821-6000 Fax: 703-827-0374 -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 4:37 PM To: 'Tomcat Users List' Subject: RE: I don't know what's wrong. Jboss is an application server (EJB container). Do you have any EJB application installed? Tomcat renders the pages. Those pages are the front end of your EJB application. -Original Message- From: Warron French [mailto:[EMAIL PROTECTED] Sent: December 7, 2004 4:35 PM To: Tomcat Users List Subject: RE: I don't know what's wrong. So, how does JBoss fit into the whole situation? Merry Christmas Happy New Year! Warron French Sr. Network Engineer Xtria, LLC 8045 Leesburg Pike #400 Vienna, VA 22182 Desk: 703-821-6110 Main: 703-821-6000 Fax: 703-827-0374 -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 4:34 PM To: 'Tomcat Users List' Subject: RE: I don't know what's wrong. Mod_jk is the bridge between Apache and Tomcat. Consult jk 1.x documentation on how to configure it. Mysqld is the MySQL daemon on linux. Many websites use MySQL along with Apache and PHP. -Original Message- From: Warron French [mailto:[EMAIL PROTECTED] Sent: December 7, 2004 4:22 PM To: User Tomcat (E-mail) Subject: I don't know what's wrong. We have a JBoss application? That uses .jsp files to interact with a supposedly searchable database. Can someone explain to me the concepts behind Tomcat, mod_jk, JBoss, and Apache, and if maybe I am missing something like the database. I am running mysqld, but as far as I know... the mysqld isn't supporting ANY websites yet. Here is my url I am trying to get to work. I really don't know enough to figure out what is missing and what I need to be done. http://www.nrcitcw.org/nrcitcw/SearchCategory.jsp I can send snippets of my Virtual Host config from my apache server if anyone is willing to help me. please. This is driving me nuts. It was implemented before I knew it existed. Merry Christmas Happy New Year! Warron French Sr. Network Engineer Xtria, LLC 8045 Leesburg Pike #400 Vienna, VA 22182 Desk: 703-821-6110 Main: 703-821-6000 Fax: 703-827-0374 - 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] !DSPAM:41b621f721551697314170! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I don't know what's wrong.
THANK YOU! It will be forthcoming! Merry Christmas Happy New Year! Warron French Sr. Network Engineer Xtria, LLC 8045 Leesburg Pike #400 Vienna, VA 22182 Desk: 703-821-6110 Main: 703-821-6000 Fax: 703-827-0374 -Original Message- From: Robert F. Hall [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 4:47 PM To: Tomcat Users List Subject: Re: I don't know what's wrong. Hi Warron, We are using JBoss 3.2.5 w/embedded Tomcat 5.0.26 and have Apache 1.3.27 in front of JBoss/Tomcat A brief overview: [Web browser]---[Apache port 80]---[mod_jk port 8009]---[JBoss/Tomcat listener port 8009][Database + other resources] If you could forward your Apache config files and your JBoss server.xml (maybe best done off-list, Yoav?) I'll take a look at them. -Robert Warron French wrote: So, how does JBoss fit into the whole situation? Merry Christmas Happy New Year! Warron French Sr. Network Engineer Xtria, LLC 8045 Leesburg Pike #400 Vienna, VA 22182 Desk: 703-821-6110 Main: 703-821-6000 Fax: 703-827-0374 -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 4:34 PM To: 'Tomcat Users List' Subject: RE: I don't know what's wrong. Mod_jk is the bridge between Apache and Tomcat. Consult jk 1.x documentation on how to configure it. Mysqld is the MySQL daemon on linux. Many websites use MySQL along with Apache and PHP. -Original Message- From: Warron French [mailto:[EMAIL PROTECTED] Sent: December 7, 2004 4:22 PM To: User Tomcat (E-mail) Subject: I don't know what's wrong. We have a JBoss application? That uses .jsp files to interact with a supposedly searchable database. Can someone explain to me the concepts behind Tomcat, mod_jk, JBoss, and Apache, and if maybe I am missing something like the database. I am running mysqld, but as far as I know... the mysqld isn't supporting ANY websites yet. Here is my url I am trying to get to work. I really don't know enough to figure out what is missing and what I need to be done. http://www.nrcitcw.org/nrcitcw/SearchCategory.jsp I can send snippets of my Virtual Host config from my apache server if anyone is willing to help me. please. This is driving me nuts. It was implemented before I knew it existed. Merry Christmas Happy New Year! Warron French Sr. Network Engineer Xtria, LLC 8045 Leesburg Pike #400 Vienna, VA 22182 Desk: 703-821-6110 Main: 703-821-6000 Fax: 703-827-0374 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:41b61f0721071269171754! - 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: I don't know what's wrong.
If you want to test the MySQL connectivity, make sure that MySQL server allows your IP to remote login otherwise you will have to GRANT PRIVILEDGE. -Original Message- From: Warron French [mailto:[EMAIL PROTECTED] Sent: December 8, 2004 10:42 AM To: Tomcat Users List Subject: RE: I don't know what's wrong. Yes, I do have JBoss-3.2.5 running on this server. I have also recently found out that the data is on a windows server running MSSQL. Any ideas on how to test that connectivity? Merry Christmas Happy New Year! Warron French Sr. Network Engineer Xtria, LLC 8045 Leesburg Pike #400 Vienna, VA 22182 Desk: 703-821-6110 Main: 703-821-6000 Fax: 703-827-0374 -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 4:37 PM To: 'Tomcat Users List' Subject: RE: I don't know what's wrong. Jboss is an application server (EJB container). Do you have any EJB application installed? Tomcat renders the pages. Those pages are the front end of your EJB application. -Original Message- From: Warron French [mailto:[EMAIL PROTECTED] Sent: December 7, 2004 4:35 PM To: Tomcat Users List Subject: RE: I don't know what's wrong. So, how does JBoss fit into the whole situation? Merry Christmas Happy New Year! Warron French Sr. Network Engineer Xtria, LLC 8045 Leesburg Pike #400 Vienna, VA 22182 Desk: 703-821-6110 Main: 703-821-6000 Fax: 703-827-0374 -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 4:34 PM To: 'Tomcat Users List' Subject: RE: I don't know what's wrong. Mod_jk is the bridge between Apache and Tomcat. Consult jk 1.x documentation on how to configure it. Mysqld is the MySQL daemon on linux. Many websites use MySQL along with Apache and PHP. -Original Message- From: Warron French [mailto:[EMAIL PROTECTED] Sent: December 7, 2004 4:22 PM To: User Tomcat (E-mail) Subject: I don't know what's wrong. We have a JBoss application? That uses .jsp files to interact with a supposedly searchable database. Can someone explain to me the concepts behind Tomcat, mod_jk, JBoss, and Apache, and if maybe I am missing something like the database. I am running mysqld, but as far as I know... the mysqld isn't supporting ANY websites yet. Here is my url I am trying to get to work. I really don't know enough to figure out what is missing and what I need to be done. http://www.nrcitcw.org/nrcitcw/SearchCategory.jsp I can send snippets of my Virtual Host config from my apache server if anyone is willing to help me. please. This is driving me nuts. It was implemented before I knew it existed. Merry Christmas Happy New Year! Warron French Sr. Network Engineer Xtria, LLC 8045 Leesburg Pike #400 Vienna, VA 22182 Desk: 703-821-6110 Main: 703-821-6000 Fax: 703-827-0374 - 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] !DSPAM:41b720e5124171034330437!
RE: I don't know what's wrong.
From: Phillip Qin [mailto:[EMAIL PROTECTED] If you want to test the MySQL connectivity, make sure that MySQL server allows your IP to remote login otherwise you will have to GRANT PRIVILEDGE. The original poster specified MSSQL noy mySQL. Two irritatingly close acronyms, I agree! - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5, jdk1.5 and xsl
Hi, Why does a xsl:include href=whatsoever.xsl/ directive not work under tomcat 5 (jdk1.5), but works under tomcat 5 and jdk1.4 with the compat package for tomcat? Greets thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I don't know what's wrong.
Peter Crowther wrote: From: Phillip Qin [mailto:[EMAIL PROTECTED] If you want to test the MySQL connectivity, make sure that MySQL server allows your IP to remote login otherwise you will have to GRANT PRIVILEDGE. The original poster specified MSSQL noy mySQL. Two irritatingly close acronyms, I agree! - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This is quoted from his orginal post: I am running mysqld, but as far as I know... the mysqld isn't supporting ANY websites yet. Wade - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I don't know what's wrong.
From: Warron French [mailto:[EMAIL PROTECTED] Yes, I do have JBoss-3.2.5 running on this server. I have also recently found out that the data is on a windows server running MSSQL. Any ideas on how to test that connectivity? One approach is to start SQL Profiler on the SQL Server box (ask a DBA if you can't get to the box yourself) and watch for connections from your JBoss server. Then run a page that you reckon makes a connection to the server. If they see a connection, it's probably working :-). If not, you'll need to know: - Your connection details to the SQL Server, especially whether you're using SSPI or username/password security; - If using SSPI, the Windows login under which the JBoss server [probably!] is running. Then you can use an appropriate diagnostic tool (ask me again!) to try to make a connection to the database. Are you running JBoss on Windows or UNIX? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple domains on single machine
You may not even need to use the Apache HTTPD web server, in which case you should just have Tomcat listen on port 80 itself, and refer to the documentation for Hosts on the Tomcat site. If you really need to use the Apache web server, you'd probably get better advice from the HTTPD list for your Apache configuration. So this is a bit off topic, but it's a problem that you have the one named VirtualHost (the default one, *:80), and two configurations for it. You need to have two named VirtualHosts (one for each of your virtual hosts, eh?). Read the Apache HTTPD documentation at http://httpd.apache.org/docs-project/. There's very good documentation on most of the directives. When you get that sorted, you'll need to bring Tomcat up behind Apache. This has been worked out far better in numerous how-tos and messages to this list than I could here. You'll find some helpful links at http://wiki.apache.org/jakarta-tomcat/UsefulLinks. Benjamin J. Armintor Operations Systems Specialist ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: Mayuresh Kshirsagar [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 8:07 AM To: Tomcat Users List Subject: Re: Multiple domains on single machine Any pointers on this one please...its urgent - Original Message - From: Mayuresh Kshirsagar To: [EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 3:27 PM Subject: Multiple domains on single machine Hi I have setup a test machine so that it should host two sites 1. http://admin 2. http://support But only one (http://admin) is accessible and the other one is not. Can you give any pointers. I set up virtual hosts as (httpd.conf): NameVirtualHost *:80 VirtualHost *:80 ServerName admin ServerAdmin [EMAIL PROTECTED] DocumentRoot E:/admin.support.cp.net/html/ ErrorDocument 404 E:/admin.support.cp.net/notfound.html ErrorLog logs/admin.support.cp.net-error_log LogFormat %h %l %u %t \%r\ %s %b \%{Referer}i\ \%{User-Agent}i\ combined LogFormat %h %l %u %t \%r\ %s %b common LogFormat %{Referer}i - %U referer LogFormat %{User-agent}i agent CustomLog logs/admin.support.cp.net-access_log combined Alias /icons/ E:/admin.support.cp.net/icons/ ScriptAlias /cgi-bin/ E:/admin.support.cp.net/cgi-bin/ Directory E:/admin.support.cp.net/html Options FollowSymLinks Includes DirectoryIndex index.html index.jsp AllowOverride AuthConfig /Directory AddType text/x-server-parsed-html .html /VirtualHost VirtualHost *:80 DocumentRoot E:/support1.cp.net ServerName support ServerAdmin [EMAIL PROTECTED] ErrorLog logs/support-error_log LogFormat %h %l %u %t \%r\ %s %b \%{Referer}i\ \%{User-Agent}i\ combined LogFormat %h %l %u %t \%r\ %s %b common LogFormat %{Referer}i - %U referer LogFormat %{User-agent}i agent CustomLog logs/support-access_log combined Alias /pdf/ E:/support1.cp.net/content/pdf/ Alias /images/ E:/support1.cp.net/images/ ScriptAlias /cgi-bin/ E:/support1.cp.net/cgi-bin/ ErrorDocument 404 E:/support1.cp.net/notfound.jsp # Allow Server Side includes (SSI) Directory E:/support1.cp.net Options FollowSymLinks Includes AllowOverride AuthConfig allow from all /Directory AddType text/x-server-parsed-html .html /VirtualHost Similarly I added following to server.xml: Host Name=support Context path= docBase=E:/support1.cp.net debug=0 reloadable=true / /Host Host Name=admin Context path= docBase=E:/admin.support.cp.net debug=0 reloadable=true / /Host I also added lines to the hosts file on that machine: IP-Address admin IP-Address support. Thanks Mayuresh. -- - 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: I don't know what's wrong.
Sorry you misunderstood. The database is Microsoft MSSQL on a Windows box (of course) on another server. Merry Christmas Happy New Year! Warron French Sr. Network Engineer Xtria, LLC -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 10:45 AM To: 'Tomcat Users List' Subject: RE: I don't know what's wrong. If you want to test the MySQL connectivity, make sure that MySQL server allows your IP to remote login otherwise you will have to GRANT PRIVILEDGE. -Original Message- From: Warron French [mailto:[EMAIL PROTECTED] Sent: December 8, 2004 10:42 AM To: Tomcat Users List Subject: RE: I don't know what's wrong. Yes, I do have JBoss-3.2.5 running on this server. I have also recently found out that the data is on a windows server running MSSQL. Any ideas on how to test that connectivity? Merry Christmas Happy New Year! Warron French Sr. Network Engineer Xtria, LLC 8045 Leesburg Pike #400 Vienna, VA 22182 Desk: 703-821-6110 Main: 703-821-6000 Fax: 703-827-0374 -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 4:37 PM To: 'Tomcat Users List' Subject: RE: I don't know what's wrong. Jboss is an application server (EJB container). Do you have any EJB application installed? Tomcat renders the pages. Those pages are the front end of your EJB application. -Original Message- From: Warron French [mailto:[EMAIL PROTECTED] Sent: December 7, 2004 4:35 PM To: Tomcat Users List Subject: RE: I don't know what's wrong. So, how does JBoss fit into the whole situation? Merry Christmas Happy New Year! Warron French Sr. Network Engineer Xtria, LLC 8045 Leesburg Pike #400 Vienna, VA 22182 Desk: 703-821-6110 Main: 703-821-6000 Fax: 703-827-0374 -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 4:34 PM To: 'Tomcat Users List' Subject: RE: I don't know what's wrong. Mod_jk is the bridge between Apache and Tomcat. Consult jk 1.x documentation on how to configure it. Mysqld is the MySQL daemon on linux. Many websites use MySQL along with Apache and PHP. -Original Message- From: Warron French [mailto:[EMAIL PROTECTED] Sent: December 7, 2004 4:22 PM To: User Tomcat (E-mail) Subject: I don't know what's wrong. We have a JBoss application? That uses .jsp files to interact with a supposedly searchable database. Can someone explain to me the concepts behind Tomcat, mod_jk, JBoss, and Apache, and if maybe I am missing something like the database. I am running mysqld, but as far as I know... the mysqld isn't supporting ANY websites yet. Here is my url I am trying to get to work. I really don't know enough to figure out what is missing and what I need to be done. http://www.nrcitcw.org/nrcitcw/SearchCategory.jsp I can send snippets of my Virtual Host config from my apache server if anyone is willing to help me. please. This is driving me nuts. It was implemented before I knew it existed. Merry Christmas Happy New Year! Warron French Sr. Network Engineer Xtria, LLC 8045 Leesburg Pike #400 Vienna, VA 22182 Desk: 703-821-6110 Main: 703-821-6000 Fax: 703-827-0374 - 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] !DSPAM:41b720e5124171034330437! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I don't know what's wrong.
Wade that was true originally, but I also stated that I recently discovered the data was being housed on a MS MSSQL database. I am very sorry for the confusion. Merry Christmas Happy New Year! Warron French Sr. Network Engineer Xtria, LLC -Original Message- From: Wade Chandler [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 10:51 AM To: Tomcat Users List Subject: Re: I don't know what's wrong. Peter Crowther wrote: From: Phillip Qin [mailto:[EMAIL PROTECTED] If you want to test the MySQL connectivity, make sure that MySQL server allows your IP to remote login otherwise you will have to GRANT PRIVILEDGE. The original poster specified MSSQL noy mySQL. Two irritatingly close acronyms, I agree! - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This is quoted from his orginal post: I am running mysqld, but as far as I know... the mysqld isn't supporting ANY websites yet. Wade - 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 detect expired session vs. no session? (Solved)
I'm a bit puzzled. There is something not quite right here (or maybe I'm not quite understanding correctly). Aren't sessions created as soon as a JSP within a ServletContext is accessed, irrespective of whether the user authenticates or not? Thus invalid sessions vs anonymous sessions is not an either/or choice - a session can be both valid and authenticated, or both valid and anonymous. Is invalid the same as expired? Also there seems to be a slight contradiction in what you say below, because if request.getSession returns null for an invalidated session, how can you then call isRequestedSessionIdValid() on an invalidated session without getting a NullPointerException? I realise that the method is not called on the session object directly, but surely it must access the session object at least indirectly? -Original Message- From: LAM Kwun Wa Joseph [mailto:[EMAIL PROTECTED] Sent: Wednesday 08 December 2004 11:23 To: [EMAIL PROTECTED] Subject: RE: How to detect expired session vs. no session? (Solved) Confirmed that request.getSession(false)==null for both expired session requests and anonymous requests, if I have %@ page session=false % in my pages. I just figured out the follow which work exactly what I wanted: boolean hasSessionID = (request.isRequestedSessionIdFromURL() || request.isRequestedSessionIdFromCookie()); if (hasSessionID !request.isRequestedSessionIdValid()) { // expired/invalidated session } else { // no session at all } I haven't tested this, but I *think* that a request containing an expired session will still return a non-null session object, but a different instance to the one that would have been returned pre-timeout. But I don't know that for a fact. why not just test it out yourself, it's not that hard, just shorten the timeout interval first so that you don't have to wait 30 mins to do your test ;) -Original Message- From: LAM Kwun Wa Joseph [mailto:[EMAIL PROTECTED] Sent: Wednesday 08 December 2004 09:35 To: [EMAIL PROTECTED] Subject: RE: How to detect expired session vs. no session? But does it have the same effect for a request with an expired session vs a request with no session at all? I think it will return null in both cases. if you call request.getSession(false) this will return null if the request is not associated with a request already. the false param turns off the default behaviour of creating a new session when none exists. -Original Message- From: LAM Kwun Wa Joseph [mailto:[EMAIL PROTECTED] Sent: Wednesday 08 December 2004 08:23 To: [EMAIL PROTECTED] Subject: How to detect expired session vs. no session? Hi, How can I tell between a request using an expired session vs a request with no session at all? I need to show different messages to users being kicked due to inactivity and to anonymous users. Thanks! Regards, Joseph Lam - 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] -- --- 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: I don't know what's wrong.
Warron French wrote: Wade that was true originally, but I also stated that I recently discovered the data was being housed on a MS MSSQL database. I am very sorry for the confusion. Merry Christmas Happy New Year! Warron French Sr. Network Engineer Xtria, LLC -Original Message- From: Wade Chandler [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 10:51 AM To: Tomcat Users List Subject: Re: I don't know what's wrong. Peter Crowther wrote: From: Phillip Qin [mailto:[EMAIL PROTECTED] If you want to test the MySQL connectivity, make sure that MySQL server allows your IP to remote login otherwise you will have to GRANT PRIVILEDGE. The original poster specified MSSQL noy mySQL. Two irritatingly close acronyms, I agree! - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This is quoted from his orginal post: I am running mysqld, but as far as I know... the mysqld isn't supporting ANY websites yet. Wade - 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] That's ok. I just saw another email that I had not noticed where you said MSSQL instead of MySQL. No problem. Wade - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java.net.SocketException: socket closed
There are no servers running on the port 8080.I checked myself with netstat -a and there is no PWS or IIS installed There is no property Screen Buffer Size over the Properties Window of DOS on Windows98 Machine. Yes I changed the Initial Size to 50 lines and not more than that can be done as it is a COmbo Box Anyway The increased Exceptions are ed exception: java.net.SocketException: socket closedjava.net.SocketException: socket closedat java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)at java.net.ServerSocket.implAccept(ServerSocket.java:450)at java.net.ServerSocket.accept(ServerSocket.java:421)at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:60) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:368) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:548) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595)Dec 8, 2004 8:47:20 PM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocketWARNING: Reinitializing ServerSocketDec 8, 2004 8:47:20 PM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocketSEVERE: Endpoint null ignored exception: java.net.BindException: Address already in use: JVM_Bind:8080java.net.BindException: Address already in use: JVM_Bind:8080 at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:264) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:429) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:548) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595)Dec 8, 2004 8:47:20 PM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocketWARNING: Restarting endpointDec 8, 2004 8:47:20 PM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocketSEVERE: Endpoint null shutdown due to exception: java.net.BindException: Address already in use: JVM_Bind:8080java.net.BindException: Address already in use: JVM_Bind:8080 at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:264) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:441) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:548) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595)Dec 8, 2004 8:47:20 PM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable runSEVERE: Caught exception (java.lang.ThreadDeath) executing [EMAIL PROTECTED], terminating thread The starting Exception still is not Visible Do you know any Software that can act as MS DOS Window and has scrolling ability There are no servers running on port 8080 I think that the Tomcat itself starts the server and after anyone accesses the server it throws the Exception and somehow is not able to release the ServerSocket as it automatically tries to get the ServerSocket it throws the Exception that the port is in use Thanks in advance CSJakharia Subscribe to bermudaEmail: [input] [input] Browse Archives at groups-beta.google.com - Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. Learn more.
RE: HttpServletResponse.setStatus and setContentType
Thanks for the suggestion, Yoav, but thus far in my experiments, sendError seems to --Send Content-Type: text/html;charset=utf-8 --Ignore the content I've written (using ServletResponse.getOutputStream()) and instead send the generic Tomcat HTML 'Server Error' message. Which of course is even worse for a web service client, since it's not well-formed XML ;-) I'm trying: servletResponse.setContentType(text/xml); ... soapResponse.save(servletResponse.getOutputStream()); servletResponse.sendError(500); (where soapResponse.save writes the XML to the specified OutputStream) Using sendError(int, String) does effectively the same thing, except with the string message included in the HTML response. When I instead tried: servletResponse.setContentType(text/xml); ... servletResponse.setStatus(500); soapResponse.save(servletResponse.getOutputStream()); I got the appropriate XML contents back, but with Content-Type set to text/html;charset=utf-8 instead of text/xml There must be a way to do this - plenty of people use Tomcat to handle SOAP web services...I'll check the Axis source and see how they handle it. But any suggestions would be welcome. Thanks again, Aaron Dunlop -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 5:59 AM To: Tomcat Users List Subject: RE: HttpServletResponse.setStatus and setContentType Hi, You know, the JavaDoc for HttpServletResponse#setStatus is pretty clear on this ;) Use sendError for errors, setStatus for normal responses. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Dunlop, Aaron [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 5:44 PM To: Tomcat Users List Subject: HttpServletResponse.setStatus and setContentType I have a standard HTTP servlet acting as an XML web service endpoint, running on an embedded Tomcat 5.0.30. I of course use HttpServletResponse.setContentType to specify that the response is text/xml. When the request is successful and I set a 2xx HTTP response code, the Content-Type header looks as expected. But if an error is detected and I return an HTTP error code (using setStatus), the Content- Type header specifies text/html;charset=utf-8 instead of text/xml. It doesn't seem to matter whether I call setContentType before or after setStatus, and all the 4xx and 5xx codes I've tried trigger this behavior. I'd just ignore it, but unfortunately, the WSI Basic Profile specifies that a SOAP fault must return a 500 along with the XML fault. And some clients (ahem... .NET...) seem to choke trying to parse the fault when the wrong content-type is returned. I didn't find anything in the specs or documentation that indicated to me that this was required behavior, but perhaps I'm missing something. Any ideas? Thanks in advance, Aaron Dunlop - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - 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]
what to do about port for Tomcat 4 on Linux?
I want to move to Tomcat 5 right now, but can't yet, and for the time being we need to move from Tomcat 4.1.23 on Windows to 4.1.31 on Red Hat, so I'm now facing a question of what to do about the port Tomcat runs on. I've read stuff online that suggests it's best to leave it at 8080 since 80 is a privileged port on *nix. But from that point, I'm not sure what the best practice would be, though I've read different options, like user space port forwarding, kernal space port forwarding, or using a port forwarder (portfwd or redir4a), none of which I'm familiar with. What do you Tomcat users suggest would be a good approach for someone who's only a beginner/intermediate with Linux and using standalone Tomcat? In case it matters, note that we are also moving from our single Windows web server to 2 Linux web servers (each running standalone Tomcat), and we're trying to configure a load balancer hardware appliance in front of the two web servers. Thanks for your suggestions, Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Slightly OT: Yet another IE woe...
Thanks for the link. Very informative and best of all, it works! -- RH
Binding Mail to a Context
I have a web app installed in the C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\InfoSeek folder and the servlets are in .\WEB-INF\classes. A jsp fill-out form gets user input and populates a MySQL table and at the same time retrieves email address from the another table and supposed to send an email to the user selected person. Jsp page calls servlet and a bean to do that. I can save forms information in the database/table but cant send email. Following error appears: ERROR Occured.Name mail is not bound in this Context Content of log file: javax.naming.NameNotFoundException: Name mail is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:769) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at RequestForm.process(RequestForm.java:159) at RequestForm.initialize(RequestForm.java:56) The above application works in Tomcat 4 when I put the servlet and bean inside the folder for the examples (..webapps\examples\WEB-INF\class), because in the server.xml following Resource is defined: Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valuelocalhost/value /parameter /ResourceParams I tried to define the above resource in the web.xml but still its not working. How could the mail could be bound to a context. Please give me some idea. Thanks in advance. Razzakul
RE: Binding Mail to a Context
Hi, RTFM: the Resource configurations have changed from Tomcat 5.0 to 5.5, and certainly from 4.x. You need to modify your configuration files accordingly. http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-resources-howto.htm l. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Razzakul H Chowdhury [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 2:05 PM To: Tomcat Users List Subject: Binding Mail to a Context I have a web app installed in the C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\InfoSeek folder and the servlets are in .\WEB-INF\classes. A jsp fill-out form gets user input and populates a MySQL table and at the same time retrieves email address from the another table and supposed to send an email to the user selected person. Jsp page calls servlet and a bean to do that. I can save form's information in the database/table but can't send email. Following error appears: ERROR Occured.Name mail is not bound in this Context Content of log file: javax.naming.NameNotFoundException: Name mail is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:769) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at RequestForm.process(RequestForm.java:159) at RequestForm.initialize(RequestForm.java:56) The above application works in Tomcat 4 when I put the servlet and bean inside the folder for the examples (..webapps\examples\WEB-INF\class), because in the server.xml following Resource is defined: Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valuelocalhost/value /parameter /ResourceParams I tried to define the above resource in the web.xml but still its not working. How could the mail could be bound to a context. Please give me some idea. Thanks in advance. Razzakul This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] SCWCD Exam 1.4
You might find some interesting opinions on this book, by the author, at this O'Reilly page. I'm not trying to push this book. I just find it interesting to juxtapose the high praise it gets there and elsewhere with the cold shower it's gotten in this thread: http://www.oreilly.com/news/ksmanifesto.html -Original Message- From: Januski, Ken [mailto:[EMAIL PROTECTED] Sent: Friday, November 26, 2004 10:19 AM To: 'Andoni '; 'Tomcat Users List ' Subject: RE: [OT] SCWCD Exam 1.4 Ha! Well I know this type of book has to come as a shock, especially as a book for certification. As I said earlier I gave up on the Head First Java book because it was just too childlike. But this one has surprised me. Maybe that's because I went through both the Manning and Wrox books to get my 1.2 certification and this just serves as a light reminder of what I learned there as well as coverage of new topics for 1.4. I do know that it seemed pretty easy for people to score in the 90+ range on the 1.2 exam and that some people, mainly at JavaRanch, said that that was because anyone could memorize the required material. I suspect that the 1.4 exam tries to test for deeper understanding. My second suspicion is that underneath all the childlike facade of this Head First book that the authors are trying to make a deeper understanding of how servlets, jsp, etc. work more important than memorizing the spec. But I can't say whether I think that they've been successful until I finish the book. It may be when I'm done I'll just find that I didn't the childish style never added up to anything. Time will tell. But I can't blame you for being scared off by the book, especially as a certification book. I think that it really does presume a young audience, who will enjoy references to Weezer CDs, whatever/whoever they are. That said I'm still reading on and enjoying it. Perhaps I'll send an email to Tomcat list when I finally finish it. I do know that the first version of the Manning book was perfectly fine for me for my 1.2 certication and I imagine the new one will be just as good. Ken -Original Message- From: Andoni To: Tomcat Users List Sent: 11/26/2004 5:30 AM Subject: Re: [OT] SCWCD Exam 1.4 Hi, After reading this mail last night I found a shop in Dublin which had the book in stock. I raced into town after work to get there before the shop closed and got there 5 minutes before closing. I was so relieved and when I saw the book on the shelf I was well pleased. Only when I opened it to take a look did I realise the true extent of what you meant by jokes, cartoons and fill in the blanks pages. It looks more like a children's nursery rhyme book than a Java Certification book! I just put it back on the shelf and walked back out of the shop :-( Thanks, but no thanks, I'll be waiting until January. Andoni. - Original Message - From: Januski, Ken [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Wednesday, November 24, 2004 11:06 PM Subject: RE: [OT] SCWCD Exam 1.4 I'm part way through the Head First book. I really didn't like Head First Java though it got rave reviews when it came out. And I did like the first version of the Manning SCWCD book. That said I'm finding the Head First Servlets and JSP book enjoyable, though I've only read the first 150 pages or so. The authors are from www.javaranch.com and I'm sure you can get plenty of additional information there. Of course a lot of fans of the Head First books hang out there too. Whether you could actually use it for certification I'm not sure. I think that you probably could based on what I've read so far because it strives to get you to understand servlets, jsp and everything connected with them on a basic level. It does so with jokes, cartoons, fill in the blank pages, etc. I'm sure a lot of people will hate this manner of learning just as others can't stand the drier approach of the Manning book. My feeling is that if you are not someone who gets offended by jokey material that you can read this book and learn enough to pass the exam, esp. if you also read the specs as the book suggests. But take this with a grain of salt as I've not taken the 1.4 exam and I'm only 1/8 of the way through the book. If you like your books serious though, then steer very clear. Hope this helps, Ken -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 12:57 PM To: 'Tomcat Users List' Subject: RE: [OT] SCWCD Exam 1.4 I'd be completely remiss in not mentioning that Manning is putting out a second edition of it's SCWCD study guide. The second edition has been updated for the new exam. Manning's ISBN is 1932394389 (that's the one scheduled for January) HeadFirst is 0596005407 (the one out now) both of them cover the new exam. -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 11:49 AM To: 'Tomcat
RE: Possible to Authenticate from Servlet/Webapp Code?
Thanks for the info Yoav; however, I've tried what you suggested, and everything I can think of myself, and no luck. I don't know of anything in the declarative security that would help with this. Most of my apps use the standard for security, but there's one app that uses it's own login from a database. I created my own Realm that uses its table structure, thinking that in the login of this app, I could simply get a reference to the Realm, pass the credentials to it and bingo, I'm authenticated in both. I have tried: 1. Navigating the tomcat class hierarchy: problem is with class loaders. When I'm in the webapp and I do ServerFactory.getServer(), there are no services configured (ie ServerFactory.getServer().findServices() returns an empty array. 2. Placing my custom Realm in the common/lib, so it would be available to all classes. Then the catalina classes (which I extend, particularly JdbcRealm) aren't visible causing ClassNotFoundExceptions on startup. There's no way to break out of these dependencies that I can see. 3. Binding the Realm into JNDI from within the Realm constructor. Doesn't seem to work, getting javax.naming.NameNotFoundException: Name java:comp is not bound in this Context. Because the Realm is created first off, I don't think the JNDI contexts are set up. Is there some way I could do it through the MBeans maybe? Any other ideas, or even explanations of why I'm bone-headed are appreciated! :) Thanks in advance, Tim Sawlor -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, 7, December, 2004 11:51 AM To: Tomcat Users List Subject: RE: Possible to Authenticate from Servlet/Webapp Code? Hi, The Spec-mandated, and therefore portable, approach is via the web.xml declarative security. The Tomcat-specific way would mean you navigate down the container hierarchy, starting with ServerFactory.getServer, down to Service, Engine, Host, to find your Realm object. You could probably do this once on your app startup, e.g. in a listener or filter init. Yoav Shapira http://www.yoavshapira.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:45 AM To: [EMAIL PROTECTED] Subject: Possible to Authenticate from Servlet/Webapp Code? Question: - Is there a way to authenticate a user to the container (including SSO) from within a servlet? Something like: protected void service(HttpServletRequest req, HttpServletResponse resp) { Realm tomcatRealm = //how to get the realm??? tomcatRealm.authenticate(dauser, dauserspassword); ... } Other Info: --- I know how to configure the custom login pages, etc., but I need a way to authenticate in two places at once, due to a legacy application. It seems like this should be easy to do, so I expect I'm missing something obvious, but I simply can't figure out how to do it. I've been searching for a while... While standards-based would be better, a Tomcat-specific way would be fine as well. -- Tim Sawlor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
deleteOnExit() doesn't work in Tomcat on temp files
I've run into a bug that I only experience in Tomcat. If, within a servlet, I create a temporary file using File.createTempFile(...), Tomcat puts the file in its temp directory, which is fine. However, if I call deleteOnExit() on the file, the file doesn't get deleted when Tomcat is shut down. This happens even when the temporary is never opened. I am using Tomcat 5.5 on WindowsXP. Tomcat is installed as a service, and I am stopped and restarting it using the monitor program. I also tried rebooting my machine (to make sure Java had exited) but the files were still there. Has anyone else run into this? Is there a workaround? Thanks, --Paul Lynch p.s. Here's my test servlet's code: // TempFileTest import java.util.*; import java.io.*; import javax.servlet.http.*; /** * This class is a servlet used to test the problem with File.deleteOnExit() */ public class TempFileTest extends HttpServlet { /** * This method should be called automatically when the servlet is * initialized. */ public void init() { try { File f = File.createTempFile(TEMP_FILE_TEST, null); f.deleteOnExit(); } catch (Exception e) { System.out.println(TempFileTest could not create the temp file!); e.printStackTrace(); } } // init } // TempFileTest -- Mailblocks - A Better Way to Do Email http://about.mailblocks.com/info - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help: Windows Server on Linux Client
You don't need IIS to get rid of 8080. You need to shut down IIS and reconfigure server.xml to put tomcat on port 80. However, if you get rid of IIS, you can't possibly have domain login unless you want to write your own NTLM realm. -Original Message- From: Aris Javier [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:25 PM To: Tomcat Users List Subject: RE: Help: Windows Server on Linux Client but where to type [EMAIL PROTECTED] or foo\domain in linux? sorry im a newbie in linux... thanks! aris -Original Message- From: Benson Margulies [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 10:12 AM To: Tomcat Users List Subject: RE: Help: Windows Server on Linux Client The user can type [EMAIL PROTECTED] in as their user name to the basic auth box, and their domain password, or foo\domain. And then the IIS will cheerfully authenticate them to the domain. - 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: Help: Windows Server on Linux Client
Now you have to turn on security in Tomcat. If you want to talk to the AD for this purpose, well, lots of luck. You will need a custom realm or to implement this by hand in your servlets. Once you have security enabled at all, the browser (on Linux or wherever) will pop up a 'basic auth' dialog, and the user can type in a domain-qualified name. Unless you want to use forms authentication, for which there are some packages that someone else can help you with. -Original Message- From: Aris Javier [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 12:10 AM To: Tomcat Users List Subject: RE: Help: Windows Server on Linux Client Thanks! I've got Tomcat to work on port 80 with IIS service disabled! The problem now is request.getRemoteUser() returns NULL? Before, when I'm integrating it with IIS, request.getRemoteUser() returns the login name of the user... I need to get the user's domain login name... afterwhich, I will use that login name to verify in Active Directory if he/she exists... you mentioned a login box appears when I hit a site with security...? how to make my site secured then? So sorry to cause you too much trouble.. im the only java programmer here.. =| Thanks again! aris -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 12:34 PM To: Tomcat Users List Subject: Re: Help: Windows Server on Linux Client 1. Is IIS shutdown (Stop the service and disable it)? 2. Is Tomcat up and running? 3. http://localhost returns what? If you get the default start page there is a link to the manager. As for the login Benson is speaking of the authentication (login) box that appears when you hit a site with security. Doug - Original Message - From: Aris Javier [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 11:16 PM Subject: RE: Help: Windows Server on Linux Client thanks Chuck! I've changed my server.xml to port 80 and disconnected IIS... but page cannot be displayed appeared...? http://server/myApp then, how to go to Tomcat web manager? http://server:80? aris -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 11:51 AM To: Tomcat Users List Subject: RE: Help: Windows Server on Linux Client From: Aris Javier [mailto:[EMAIL PROTECTED] Subject: RE: Help: Windows Server on Linux Client if I will not use IIS, how to remove 8080 in URL then? Tomcat's HTTP connector is configured in server.xml. By default, Tomcat ships with the port number set to 8080 so you can test without interfering with any HTTP server you might already have installed. Once you're ready to put Tomcat in production, change the 8080 in server.xml to 80. - 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] - 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: [Fwd: %@page isThreadSafe=false % does not work]
I compared two servlets' source code compiled from JSPs, at the beginning of one jsp I add page directive: [EMAIL PROTECTED] isThreadSafe=false % and the other, [EMAIL PROTECTED] isThreadSafe=true %. But the two servlet are the same , I had thought the first servlet will implement interface SingleThreadModel, but it didn't. Could anyone give me a hint? This must be a bug in Lomboz. I verified this works as expected in Tomcat 5, i.e., specifying [EMAIL PROTECTED] isThreadSafe=false % will cause the generated servlet to implement SingleThreadModel. Jan BTW, jsp compiler (Lomboz) says SingleThreadModel is deprecated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat synchronous shutdown?
Currently Tomcats shutdown model is to politely request that the server shutdown. Most of the time Tomcat is friendly and will shutdown as requested but sometimes it won't do as its told and run forever. This seems to happen if a shutdown hook has problems or it runs out of memory. This is happening to us now that we're on 5.5. Is there a way to: 1. Make Tomcat's ./bin/shutdown.sh script block until it shutdown 2. Return a status code about the shutdown success 3. Optionally terminate the java process with a -9 if it takes too long The same should happen for Tomcat startup btw... Thoughts? Kevin -- Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an invite! Also see irc.freenode.net #rojo if you want to chat. Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html If you're interested in RSS, Weblogs, Social Networking, etc... then you should work for Rojo! If you recommend someone and we hire them you'll get a free iPod! Kevin A. Burton, Location - San Francisco, CA AIM/YIM - sfburtonator, Web - http://peerfear.org/ GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Displaying XML in Safari
Hi, The current version of Safari has no support for pure XML à la Internet Explorer. What a pity ! I was wondering if there is a simple way to convert an XML document to HTML that would display properly in Safari. This is merely an utility, and all I'm looking for is something that will make XML look like XML. No special features. --- Eric VERGNAUD - JLynx Software Cutting-edge technologies and services for software companies web: http://www.jlynx.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat synchronous shutdown?
Hi, The Tomcat shutdown script provides support for a -force option, which does a kill -9 on the process ID after the normal shutdown. If you want something beyond that, do it yourself. Accounting for reasons like an OOME or your own code spawning non-daemon threads is outside Tomcat's scope. If it takes too long is a vague criterion at best, as conditions and use-cases wildly differ. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Kevin A. Burton [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 3:26 PM To: Tomcat Users List Subject: Tomcat synchronous shutdown? Currently Tomcats shutdown model is to politely request that the server shutdown. Most of the time Tomcat is friendly and will shutdown as requested but sometimes it won't do as its told and run forever. This seems to happen if a shutdown hook has problems or it runs out of memory. This is happening to us now that we're on 5.5. Is there a way to: 1. Make Tomcat's ./bin/shutdown.sh script block until it shutdown 2. Return a status code about the shutdown success 3. Optionally terminate the java process with a -9 if it takes too long The same should happen for Tomcat startup btw... Thoughts? Kevin -- Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an invite! Also see irc.freenode.net #rojo if you want to chat. Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html If you're interested in RSS, Weblogs, Social Networking, etc... then you should work for Rojo! If you recommend someone and we hire them you'll get a free iPod! Kevin A. Burton, Location - San Francisco, CA AIM/YIM - sfburtonator, Web - http://peerfear.org/ GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Threads issues in Tomcat 5.0.28
Hi Yoav, Thanks for the response I will be sure to include my Thread dump. Meanwhile it sames that AJP13 in Tomcat5 has no parameters such as maxSpareThreads, maxThreads, etc. We are using AJP13 to handle all requests... The documentation (and all searches I have done) do not mention the ability to use these parameters with AJP13, but they can be used with the HTTP protocol. Anybody have any idea whether AJP13 supports these attributes in Tomcat 5.0? Thanks again, Matt --- Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Once you get the thread dump, post it, and we can try to help you figure out what's wrong. The Tomcat thread pools should automatically recover unused threads, subject to your configuration (see the maxSpareThreads and releated Connector configuration attributes). Yoav Shapira http://www.yoavshapira.com -Original Message- From: Arnab Chakravarty [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:50 PM To: Tomcat Users List Subject: RE: Threads issues in Tomcat 5.0.28 Hey, I see your problem similar to mine some time in the past. What you need to is the following: - Lower the number of threads and keep it close to 120-150 threads. - Are you using a database, if yes, check if the DB connection pool is the bottleneck - Yes, you can find what the 200 threads are doing by taking a threaddump. The way to do this is to use the command - kill -QUIT tomcat pid. Hope this helps. Arnab -Original Message- From: Matt Robinson [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 8:02 AM To: [EMAIL PROTECTED] Subject: Threads issues in Tomcat 5.0.28 Hi, We have 5 instances of Tomcat 5.0.28 running on their own high performance servers (dual XEON / 2GB RAM, etc) receiving AJP13 connector requests via our main web server which has IIS 5, IIS redirector, and Tomcat4. This works great even under high loads except for one thing: after several hours of usage (could be 3 hours or up 24 hours), the number of Tomcat threads on the 5.0.28 systems will suddenly increase at a rapid rate until Tomcat no longer responds to requests. It will hit the max # threads (which defaults to 200) and essentially freeze until it is restarted. This is strange because this behavior does not seem to correspond to increased usage of the particular server it occurs on. We are not sure what is triggering this and what those Tomcat threads are waiting on [they remain busy, waiting and unable to be reused by Tomcat]. My questions are: 1. Has anyone else experienced this kind of Thread explosion problem? 2. Is there a way to find out exactly what each Tomcat Thread is doing/waiting for? 3. Is there a way to periodically clear Tomcat's threadpool -- i.e. get rid of waiting/busy/unusued threads. We are working on ways to automatically restart Tomcat once a certain # of threads is reached, but this is not an acceptable solution, only a temporary workaround of course. Many thanks in advance __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo - 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] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? All your favorites on one personal page Try My Yahoo! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Displaying XML in Safari
Use mozilla and or Firefox. It works perfectly for me Eric VERGNAUD wrote: Hi, The current version of Safari has no support for pure XML à la Internet Explorer. What a pity ! I was wondering if there is a simple way to convert an XML document to HTML that would display properly in Safari. This is merely an utility, and all I'm looking for is something that will make XML look like XML. No special features. --- Eric VERGNAUD - JLynx Software Cutting-edge technologies and services for software companies web: http://www.jlynx.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alain Gaeremynck CTO Le Groupe Interstructure (514) 374-1110 (514) 825-7810 cell weblog: http://www.sanssucre.ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat synchronous shutdown?
Shapira, Yoav wrote: Hi, The Tomcat shutdown script provides support for a -force option, which does a kill -9 on the process ID after the normal shutdown. If you want something beyond that, do it yourself. Accounting for reasons like an OOME or your own code spawning non-daemon threads is outside Tomcat's scope. If it takes too long is a vague criterion at best, as conditions and use-cases wildly differ. Too long can be defined in a configuration file. The major problem is that Tomcat can't do a 'restart'. For example with mysql I can do a /etc/init.d/mysql restart and it will block until stop runs... then start. If stop returns an errorcode then it won't attempt to startup MySQL again. Kevin -- Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an invite! Also see irc.freenode.net #rojo if you want to chat. Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html If you're interested in RSS, Weblogs, Social Networking, etc... then you should work for Rojo! If you recommend someone and we hire them you'll get a free iPod! Kevin A. Burton, Location - San Francisco, CA AIM/YIM - sfburtonator, Web - http://peerfear.org/ GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat synchronous shutdown?
Will tomcat wait until time consuming requests are completed before shutting down? /rob - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 9:36 PM Subject: RE: Tomcat synchronous shutdown? Hi, The Tomcat shutdown script provides support for a -force option, which does a kill -9 on the process ID after the normal shutdown. If you want something beyond that, do it yourself. Accounting for reasons like an OOME or your own code spawning non-daemon threads is outside Tomcat's scope. If it takes too long is a vague criterion at best, as conditions and use-cases wildly differ. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Kevin A. Burton [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 3:26 PM To: Tomcat Users List Subject: Tomcat synchronous shutdown? Currently Tomcats shutdown model is to politely request that the server shutdown. Most of the time Tomcat is friendly and will shutdown as requested but sometimes it won't do as its told and run forever. This seems to happen if a shutdown hook has problems or it runs out of memory. This is happening to us now that we're on 5.5. Is there a way to: 1. Make Tomcat's ./bin/shutdown.sh script block until it shutdown 2. Return a status code about the shutdown success 3. Optionally terminate the java process with a -9 if it takes too long The same should happen for Tomcat startup btw... Thoughts? Kevin -- Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an invite! Also see irc.freenode.net #rojo if you want to chat. Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html If you're interested in RSS, Weblogs, Social Networking, etc... then you should work for Rojo! If you recommend someone and we hire them you'll get a free iPod! Kevin A. Burton, Location - San Francisco, CA AIM/YIM - sfburtonator, Web - http://peerfear.org/ GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - 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: Displaying XML in Safari
If you have a String, you could use c:out, and the escapeXml attribute. [EMAIL PROTECTED] 12/8/2004 1:33:00 PM Hi, The current version of Safari has no support for pure XML à la Internet Explorer. What a pity ! I was wondering if there is a simple way to convert an XML document to HTML that would display properly in Safari. This is merely an utility, and all I'm looking for is something that will make XML look like XML. No special features.
Tomcat mailing list is full of non tomcat topics
Hi cats worldover. It's been a while that I've reading the posts on this mailing list and I can easily say that about 30% are not pertinent to tomcat but are related to web technology in general. Isn't it time to route this traffic to other mailing lists? Can't the tomcat project host new list for those users lookin for other kind of help? It will sure enhance the quality of the list a lot. /Roberto
RE: Tomcat mailing list is full of non tomcat topics
From: Roberto Cosenza [mailto:[EMAIL PROTECTED] Subject: Tomcat mailing list is full of non tomcat topics Isn't it time to route this traffic to other mailing lists? Are you volunteering to be the policeman? Believe me, moderating any mailing list is a thankless task. Been there, done that, burned the t-shirt, won't ever consider it again. The subjects of nearly all of the off-topic posts already have appropriate mailing lists (not necessarily within Apache), but the posters frequently just don't know how to look for 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]
directory for compiled JSPs
Sorry if this has been asked before. I searched archive but couldn't find exactly what I'm looking for. The issue happened is that when using Tomcat5 and deploying web applications with same context root (path), the second web app deployed (and Tomcat restarted) will still have browser pointing to the main JSP of the first application (assuming they have the same starting JSP page). What I noticed then is from Tomcat 4 to Tomcat 5, it seems the working directory structure has changed when JSPs are compiled which may have contributed to this. - in Tomcat 4, I used to get under host something like D_3A_5Ctemp_5Ctest_5Cwebcontext (docBase), and below it the web context if any. - in Tomcat 5, it directly puts web context directory under host. I'm wondering if I could/should bring this old feature of Tomcat 4 back. What are the reason(s) that this is changed (e.g. consistency, JspC, etc.)? Thanks in advance, John The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deleteOnExit() doesn't work in Tomcat on temp files
[EMAIL PROTECTED] wrote: I am using Tomcat 5.5 on WindowsXP. Tomcat is installed as a service, Somehow when Tomcat is installed as a Windows service, the shutdown doesn't go through the orderly steps (i.e. servlet destroy()s aren't called, and I suspect the process is just *killed* instead of being made to exit normally). You may want to have a separate mechanism to delete these temp files instead of waiting for the tomcat exit, anyway. If your Tomcat process lives a long time, you may run out of temp file space - you should have a separate thread or something, and queue up your files to be deleted by that thread, based on some aging criteria.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Displaying XML in Safari
le 8/12/04 22:33, Larry Meadors à [EMAIL PROTECTED] a écrit : If you have a String, you could use c:out, and the escapeXml attribute. [EMAIL PROTECTED] 12/8/2004 1:33:00 PM Hi, The current version of Safari has no support for pure XML à la Internet Explorer. What a pity ! I was wondering if there is a simple way to convert an XML document to HTML that would display properly in Safari. This is merely an utility, and all I'm looking for is something that will make XML look like XML. No special features. Here is what I found: http://www.webreference.com/js/tips/011227.html says: You can convert an XML file to HTML on the fly, instead of building DOMDocument objects and running a conversion utility between them. You just load the XML file in your browser, and out will come the desired HTML. In order to do this conversion on the fly, you need to specify the XSLT file (formatting directives) in the body of the XML file. The top two lines of the XML file should be as follows: ?xml version=1.0? ?xml-stylesheet type=text/xsl href=transform.xsl? where transform.xsl is the name of the formatting utility. It works like a charm. --- Eric VERGNAUD - JLynx Software Cutting-edge technologies and services for software companies web: http://www.jlynx.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat mailing list is full of non tomcat topics
I'm not talking about moderating but about informing the users that this is not the right place. Many important (and related) question do not get enough attention in this sea of messages. /rob - Original Message - From: Caldarale, Charles R [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 10:57 PM Subject: RE: Tomcat mailing list is full of non tomcat topics From: Roberto Cosenza [mailto:[EMAIL PROTECTED] Subject: Tomcat mailing list is full of non tomcat topics Isn't it time to route this traffic to other mailing lists? Are you volunteering to be the policeman? Believe me, moderating any mailing list is a thankless task. Been there, done that, burned the t-shirt, won't ever consider it again. The subjects of nearly all of the off-topic posts already have appropriate mailing lists (not necessarily within Apache), but the posters frequently just don't know how to look for 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: deleteOnExit() doesn't work in Tomcat on temp files
DO NOT EVER use deleteOnExit(). Especially not in something like a web app, which has an indeterminate but generally long lifetime. Consider the API removed from Java. Period. Instead, use the PhantomReference-based code that I contributed to Jakarta Commons. (A) it works. (B) it cleans up during runtime, rather than whenever the JVM should happen to exit cleanly through the right path. (C) It doesn't leak memory like a pig. --- Noel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat mailing list is full of non tomcat topics
From: Roberto Cosenza [EMAIL PROTECTED] I'm not talking about moderating but about informing the users that this is not the right place. Many important (and related) question do not get enough attention in this sea of messages. How do you know that's not happening? I often reply privately to off-topic messages, stating that I'm replying off the list because the subject is not appropriate for this list, and pointing them to the right list or to the answer if I happen to know it. I gather this means you've asked a question that didn't get answered... http://www.catb.org/~esr/faqs/smart-questions.html -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Profilers for Tomcat
Hey guys Just wondering if there are any profilers for Tomcat5 that are free, currently a student working on a final year project and it would be nice to run a profiler over our webapp, but being a student, cost is an issue! Any info very much appreciated! Cheers Rich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Profilers for Tomcat
JProbe is the coolest profiler on the planet, expensive, but you can get a 2-week trial version...if that is enough time. If not, netbeans has one called JFluid as a plug-in that is free. Larry [EMAIL PROTECTED] 12/08/04 4:29 PM Hey guys Just wondering if there are any profilers for Tomcat5 that are free, currently a student working on a final year project and it would be nice to run a profiler over our webapp, but being a student, cost is an issue! Any info very much appreciated! Cheers Rich - 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 mailing list is full of non tomcat topics
On Wed, Dec 08, 2004 at 11:41:28PM +0100, Roberto Cosenza wrote: : Many important (and related) question do not get enough attention in this : sea of messages. Get enough attention? Please explain. As someone who answers to questions now and then (I used to respond more often ;) I'll tell you, I take a question when I can (have the knowledge) and want (I feel like it) to do so. The number of off-topic posts have nothing to do with my ability to answer other questions. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Profilers for Tomcat
On Wed, Dec 08, 2004 at 11:29:09PM +, Cumbers wrote: : Just wondering if there are any profilers for Tomcat5 that are free, : currently a student working on a final year project and it would be nice : to run a profiler over our webapp, but being a student, cost is an : issue! Any info very much appreciated! You could first try a free search engine, or free mailing list archives. ;) This question comes up every so often, and people usually chime in with answers. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat run app
hello , when i run jakarta-tomcat-5.0.19-13 on SuSE linux Enterprise server 9 /etc/init.d/tomcat start is start done but when write url in the browser localhost:8080 is appear blank screen not open index of tomcat home page what can i do - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to start multiple Tomcats
Hi, Sorry this might be a newbie question, I'm an intern and I have no idea what's going on here. We are trying to setup an automated J-Unit test from Ant using Cruise Control where we need multiple copies of tomcat servers running (by supplying different server.xml files). I tried using the org.apache.catalina.startup.Bootstrap class to start the tomcat servers, but they don't seem to accept an argument to take different server.xml files. Then I tried using org.apache.catalina.startup.Catalina class, which does take a -config option to specify a different server.xml file, but it doesn't return until a shutdown is called, so the process just sits there and I cannot execute my next commands. Is there something I'm missing, any suggestions? Thanks in advance. __ Robert Lin Eng. Intern | Blue Jungle | Redwood City, CA [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
load balance standalone tomcat 4
Is it actually possible to use a load balancing appliance (Big IP) with a couple of web servers running standalone Tomcat 4? Actually, I know it's possible...what I mean is, do I have to do anything special with Tomcat, or can I set each Tomcat up as if it was the only server, and then just put the load balancing appliance in front of them? The reason I'm a bit paranoid is because I've caught glimpses of things like Tomcat clustering, which sounds like a lot more work! Thanks, Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: what to do about port for Tomcat 4 on Linux?
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/setup.html http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg126929.html - Original Message - From: Stephen Charles Huey [EMAIL PROTECTED] To: Tomcat User [EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 12:54 PM Subject: what to do about port for Tomcat 4 on Linux? I want to move to Tomcat 5 right now, but can't yet, and for the time being we need to move from Tomcat 4.1.23 on Windows to 4.1.31 on Red Hat, so I'm now facing a question of what to do about the port Tomcat runs on. I've read stuff online that suggests it's best to leave it at 8080 since 80 is a privileged port on *nix. But from that point, I'm not sure what the best practice would be, though I've read different options, like user space port forwarding, kernal space port forwarding, or using a port forwarder (portfwd or redir4a), none of which I'm familiar with. What do you Tomcat users suggest would be a good approach for someone who's only a beginner/intermediate with Linux and using standalone Tomcat? In case it matters, note that we are also moving from our single Windows web server to 2 Linux web servers (each running standalone Tomcat), and we're trying to configure a load balancer hardware appliance in front of the two web servers. Thanks for your suggestions, Stephen - 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: Profilers for Tomcat
Thank you to Larry for suggesting JProbe, there is a community edition that does all i need, Cheers Rich QM wrote: On Wed, Dec 08, 2004 at 11:29:09PM +, Cumbers wrote: : Just wondering if there are any profilers for Tomcat5 that are free, : currently a student working on a final year project and it would be nice : to run a profiler over our webapp, but being a student, cost is an : issue! Any info very much appreciated! You could first try a free search engine, or free mailing list archives. ;) This question comes up every so often, and people usually chime in with answers. -QM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANNOUNCE] JSP 2.1 and Faces 1.2 Early Draft Review
We're pleased to announce the availability of the Early Draft Review of the next versions of the specification for JavaServer Pages and Faces. JavaServer Pages (JSP) 2.1 is developed under JSR-245 and JavaServer Faces (Faces) 1.2 is developed under JSR-252. The two expert groups are working together to improve the alignment between these two powerful web presentation technologies. The foremost such alignment issue is the Expression Language, as stated in both JSRs. JSP 2.1 exports the Expression Language (EL) into its own separate document; technically a sub-document of the JSP specification. The Unified EL spec defines a new top level java package, javax.el. This package is completely independent of the technology using it and allows the using technology to plug itself into the EL resolution process. The bulk of the changes in the JSP spec itself follow from how it uses the Unified EL. As mentioned in the original JSR-252, this spec is not a new feature release. Faces 1.2 contains the work for it to leverage the new Unified EL, as well as a few spec related bug fixes. The alignment of Faces and JSP in these JSRs enables some new capabilities and provides a solid foundation for future growth. For example, in a web application that uses both Faces and JSP, it is possible for pages that only use JSP (without any faces content) to access managed beans. Please see Appendix E of the JSP spec and the preface of the Faces spec to see details of what's changed! To access the specifications: JSP 2.1 EDR (JSR-245) http://jcp.org/aboutJava/communityprocess/edr/jsr245/ Faces 1.2 EDR (JSR-252) http://jcp.org/aboutJava/communityprocess/edr/jsr252/ Sincerely, Ed Burns, Pierre Delisle, Roger Kitain, Mark Roth and the JSR-245 and JSR-252 Expert Groups. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to detect expired session vs. no session? (Solved)
Following my comments below I thought I'd follow up a bit with some brief testing of my own. This is what I think it going on. Someone with more knowledge/experience, please correct me if anything I say here is wrong. I'm assuming that the browser is cooperating with sessions OK, i.e. not configured to block them. When TC receives a request, it checks to see whether the browser has included a jsessionid in the request. You can do this yourself as follows: String sessId = request.getRequestedSessionId(); If there is a jsessionid in the request (i.e. null != sessId), and it matches a valid TC session object (i.e. one that has not timed out or had invalidate() called on it), that session object is associated with the request, and the same jsessionid will be written back to the browser with the response that TC sends back, so that the session is persisted. If the requested jsessionid does not match a valid session, a new session is immediately created by TC and assigned to the request, with a new jsessionid, which TC writes back to the browser with its response. This new session creation seems to take place before the doPost() method is entered. However you can still tell whether an old jsessionid was requested even after the new jsessionid has been assigned, as follows: String id = request.getRequestedSessionId(); if (null==id) { // there was no jsessionid in the request } else if (request.isRequestedSessionIdValid()) { // there was a valid jsessionid in the request } else { // there was an invalid jsessionid in the request } In either case, a session object is always returned by request.getSession() and request.getSession(false). (Actually this was a surprise to me, because it seems that it is not possible to suppress creation of a new session where none exists by using getSession(false)?) Thus, the effect of all this taken together is that browser sends a jsessionid to TC with every request except when the browser is opened afresh and makes its first request to the webapp. It even seems to send timed out jsessionids to the server when the browser has been left open for longer than the session timeout (presumably TC handles expiry issues server-side), or when the browser is left open while TC is restarted. Once TC has sent a jsessionid to the browser, the browser will keep returning it in every request to TC until the browser is closed, or TC changes the jsessionid for some reason. Now, the question of authentication. I don't think that there is way to tell that a user has authenticated using any of the code that Joseph or I have mentioned, because this code deals only with sessions (which exist whether you authenticate or not). The code above merely tells you information about a browser's recent visit to the site. I'm not familiar with TC's own authentication, but in my own case, successful authentication is indicated by adding an object to the session to indicate that a given authenticated user is using it. Thus I use a test like: if (null==(myclasses.User)request.getSession().getAttribute(CURRENT_USER)) { throw new MyAuthException(User not authenticated); } else { // complete their request } Calling the invalidate() method on a session seems to cause the session object to be destroyed immediately. If this is done during processing of a request, I think that TC still sends the old jsessionid to the browser in the response. So the next time that the browser makes a request, it will present the old jsession, which will be invalid, so TC will replace the jsessionid at that point. Hope this is useful to someone else and isn't too far off the mark...? -Original Message- From: Steve Kirk [mailto:[EMAIL PROTECTED] Sent: Wednesday 08 December 2004 16:25 To: 'Tomcat Users List' Subject: RE: How to detect expired session vs. no session? (Solved) I'm a bit puzzled. There is something not quite right here (or maybe I'm not quite understanding correctly). Aren't sessions created as soon as a JSP within a ServletContext is accessed, irrespective of whether the user authenticates or not? Thus invalid sessions vs anonymous sessions is not an either/or choice - a session can be both valid and authenticated, or both valid and anonymous. Is invalid the same as expired? Also there seems to be a slight contradiction in what you say below, because if request.getSession returns null for an invalidated session, how can you then call isRequestedSessionIdValid() on an invalidated session without getting a NullPointerException? I realise that the method is not called on the session object directly, but surely it must access the session object at least indirectly? -Original Message- From: LAM Kwun Wa Joseph [mailto:[EMAIL PROTECTED] Sent: Wednesday 08 December 2004 11:23 To: [EMAIL PROTECTED] Subject: RE: How to detect expired session vs. no session? (Solved) Confirmed that
Re: OutOfMemory! Tomcat meets sudden spikes of used memory sometimes.
On Wed, 8 Dec 2004 09:10:02 -0500, Shapira, Yoav [EMAIL PROTECTED] wrote: When a spike appears for a long time it's not a spike: it's the steady state. Yes, it's the steady state. I just aim at the gc figure, the spike. Maybe this word don't discribes the figure exactly. I am sorry for my English words. Please don't jump to determine it's a memory leak just because more memory is used. I think it is a obvious memory leak because the number of request threads doesn't increase and the app hits just is normal when the inflexion of gc figure appreas. The question only is caused by my app, or tomcat. So you're setting the heap size to a constant 1250MB. How can there be big jumps all over the place? It should been given max memory as possible to avoid JVM increases heap progressively when the server machine only runs tomcat. I think all heavy load app should set two parameter equal. I bet your app is more likely than Tomcat to have a leak ;) Simple JSPs can cause memory spikes, as can simple servlets. DBCP and threads do NOT necessarily cause increased memory usage. It is probably that my app has a leak. I agree. But every JSP has been visited during four days of system in order. Why to appear spike at fifth day? I have 2~3 hundreds JSPs that almost be requested everyday. Does one JSP has memory leak at a special situation? Or one JSP running at a special situation causes tomcat leak? Get a test system, put your app on it, run it with a profiler, and simulate load using a test tool of your choice, e.g. JMeter, ab, wget, grinder, whatever. Then see where memory is retained during your spikes. Thanks for the advice. and thanks for Dale's suggustion. I will try to profile heap through -Xrunhprof and other tools. Li Zhenxing - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to detect expired session vs. no session? (Solved)
String id = request.getRequestedSessionId(); if (null==id) { // there was no jsessionid in the request } else if (request.isRequestedSessionIdValid()) { // there was a valid jsessionid in the request } else { // there was an invalid jsessionid in the request } In either case, a session object is always returned by request.getSession() and request.getSession(false). (Actually this was a surprise to me, because it seems that it is not possible to suppress creation of a new session where none exists by using getSession(false)?) By default: 1. getSession(true)!=null 2. getSession(false)!=null But if a JSP page contains the tag %@ page session=false %, then: 1. getSession(true)!=null 2. getSession(false)==null For my case, sessions will only be created for logged-in users, therefore I have to differentiate between browsers attempting to submit a expired session ID vs browsers not submitting session ID at all. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache 2.0 + Tomcat 5.5.4 scalability
Dear Tomcat users, I'm a new tomcat user evaluating it for FreeBSD5.2. I'm trying to ascertain how well Tomcat will scale from 1- to 2- and 4-proc BSD machines. The only problem is, no matter how I configure workers.properties and server.xml, I get about the same RPS and TTLB for all setups, despite adding workers. I'm using mod_jk (JK-connector-1.2.6) with Apache 2.0. One Tomcat installation uses 8001 as its primary port, the other 9009, and I run startup.sh and both, spawning 2 times 46 = 92 java processes. Is there something fundamental about Tomcat scalability that I'm missing, or is my definition of worker processes off? My server.xml is copied exactly from the distribution. The important parts of the other files are below. Many thanks, Dave In httpd.conf: LoadModule jk_module modules/mod_jk.so JkWorkersFile /home/tomcat/conf/workers.properties JkLogFile /home/tomcat/logs/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat %w %V %T JkMount /jsp/*.jsp router --- In workers.properties: # The advanced router LB worker worker.list=router # Define a 'local_worker' worker using ajp13 worker.worker1.port=8001 worker.worker1.host=127.0.0.1 worker.worker1.type=ajp13 worker.worker1.lbfactor=1 worker.worker1.socket_keepalive=1 worker.worker1.socket_timeout=300 #worker.worker1.local_worker=1 # Define another 'local_worker' worker using ajp13 worker.worker2.port=9009 worker.worker2.host=127.0.0.1 worker.worker2.type=ajp13 worker.worker2.lbfactor=1 worker.worker2.socket_keepalive=1 worker.worker2.socket_timeout=300 #worker.worker2.local_worker=1 # Define the LB worker worker.router.type=lb worker.router.balanced_workers=worker1 #worker.router.local_worker_only=1 -- _ On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: Tomcat mailing list is full of non tomcat topics
On Wed, 2004-12-08 at 17:41, Roberto Cosenza wrote: I'm not talking about moderating but about informing the users that this is not the right place. Many important (and related) question do not get enough attention in this sea of messages. /rob I think this page: http://jakarta.apache.org/site/mail.html does that. Specifically here: Join the lists that are appropriate for your discussion. Please make sure that you are joining the list that is appropriate for the topic or product that you would like to discuss. For example, please do not join the Regexp mailing list and ask questions about Tomcat. Instead, you should join the Tomcat User list and ask your questions there. And here: http://www.catb.org/~esr/faqs/smart-questions.html It is also customary on this list, as it is on others, to begin the subject of your post with [OT] or [OFF TOPIC] for threads, like this one, that don't deal directly with Tomcat issues. This allows people who don't want to wade through off topic discussions to skip right by them. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: Tomcat mailing list is full of non tomcat topics
Personally, it seems like truly off-topic messages get tagged pretty quickly on this list. I think that's a reasonable solution to handle this problem. As for the *root* of the problem, the VAST majority of questions come from novice users who, predictably, don't know the difference between a Tomcat question and Servlet/JSP question. For most people, there *is* no difference. From that standpoint, it's artificial to say that some questions are Tomcat ones and others aren't -- they are all Tomcat-related and, as such, I feel like this is an appropriate place to address them. IMHO, asking a novice user to take it elsewhere would be a fairly cruel thing to do to an already confused and potentially frustrated user. That said, lengthly threads that banter about the merits of various JSRs and specs clearly don't belong here and should either be relocated or (more likely), marked OT. justin At 06:56 PM 12/8/2004, you wrote: On Wed, 2004-12-08 at 17:41, Roberto Cosenza wrote: I'm not talking about moderating but about informing the users that this is not the right place. Many important (and related) question do not get enough attention in this sea of messages. /rob I think this page: http://jakarta.apache.org/site/mail.html does that. Specifically here: Join the lists that are appropriate for your discussion. Please make sure that you are joining the list that is appropriate for the topic or product that you would like to discuss. For example, please do not join the Regexp mailing list and ask questions about Tomcat. Instead, you should join the Tomcat User list and ask your questions there. And here: http://www.catb.org/~esr/faqs/smart-questions.html It is also customary on this list, as it is on others, to begin the subject of your post with [OT] or [OFF TOPIC] for threads, like this one, that don't deal directly with Tomcat issues. This allows people who don't want to wade through off topic discussions to skip right by them. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Justin Ruthenbeck Lead Software Engineer, NextEngine Inc. justinr - AT - nextengine DOT com Confidential. See: http://www.nextengine.com/confidentiality.php __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: Tomcat mailing list is full of non tomcat topics
That said, lengthly threads that banter about the merits of various JSRs and specs clearly don't belong here and should either be relocated or (more likely), marked OT. Where Tomcat is used as the reference implementation for the Servlet and JSP specs, and where the mission of the Tomcat development team is to deliver a 100% spec compliant Servlet/JSP container, I think it would be pretty difficult to make a case for calling such discussions off-topic. Another good reason for quoting the specs, chapter and verse, is that the tomcat documentation, for the most part, doesn't repeat what's in them. Therefore, the best place to look, when you want to find out why Tomcat (or any other spec compliant container for that matter) behaves the way it does, is the specs. I thought your other points were very valid. -Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: Tomcat mailing list is full of non tomcat topics
And then there are the cases that would be deemed OT only to end up as a full blown Tomcat discussion. Some guy asked a question about IIS and at first it's OT. But after a few exchanges the solution is Tomcat. So even if the person is OT sometimes the answer is Tomcat. Doug - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 10:41 PM Subject: Re: [OT] Re: Tomcat mailing list is full of non tomcat topics That said, lengthly threads that banter about the merits of various JSRs and specs clearly don't belong here and should either be relocated or (more likely), marked OT. Where Tomcat is used as the reference implementation for the Servlet and JSP specs, and where the mission of the Tomcat development team is to deliver a 100% spec compliant Servlet/JSP container, I think it would be pretty difficult to make a case for calling such discussions off-topic. Another good reason for quoting the specs, chapter and verse, is that the tomcat documentation, for the most part, doesn't repeat what's in them. Therefore, the best place to look, when you want to find out why Tomcat (or any other spec compliant container for that matter) behaves the way it does, is the specs. I thought your other points were very valid. -Ben - 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: Threads issues in Tomcat 5.0.28
Hey, The connector tag in the server.xml where you mention the port for ajp13 is the place where you should specify the thread configuration. You can find more information here: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/ajp.html Hope it helps. Arnab -Original Message- From: Matt Robinson [mailto:[EMAIL PROTECTED] Sent: Thursday, December 09, 2004 2:29 AM To: Tomcat Users List Subject: RE: Threads issues in Tomcat 5.0.28 Hi Yoav, Thanks for the response I will be sure to include my Thread dump. Meanwhile it sames that AJP13 in Tomcat5 has no parameters such as maxSpareThreads, maxThreads, etc. We are using AJP13 to handle all requests... The documentation (and all searches I have done) do not mention the ability to use these parameters with AJP13, but they can be used with the HTTP protocol. Anybody have any idea whether AJP13 supports these attributes in Tomcat 5.0? Thanks again, Matt --- Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Once you get the thread dump, post it, and we can try to help you figure out what's wrong. The Tomcat thread pools should automatically recover unused threads, subject to your configuration (see the maxSpareThreads and releated Connector configuration attributes). Yoav Shapira http://www.yoavshapira.com -Original Message- From: Arnab Chakravarty [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:50 PM To: Tomcat Users List Subject: RE: Threads issues in Tomcat 5.0.28 Hey, I see your problem similar to mine some time in the past. What you need to is the following: - Lower the number of threads and keep it close to 120-150 threads. - Are you using a database, if yes, check if the DB connection pool is the bottleneck - Yes, you can find what the 200 threads are doing by taking a threaddump. The way to do this is to use the command - kill -QUIT tomcat pid. Hope this helps. Arnab -Original Message- From: Matt Robinson [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 8:02 AM To: [EMAIL PROTECTED] Subject: Threads issues in Tomcat 5.0.28 Hi, We have 5 instances of Tomcat 5.0.28 running on their own high performance servers (dual XEON / 2GB RAM, etc) receiving AJP13 connector requests via our main web server which has IIS 5, IIS redirector, and Tomcat4. This works great even under high loads except for one thing: after several hours of usage (could be 3 hours or up 24 hours), the number of Tomcat threads on the 5.0.28 systems will suddenly increase at a rapid rate until Tomcat no longer responds to requests. It will hit the max # threads (which defaults to 200) and essentially freeze until it is restarted. This is strange because this behavior does not seem to correspond to increased usage of the particular server it occurs on. We are not sure what is triggering this and what those Tomcat threads are waiting on [they remain busy, waiting and unable to be reused by Tomcat]. My questions are: 1. Has anyone else experienced this kind of Thread explosion problem? 2. Is there a way to find out exactly what each Tomcat Thread is doing/waiting for? 3. Is there a way to periodically clear Tomcat's threadpool -- i.e. get rid of waiting/busy/unusued threads. We are working on ways to automatically restart Tomcat once a certain # of threads is reached, but this is not an acceptable solution, only a temporary workaround of course. Many thanks in advance __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo - 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] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? All your favorites on one personal page - Try My Yahoo! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Profilers for Tomcat
WOW! Awesome! I did not know about that version! Thanks for mentioning it! Larry (downloading now ;-) [EMAIL PROTECTED] 12/08/04 5:24 PM Thank you to Larry for suggesting JProbe, there is a community edition that does all i need, Cheers Rich QM wrote: On Wed, Dec 08, 2004 at 11:29:09PM +, Cumbers wrote: : Just wondering if there are any profilers for Tomcat5 that are free, : currently a student working on a final year project and it would be nice : to run a profiler over our webapp, but being a student, cost is an : issue! Any info very much appreciated! You could first try a free search engine, or free mailing list archives. ;) This question comes up every so often, and people usually chime in with answers. -QM - 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: Threads issues in Tomcat 5.0.28
Hi, Here is an example you can follow: Connector className=org.apache.coyote.tomcat5.CoyoteConnector port=9000 protocol=AJP/1.3 address=111.222.333.444 numThreads=20 maxThreads=100 minSpareThreads=25 maxSpareThreads=50 debug=0 connectionTimeout=12 / Hope this helps. Arnab -Original Message- From: Arnab Chakravarty [mailto:[EMAIL PROTECTED] Sent: Thursday, December 09, 2004 9:44 AM To: Tomcat Users List Subject: RE: Threads issues in Tomcat 5.0.28 Hey, The connector tag in the server.xml where you mention the port for ajp13 is the place where you should specify the thread configuration. You can find more information here: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/ajp.html Hope it helps. Arnab -Original Message- From: Matt Robinson [mailto:[EMAIL PROTECTED] Sent: Thursday, December 09, 2004 2:29 AM To: Tomcat Users List Subject: RE: Threads issues in Tomcat 5.0.28 Hi Yoav, Thanks for the response I will be sure to include my Thread dump. Meanwhile it sames that AJP13 in Tomcat5 has no parameters such as maxSpareThreads, maxThreads, etc. We are using AJP13 to handle all requests... The documentation (and all searches I have done) do not mention the ability to use these parameters with AJP13, but they can be used with the HTTP protocol. Anybody have any idea whether AJP13 supports these attributes in Tomcat 5.0? Thanks again, Matt --- Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Once you get the thread dump, post it, and we can try to help you figure out what's wrong. The Tomcat thread pools should automatically recover unused threads, subject to your configuration (see the maxSpareThreads and releated Connector configuration attributes). Yoav Shapira http://www.yoavshapira.com -Original Message- From: Arnab Chakravarty [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:50 PM To: Tomcat Users List Subject: RE: Threads issues in Tomcat 5.0.28 Hey, I see your problem similar to mine some time in the past. What you need to is the following: - Lower the number of threads and keep it close to 120-150 threads. - Are you using a database, if yes, check if the DB connection pool is the bottleneck - Yes, you can find what the 200 threads are doing by taking a threaddump. The way to do this is to use the command - kill -QUIT tomcat pid. Hope this helps. Arnab -Original Message- From: Matt Robinson [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 8:02 AM To: [EMAIL PROTECTED] Subject: Threads issues in Tomcat 5.0.28 Hi, We have 5 instances of Tomcat 5.0.28 running on their own high performance servers (dual XEON / 2GB RAM, etc) receiving AJP13 connector requests via our main web server which has IIS 5, IIS redirector, and Tomcat4. This works great even under high loads except for one thing: after several hours of usage (could be 3 hours or up 24 hours), the number of Tomcat threads on the 5.0.28 systems will suddenly increase at a rapid rate until Tomcat no longer responds to requests. It will hit the max # threads (which defaults to 200) and essentially freeze until it is restarted. This is strange because this behavior does not seem to correspond to increased usage of the particular server it occurs on. We are not sure what is triggering this and what those Tomcat threads are waiting on [they remain busy, waiting and unable to be reused by Tomcat]. My questions are: 1. Has anyone else experienced this kind of Thread explosion problem? 2. Is there a way to find out exactly what each Tomcat Thread is doing/waiting for? 3. Is there a way to periodically clear Tomcat's threadpool -- i.e. get rid of waiting/busy/unusued threads. We are working on ways to automatically restart Tomcat once a certain # of threads is reached, but this is not an acceptable solution, only a temporary workaround of course. Many thanks in advance __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo - 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] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended
Re: Multiple domains on single machine
Hi, I have to use APACHE. I have seen one example given in the APACHE documentation: -- NameVirtualHost * VirtualHost * ServerName www.domain.tld DocumentRoot /www/domain /VirtualHost VirtualHost * ServerName www.otherdomain.tld DocumentRoot /www/otherdomain /VirtualHost -- So may be this isnt wrong. When I add an index.html, it is displayed by apache. But the JSP and servlet requests are not being passed to TOMCAT. In my tomcat server.xml I have added the lines: Host Name=support Context path= docBase=E:/support1.cp.net debug=0 reloadable=true / /Host Host Name=admin Context path= docBase=E:/admin.support.cp.net debug=0 reloadable=true / /Host The support one is being executed properly, but the admin one is not being recognised. any solutions ? Mayuresh. - Original Message - From: Benjamin Armintor [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Cc: Mayuresh Kshirsagar [EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 9:40 PM Subject: RE: Multiple domains on single machine You may not even need to use the Apache HTTPD web server, in which case you should just have Tomcat listen on port 80 itself, and refer to the documentation for Hosts on the Tomcat site. If you really need to use the Apache web server, you'd probably get better advice from the HTTPD list for your Apache configuration. So this is a bit off topic, but it's a problem that you have the one named VirtualHost (the default one, *:80), and two configurations for it. You need to have two named VirtualHosts (one for each of your virtual hosts, eh?). Read the Apache HTTPD documentation at http://httpd.apache.org/docs-project/. There's very good documentation on most of the directives. When you get that sorted, you'll need to bring Tomcat up behind Apache. This has been worked out far better in numerous how-tos and messages to this list than I could here. You'll find some helpful links at http://wiki.apache.org/jakarta-tomcat/UsefulLinks. Benjamin J. Armintor Operations Systems Specialist ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: Mayuresh Kshirsagar [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 8:07 AM To: Tomcat Users List Subject: Re: Multiple domains on single machine Any pointers on this one please...its urgent - Original Message - From: Mayuresh Kshirsagar To: [EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 3:27 PM Subject: Multiple domains on single machine Hi I have setup a test machine so that it should host two sites 1. http://admin 2. http://support But only one (http://admin) is accessible and the other one is not. Can you give any pointers. I set up virtual hosts as (httpd.conf): NameVirtualHost *:80 VirtualHost *:80 ServerName admin ServerAdmin [EMAIL PROTECTED] DocumentRoot E:/admin.support.cp.net/html/ ErrorDocument 404 E:/admin.support.cp.net/notfound.html ErrorLog logs/admin.support.cp.net-error_log LogFormat %h %l %u %t \%r\ %s %b \%{Referer}i\ \%{User-Agent}i\ combined LogFormat %h %l %u %t \%r\ %s %b common LogFormat %{Referer}i - %U referer LogFormat %{User-agent}i agent CustomLog logs/admin.support.cp.net-access_log combined Alias /icons/ E:/admin.support.cp.net/icons/ ScriptAlias /cgi-bin/ E:/admin.support.cp.net/cgi-bin/ Directory E:/admin.support.cp.net/html Options FollowSymLinks Includes DirectoryIndex index.html index.jsp AllowOverride AuthConfig /Directory AddType text/x-server-parsed-html .html /VirtualHost VirtualHost *:80 DocumentRoot E:/support1.cp.net ServerName support ServerAdmin [EMAIL PROTECTED] ErrorLog logs/support-error_log LogFormat %h %l %u %t \%r\ %s %b \%{Referer}i\ \%{User-Agent}i\ combined LogFormat %h %l %u %t \%r\ %s %b common LogFormat %{Referer}i - %U referer LogFormat %{User-agent}i agent CustomLog logs/support-access_log combined Alias /pdf/ E:/support1.cp.net/content/pdf/ Alias /images/ E:/support1.cp.net/images/ ScriptAlias /cgi-bin/ E:/support1.cp.net/cgi-bin/ ErrorDocument 404 E:/support1.cp.net/notfound.jsp # Allow Server Side includes (SSI) Directory E:/support1.cp.net Options FollowSymLinks Includes AllowOverride AuthConfig allow from all /Directory AddType text/x-server-parsed-html .html /VirtualHost Similarly I added following to server.xml: Host Name=support Context path= docBase=E:/support1.cp.net debug=0 reloadable=true / /Host Host Name=admin Context path= docBase=E:/admin.support.cp.net debug=0 reloadable=true / /Host I also added lines to the hosts file on that machine: IP-Address admin IP-Address support.
Re: Multiple domains on single machine
My problem is that I have two domains mapped to the same IP ? Please could you help me in this. - Original Message - From: Mayuresh Kshirsagar [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, December 09, 2004 11:25 AM Subject: Re: Multiple domains on single machine Hi, I have to use APACHE. I have seen one example given in the APACHE documentation: -- NameVirtualHost * VirtualHost * ServerName www.domain.tld DocumentRoot /www/domain /VirtualHost VirtualHost * ServerName www.otherdomain.tld DocumentRoot /www/otherdomain /VirtualHost -- So may be this isnt wrong. When I add an index.html, it is displayed by apache. But the JSP and servlet requests are not being passed to TOMCAT. In my tomcat server.xml I have added the lines: Host Name=support Context path= docBase=E:/support1.cp.net debug=0 reloadable=true / /Host Host Name=admin Context path= docBase=E:/admin.support.cp.net debug=0 reloadable=true / /Host The support one is being executed properly, but the admin one is not being recognised. any solutions ? Mayuresh. - Original Message - From: Benjamin Armintor [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Cc: Mayuresh Kshirsagar [EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 9:40 PM Subject: RE: Multiple domains on single machine You may not even need to use the Apache HTTPD web server, in which case you should just have Tomcat listen on port 80 itself, and refer to the documentation for Hosts on the Tomcat site. If you really need to use the Apache web server, you'd probably get better advice from the HTTPD list for your Apache configuration. So this is a bit off topic, but it's a problem that you have the one named VirtualHost (the default one, *:80), and two configurations for it. You need to have two named VirtualHosts (one for each of your virtual hosts, eh?). Read the Apache HTTPD documentation at http://httpd.apache.org/docs-project/. There's very good documentation on most of the directives. When you get that sorted, you'll need to bring Tomcat up behind Apache. This has been worked out far better in numerous how-tos and messages to this list than I could here. You'll find some helpful links at http://wiki.apache.org/jakarta-tomcat/UsefulLinks. Benjamin J. Armintor Operations Systems Specialist ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: Mayuresh Kshirsagar [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 8:07 AM To: Tomcat Users List Subject: Re: Multiple domains on single machine Any pointers on this one please...its urgent - Original Message - From: Mayuresh Kshirsagar To: [EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 3:27 PM Subject: Multiple domains on single machine Hi I have setup a test machine so that it should host two sites 1. http://admin 2. http://support But only one (http://admin) is accessible and the other one is not. Can you give any pointers. I set up virtual hosts as (httpd.conf): NameVirtualHost *:80 VirtualHost *:80 ServerName admin ServerAdmin [EMAIL PROTECTED] DocumentRoot E:/admin.support.cp.net/html/ ErrorDocument 404 E:/admin.support.cp.net/notfound.html ErrorLog logs/admin.support.cp.net-error_log LogFormat %h %l %u %t \%r\ %s %b \%{Referer}i\ \%{User-Agent}i\ combined LogFormat %h %l %u %t \%r\ %s %b common LogFormat %{Referer}i - %U referer LogFormat %{User-agent}i agent CustomLog logs/admin.support.cp.net-access_log combined Alias /icons/ E:/admin.support.cp.net/icons/ ScriptAlias /cgi-bin/ E:/admin.support.cp.net/cgi-bin/ Directory E:/admin.support.cp.net/html Options FollowSymLinks Includes DirectoryIndex index.html index.jsp AllowOverride AuthConfig /Directory AddType text/x-server-parsed-html .html /VirtualHost VirtualHost *:80 DocumentRoot E:/support1.cp.net ServerName support ServerAdmin [EMAIL PROTECTED] ErrorLog logs/support-error_log LogFormat %h %l %u %t \%r\ %s %b \%{Referer}i\ \%{User-Agent}i\ combined LogFormat %h %l %u %t \%r\ %s %b common LogFormat %{Referer}i - %U referer LogFormat %{User-agent}i agent CustomLog logs/support-access_log combined Alias /pdf/ E:/support1.cp.net/content/pdf/ Alias /images/ E:/support1.cp.net/images/ ScriptAlias /cgi-bin/ E:/support1.cp.net/cgi-bin/ ErrorDocument 404 E:/support1.cp.net/notfound.jsp # Allow Server Side includes (SSI) Directory E:/support1.cp.net Options FollowSymLinks Includes AllowOverride AuthConfig allow from all