tomcat thru netbeans 3.6
I've got this problem and I'm not sure how to solve it. I'm hoping someone can steer me the right way. My problem is that I have my static files for the webapp located right off of the webapps directory like this. $tomcat/webapps/myapps $tomcat/webapps/myapps/images Now on my production server I use jk and apache and I was able to JkMount / myapps/* ajp13 and this allowed by webapp to see the images directory and the other static include files it works correctly. BUT on my development machine (I'm switching from a win98 to a linux) Anyway I'm using Netbeans 3.6 and the builtin tomcat server that it comes with (5.0.19) I setup my complier for external and netbeans places all the classes in the correct way, I can compile the entire app. But when I run tomcat I can run my app but the references to the images, my include scripts.js, don't load. Can someone help me with where in either tomcat's server.xml, web.xml or with the apps web.xml that I place the correct config info so that tomcat allows the app access to these directories. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP Redirections with Tomcat
On 5/20/2004 1:51 AM, Guillermo Zarabozo wrote: Hi Everyone, I have a Tomcat Appl. Server running with Atlassian JIRA application. Recently We had an upgrade to a newer version, so the clients now need to change this URL http://hostname:8080/altlassian-jira-2.0.2 for ... http://hostname:8080/altlassian-jira-2.5.3 Is there any posibility to create some kind of http redirection from the old url to the new one (with tomcat of course) ? Any ideas ... even the crazy ones are welcome !!! Thanks in advance. Regards Guillermo. _ MSN Amor: busca tu ½ naranja http://latam.msn.com/amor/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] if i understand the question right i have a few suggestions: -if ur using unixes u can just symlink via ln -s /newdir /oldir. -or, on the old dir you can change the index.jsp to redirect to the new dir via meta refresh or forward or include. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP Redirections with Tomcat
Use the simple code below as your redir html page. HTML HEAD SCRIPT language=javascript function topStart() { top.location=http://hostname:8080/altlassian-jira-2.5.3; } /SCRIPT /HEAD BODY onload=topStart()/BODY /HTML ~ ~ ~ Kevin Li Global Information Access Apple Computer, Inc 1 Infinite Loop, MS:60-WW Cupertino, CA 95014-2084 On May 20, 2004, at 11:08 PM, Eric Noel wrote: On 5/20/2004 1:51 AM, Guillermo Zarabozo wrote: Hi Everyone, I have a Tomcat Appl. Server running with Atlassian JIRA application. Recently We had an upgrade to a newer version, so the clients now need to change this URL http://hostname:8080/altlassian-jira-2.0.2 for ... http://hostname:8080/altlassian-jira-2.5.3 Is there any posibility to create some kind of http redirection from the old url to the new one (with tomcat of course) ? Any ideas ... even the crazy ones are welcome !!! Thanks in advance. Regards Guillermo. _ MSN Amor: busca tu ½ naranja http://latam.msn.com/amor/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] if i understand the question right i have a few suggestions: -if ur using unixes u can just symlink via ln -s /newdir /oldir. -or, on the old dir you can change the index.jsp to redirect to the new dir via meta refresh or forward or include. - 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: RequestDispatcher resource not available
I do a combination now. I enabled the Invoker and put a mapping in the web.xml for it. I use the RequestDispatcher to forward to the other servlets via the invoker. I enabled the reloading feature of the context. And everything works as I need it. mfg Michael Nitschke -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 5:17 PM To: Tomcat Users List Subject: Re: RequestDispatcher resource not available : The point is I won't be able to start the server frequently to add new : servlets, because our company needs the service 24/7. Understood; please report your final solution, if possible. Whenever an app steps out of the standard, there's an opportunity for innovation. =) One other idea: Tomcat clustering? e.g. reload Container1 while Container2 continues to serve requests, then reload Container2 when Container1 comes back up? (Of course, this works only for changes to the servlet mappings; changes to lower-level code libraries would require actual downtime.) I had a similar setup w/ Weblogic a couple of years ago, also in a 24x7 shop. Being able to take down one member of the cluster in midday was quite a treat. -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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat thru netbeans 3.6
Tim Ashman wrote: I've got this problem and I'm not sure how to solve it. I'm hoping someone can steer me the right way. My problem is that I have my static files for the webapp located right off of the webapps directory like this. $tomcat/webapps/myapps $tomcat/webapps/myapps/images Now on my production server I use jk and apache and I was able to JkMount / myapps/* ajp13 and this allowed by webapp to see the images directory and the other static include files it works correctly. BUT on my development machine (I'm switching from a win98 to a linux) Anyway I'm using Netbeans 3.6 and the builtin tomcat server that it comes with (5.0.19) I setup my complier for external and netbeans places all the classes in the correct way, I can compile the entire app. But when I run tomcat I can run my app but the references to the images, my include scripts.js, don't load. Can someone help me with where in either tomcat's server.xml, web.xml or with the apps web.xml that I place the correct config info so that tomcat allows the app access to these directories. It would be much easier to use, say, Struts HTML taglib, to render application context path for you. strutshtml:img page=/images/content-logon.png / will work for any context path without any additional configuration you've mentioned above needed. -- Illya Kysil, software developer Delphi/C/C++/C#/Java/Forth/Assembler - No trees were harmed in the generation of this e-mail. A significant number of electrons were, however, severely inconvenienced. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pass info between Tomcat Valve and Filter
An invocation of a Tomcat Valve gives you a Request object. This is a facade to a ServletRequest, which you can access via the getRequest() method. You could set your info object as an attribute on the ServletRequest. This should then be visible to your filter. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/index.html Just curious, why the custom Valve? Jon Rui Zhang wrote: Hi all, I'm trying to pass some info (say, as an Object) between a valve and a filter. Is anyone aware of a effective way to do this within the context of Tomcat? Many thanks. Best, Rui - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: webdav servlet problems with Tomcat 5.0.24 and IE
Mark, First of all it is worth pointing out that this works quite happily for me on WinXP using TC5.0.24 and IE6. Ah, the wonderful world of M$. There are difference between how tomcat 4 and 5 handle redirection from www.yourhost.com/webdav to www.yourhost.com/webdav/ Either should be valid but the webdav implementation in IE doesn't handle http redirection responses correctly. This is why TC4 works with / but TC5 sometimes has trouble with IE clients. Needless to say when I tried to report this to Microsoft they refused to acknowledge this as a bug and said I needed to pay to get any further support. Do you know how the TC4 handles the redirection issue? We have a webapp to which we are adding webdav support. Our webdav implementation has exactly the same problem as the TC5 implementation when using IE clients. If we set the url-pattern to /* we break our webapp. A few other thoughts: - does it work if you run TC5 on a windows box? Have not tried this. I'll install on one of our boxes and test. - are you using the webdav servlet as it comes with TC5? We are. Roy Mark -Original Message- From: Roy Gardner [mailto:[EMAIL PROTECTED] Sent: Thursday, May 20, 2004 10:53 AM To: [EMAIL PROTECTED] Subject: webdav servlet problems with Tomcat 5.0.24 and IE I posted a bug (29094) on 19/04/04. The webdav webapp shipped with Tomcat 5.0.24 does not serve web folders to IE5 and IE6. The server platform is Solaris 8 on Sun. The same behaviour is exhibited when running Tomcat 5.0.24 on Mac OS X 10.3.3. This is the case despite the following, recommended, web.xml setting which is supposed to deal with bugs in IE: servlet-mapping servlet-namewebdav/servlet-name url-pattern/*/url-pattern /servlet-mapping The problem does not occur in the webdav webapp supplied with Tomcat 4.1.12 even though its web.xml contains: servlet-mapping servlet-namewebdav/servlet-name url-pattern//url-pattern /servlet-mapping ie. the pattern that would evoke the IE bug. Any insights would be welcome. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Dr. Roy Gardner Director Psycle Interactive Ltd. http://www.psycle.com
Tomcat security and virtual hosts
Hi all, I am running Tomcat 5.0.24 on Red Hat Linux Enterprise 3 with Apache web server 2 and mod_jk 1.2. I have a few Apache/Tomcat virtual hosts: each host has its own document root and webapps. I would like to make sure that each host is not allowed to access files outside its document root and webapps. How do I configure Tomcat to secure that? Any info or link to documentation/examples would be appreciated ... Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory leak with Tomcat 5.0.19
On 20-05-2004 11:58, wsedio wrote: On 19-05-2004 23:15, Michiel Toneman wrote: We were having severe memory problems too with 5.0.19. Does Tomcat 5.0.24 fix this problem? We added this to the jk2.properties: request.registerRequests=false and the memory usage was normal again. Somewhat non-obvious, I agree. It also gets rid of Error registering request messages in catalina.out. We are using mod_jk (1.2) with Apache 1.3.x on Sun Solaris and Linux. Do you have to add the setting even if you are using jk 1.2 (not jk 2)? Below is the memory profile of one of our servers before and after the change (old generation memory refers to the memory buckets in the garbage collector. For more information, see jvmstat. At 100% you will start getting OutOfMemory errors): How do you get the memory profile? Is it a Tomcat command? Thanks. Any help with my questions? Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat book
Hi all, what is the best Tomcat book around? It would be great if it also covers Tomcat 5 ... Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running Tomcat from jsvc daemon under Linux as user tomcat
I have set everything in the entire $CATALINA_HOME directory tree to be owned by user tomcat, group tomcat. I even tried setting them to user.root and put tomcat in the root group. Still, Tomcat cannot write to the work dir. When I try to run jsvc as user root, I get a java.lang.reflect.InvocationTargetException. But when I run as root using startup.sh, everything's fine. And once I've compiled the jsps in the work directory and the class files exist, then I can run them under the daemon. So there's definitely something fishy with the jsvc daemon that is preventing me from compiling. I carefully set up the init.d tomcat script so that it mimics startup.sh as much as possible. Still no dice. I've turned on debugging and I see that when the daemon kicks off, it lists its parsed command line arguments (I've posted the output below). There are options such as run as service, install service, etc. Should I be trying to run as service? ..Bob. catalina_home is /usr/local/tomcat5 setting classpath classpath is @/usr/lib/java/lib/tools.jar:/usr/local/tomcat5/bin/commons-daemon.jar:/usr/local/tomcat5/bin/commons-logging-api.jar:/usr/local/tomcat5/bin/bootstrap.jar@ jsvc debug: +-- DUMPING PARSED COMMAND LINE ARGUMENTS -- jsvc debug: | Detach: True jsvc debug: | Show Version:No jsvc debug: | Show Help: No jsvc debug: | Check Only: Disabled jsvc debug: | Run as service: No jsvc debug: | Install service: No jsvc debug: | Remove service: No jsvc debug: | JVM Name:server jsvc debug: | Java Home: /usr/lib/java jsvc debug: | PID File:/usr/local/tomcat5/logs/catalina.pid jsvc debug: | User Name: tomcat jsvc debug: | Extra Options: 8 jsvc debug: | -verbose jsvc debug: | -Dcatalina.home=/usr/local/tomcat5 jsvc debug: | -Djava.io.tmpdir=/usr/local/tomcat5/temp jsvc debug: | -Djava.endorsed.dirs=/usr/local/tomcat5/common/endorsed jsvc debug: | -Dcatalina.base=/usr/local/tomcat5 jsvc debug: | -Djava.class.path=/usr/lib/java/lib/tools.jar:/usr/local/tomcat5/bin/commons-daemon.jar:/usr/local/tomcat5/bin/commons-logging-api.jar:/usr/local/tomcat5/bin/bootstrap.jar jsvc debug: | -Xms256m jsvc debug: | -Xmx384m jsvc debug: | Class Invoked: org.apache.catalina.startup.Bootstrap jsvc debug: | Class Arguments: 0 jsvc debug: +--- jsvc debug: user changed to 'tomcat' jsvc debug: User 'tomcat' validated jsvc debug: Attempting to locate Java Home in /usr/lib/java jsvc debug: Attempting to locate VM configuration file /usr/lib/java/jre/lib/jvm.cfg jsvc debug: Found VM configuration file at /usr/lib/java/jre/lib/jvm.cfg jsvc debug: Found VM client definition in configuration jsvc debug: Checking library /usr/lib/java/jre/lib/i386/client/libjvm.so jsvc debug: Found VM server definition in configuration jsvc debug: Checking library /usr/lib/java/jre/lib/i386/server/libjvm.so jsvc debug: Found VM hotspot definition in configuration jsvc debug: Checking library /usr/lib/java/jre/lib/i386/hotspot/libjvm.so jsvc debug: Checking library /usr/lib/java/lib/i386/hotspot/libjvm.so jsvc debug: Cannot locate library for VM hotspot (skipping) jsvc debug: Found VM classic definition in configuration jsvc debug: Checking library /usr/lib/java/jre/lib/i386/classic/libjvm.so jsvc debug: Checking library /usr/lib/java/lib/i386/classic/libjvm.so jsvc debug: Cannot locate library for VM classic (skipping) jsvc debug: Found VM native definition in configuration jsvc debug: Checking library /usr/lib/java/jre/lib/i386/native/libjvm.so jsvc debug: Checking library /usr/lib/java/lib/i386/native/libjvm.so jsvc debug: Cannot locate library for VM native (skipping) jsvc debug: Found VM green definition in configuration jsvc debug: Checking library /usr/lib/java/jre/lib/i386/green/libjvm.so jsvc debug: Checking library /usr/lib/java/lib/i386/green/libjvm.so jsvc debug: Cannot locate library for VM green (skipping) jsvc debug: Java Home located in /usr/lib/java jsvc debug: +-- DUMPING JAVA HOME STRUCTURE jsvc debug: | Java Home: /usr/lib/java jsvc debug: | Java VM Config.: /usr/lib/java/jre/lib/jvm.cfg jsvc debug: | Found JVMs: 2 jsvc debug: | JVM Name:client jsvc debug: | /usr/lib/java/jre/lib/i386/client/libjvm.so jsvc debug: | JVM Name:server jsvc debug: | /usr/lib/java/jre/lib/i386/server/libjvm.so jsvc debug: +--- jsvc debug: Using specific JVM in /usr/lib/java/jre/lib/i386/server/libjvm.so jsvc debug: Invoking w/ LD_LIBRARY_PATH=/usr/lib/java/jre/lib/i386/server:/usr/lib/java/jre/lib/i386 jsvc.exec debug: +-- DUMPING PARSED COMMAND LINE ARGUMENTS -- jsvc.exec debug: | Detach: True jsvc.exec debug: | Show Version:No jsvc.exec debug: | Show Help: No jsvc.exec debug: | Check Only: Disabled jsvc.exec debug: | Run as service: No jsvc.exec debug:
Problems with session handling, carts example (Tomcat 5) !!
Hi, I've real troubles with tomcat sessions. My tomcat server works well, version 4 and 5 (5.0.25), installed with windows installer. However, something is wrong with session information. I tried to run my own application and the carts example with Mozilla 1.6, MS IE 6.0 and Opera 7.23. The browsers accept cookies and my web.xml and server.xml are not changed. So in the carts example I cannot add items, only 1 is displayed when I add another item. I have Java SDK 1_4_2_04 installed. Thanks very, very much for help Marc Arnold
RE: tomcat book
I find O'Reilly's Tomcat Complete Reference very useful. Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.com This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. :: -Original Message- :: From: wsedio [mailto:[EMAIL PROTECTED] :: Sent: Friday, May 21, 2004 11:38 AM :: To: Tomcat Users List :: Subject: tomcat book :: :: Hi all, :: what is the best Tomcat book around? :: :: It would be great if it also covers Tomcat 5 ... :: :: Thanks. :: :: - :: To unsubscribe, e-mail: [EMAIL PROTECTED] :: For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: equivalent of DefaultContext element for Host
On 20-05-2004 16:03, Shapira, Yoav wrote: Be careful when relying on the DefaultContext, it can lead to laziness. Can you be a bit more specific? :-) I am dealing with a bunch of virtual hosts ... Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory leak with Tomcat 5.0.19
wsedio wrote: On 20-05-2004 11:58, wsedio wrote: On 19-05-2004 23:15, Michiel Toneman wrote: We were having severe memory problems too with 5.0.19. Does Tomcat 5.0.24 fix this problem? I have no idea, haven't tried it out yet. No plans as yet to test/roll-out 5.0.24, so it will be a while before I know. We added this to the jk2.properties: request.registerRequests=false and the memory usage was normal again. Somewhat non-obvious, I agree. It also gets rid of Error registering request messages in catalina.out. We are using mod_jk (1.2) with Apache 1.3.x on Sun Solaris and Linux. Do you have to add the setting even if you are using jk 1.2 (not jk 2)? Apparently so. Somewhat weird that it is in jk2.properties. Any Guru care to explain? Below is the memory profile of one of our servers before and after the change (old generation memory refers to the memory buckets in the garbage collector. For more information, see jvmstat. At 100% you will start getting OutOfMemory errors): How do you get the memory profile? Is it a Tomcat command? No, it is just a bit of messing around with jvmstat in a script. First we get the Tomcat PID with jvmps. Then we use jvmsnap $TOMCAT_PID to get (grep) hotspot.gc.generation.1.space.0.capacity and hotspot.gc.generation.1.space.0.used The script then calculates the percentage in use and total amount in Mb. The old generation space usage is (as far as I know) a good place to look if you are experiencing memory problems (assuming you set -Xmx and -Xms memory the same, otherwise it isn't all that meaningful!!!). In my experience, if it fills up above 70% the garbage collector (+ you) is in trouble. Cheers, Michiel -- Michiel Toneman Software Engineer Bibit Global Payment Services Regulierenring 10 3981 LB Bunnik [EMAIL PROTECTED] Tel. +31-30-6595168 Fax +31-30-6564464 http://www.bibit.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: The tomcat not accept more connections
Ok, I don't know about timings - that is an entirely different question. Tomcat is not accepting connections because you've run out of processors to create them (defined in server.xml - this example is for my SQL connection): !-- Define an AJP 1.3 Connector on port 8009 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 minProcessors=3 maxProcessors=15 acceptCount=10 debug=0/ If you are running out of processors it is because you are creating connections and then not closing them after use, it is important that you do this. If you are connecting to a database then when you creat a new connection eg. Connection conn = dbClass.getConnection() you must close that connection when you have finished interrogating the DB. IN this case you would use conn.close(); HTH. Adam On Thu, 2004-05-20 at 20:25, Software wrote: OK but is that the reasos that the tomcat not accept more connections? Shapira, Yoav wrote: Hi, The parameter uses milliseconds. The default and recommended value for 99% of applications is 6ms. I suggested upgrading your tomcat version: 4.1.30 and 5.0.24 are good releases. Yoav Shapira Millennium Research Informatics -Original Message- From: Software [mailto:[EMAIL PROTECTED] Sent: Thursday, May 20, 2004 2:04 PM To: Tomcat Users List Subject: Re: The tomcat not accept more connections The parameter connectionTimeout in the server.xml file which unit of time uses ? what is te recomendable for tomcat 4.0.3 Software wrote: Hi i have tomcat 4.03 with Apache 1.3.24 with mod_jk module over RedHat 8.0. The problem when i starting the tomcat it is stable for a some time, then the tomcat not accept any more connection and i must to restart the service to our application start working without problem Theses the errors messages 2004-05-20 09:04:29 HttpConnector[8091] No processor available, rejecting this connection 2004-05-20 09:02:24 Ajp13Connector[11009] No processor available, rejecting thiss connection When i start the tomcat theses the messages 2004-05-20 09:05:53 HttpProcessor[8091][4] Starting background thread 2004-05-20 09:10:34 Ajp13Processor[11009][7] Starting background thread What is the problem? Thanks a lot for you help Fabian - 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 n 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]
unique session_id per browser window
Hi all I have a webapp in a browser window which has a specific session_id. If I open another window and invoke the same servlet the session_id remains the same. Can anyone tell me how obtain unique session_id for different browser windows? Thanks a lot Bost - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with session handling, carts example (Tomcat 5) !!
hi again, I've still this problem, however made an interesting discovery: the servlet example of tomcat about sessions works. There data can be stored within the session. Can anybody tell me how to fix this with jsp? Thanks a lot Marc -Ursprüngliche Nachricht- Von: Marc Arnold [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 21. Mai 2004 11:49 An: [EMAIL PROTECTED] Betreff: Problems with session handling, carts example (Tomcat 5) !! Hi, I've real troubles with tomcat sessions. My tomcat server works well, version 4 and 5 (5.0.25), installed with windows installer. However, something is wrong with session information. I tried to run my own application and the carts example with Mozilla 1.6, MS IE 6.0 and Opera 7.23. The browsers accept cookies and my web.xml and server.xml are not changed. So in the carts example I cannot add items, only 1 is displayed when I add another item. I have Java SDK 1_4_2_04 installed. Thanks very, very much for help Marc Arnold - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat book
I don't own it, but you can look on http://amazon.com for Professional Apache Tomcat 5 Tom Kochanowicz -Original Message- From: wsedio [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 4:38 AM To: Tomcat Users List Subject: tomcat book Hi all, what is the best Tomcat book around? It would be great if it also covers Tomcat 5 ... Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.682 / Virus Database: 444 - Release Date: 5/11/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.682 / Virus Database: 444 - Release Date: 5/11/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unique session_id per browser window
If you open a new instance of the browser by using the start menu. The new instance will have it's own cookie space. If you open a new instance by typing ctl+n from a running instance or by using the filenew menu options the new instance will share the same cookie space as the one you opened it with. Not much you can do about this from the server side. On Friday 21 May 2004 06:37 am, you wrote: Hi all I have a webapp in a browser window which has a specific session_id. If I open another window and invoke the same servlet the session_id remains the same. Can anyone tell me how obtain unique session_id for different browser windows? Thanks a lot Bost - 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: session data in Tomcat 5
Mike, If you have a small, reproducable test case, send it up. I'd like to take a look at it. On Friday 21 May 2004 01:10 am, you wrote: Jacob Kjome wrote: I didn't see the earlier posts, but are you using Tomcat-5.0.24? There's a bug related to session cookies which requires a hotfix. However, I'd just install 5.0.25 which has the fix, plus a few others. Also note that Tomcat-5.0.24+ is very strict about objects in the session being serializable (where 5.0.19 was less so). Upon application shutdown, non-serializable attributes will be removed so that upon restart, the non-serializable attributes won't exist in the session. Not sure if that is your problem here, but it's a good thing to note. http://archive.apache.org/dist/jakarta/tomcat-5/v5.0.25-alpha/ Jake Well, yes and no. That is, on the remote server it is 5.0.19 but locally on my laptop (Win2K) and on a Linux box (FC1) I downloaded and installed 5.0.24. I wrote a pair of simple test jsp's and the version on the Win2K machine certainly has problems as the session is different on every submit. The remote server and the Linux box seem better. After reading your note I uninstalled the 5.0.24 version then downloaded and installed the 5.0.25-alpha version (the alpha part scared me which is why I went with the 5.0.24 before). Interestingly enough it also seems to exhibit the same behaviour (new session on every submit). I guess this means that all the straining and heaving to get things to work on a local Tomcat 5 server before deploying them remotely was a wasted day. For those interested, my test consisted of two simple jsp's like the following one. This is second.jsp the other being first.jsp. In the other jsp test is test2 and test2 is test. %@ page language=java contentType=text/html; charset=UTF-8 pageEncoding=UTF-8 % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN HTML HEAD TITLEsecond.jsp/TITLE /HEAD BODY Pfont color=blueSecond/font/P pSession ID=%=session.getId()%/p brtest = %=session.getAttribute(test)% brtest2 = %=session.getAttribute(test2)% br form method=post action=first.jsp input type=submit/ /form % session.setAttribute(test,test); % brtest confirm = %=session.getAttribute(test)% /BODY /HTML For the most part I'm only concerned with session stuff while a user is busy editing -- it doesn't have to survive stop/start at all. My feeling right now (FWIF) after repeated deploy/undeploy on the three installs of Tomcat is that Tomcat 5 is certainly is not as solidly stable as Tomcat 4.1. Mike - 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]
CGIServlet -- tomcat
who maintains the code for the cgiservlet used within tomcat? i have some specific questions and all attempts to get information from this list have prooven to be quite disappointing :( thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Net Integrator Virus Alert
WARNING: a virus (probably I-Worm.NetSky.q) or suspicious attachment was detected and removed from the following message from [EMAIL PROTECTED] to [EMAIL PROTECTED] Some of the content may still be readable. ---BeginMessage--- See the ghg5%6gfz65!4Hf55d!46gfgf Server Error #203 +++ Attachment: No Virus found +++ Panda AntiVirus - www.pandasoftware.com ---End Message--- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session Timeout and Direct Reference to login page
Jonathan Eric Miller wrote: Yeah, that seems like it would work. I'm wondering if I could maybe use a filter by itself though and not use the listener and do something like the following. 1. Intercept all requests with a filter. 2. Get the HttpSession out of the request. Get the session ID by calling HttpSession.getId(); 3. Get the cookie array and see if there is a cookie named jsessionid. If there is, compare the two session IDs. If they are different forward to sessionexpired.jsp to display error page. Otherwise, continue as normal. I've just tried this way, it works. Look at example .java file in attach for example, it's Filter implementation. Thanks for the suggestion, it's very useful. package org.unchqua.test.servlet; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.Cookie; public class NewSessionFilter implements Filter { private FilterConfig fconf; public void init(FilterConfig arg0) throws ServletException { fconf=arg0; } public void doFilter(ServletRequest req, ServletResponse resp, FilterChain fchain) throws IOException, ServletException { boolean newManualSession=false; String fromSession=null; if (((HttpServletRequest)req).getSession(false)!=null) { fromSession=((HttpServletRequest)req).getSession(false).getId(); } if (fromSession==null) { fromSession=((HttpServletRequest)req).getSession().getId(); newManualSession=true; } String fromCookie=null; Cookie[] cooks=((HttpServletRequest)req).getCookies(); if (cooks!=null) { for (int i=0; icooks.length; i++) { if (cooks[i].getName().equals(JSESSIONID)) { fromCookie=cooks[i].getValue(); break; } } } ServletOutputStream out=resp.getOutputStream(); out.println(newManualSession ? Session manually created : ); out.println(fromSession!=null ? From session: +fromSession : No session); out.println(fromCookie!=null ? From cookies: +fromCookie : No session id in cookies); if (fromSession==null fromCookie==null) out.println(Session is completely new); else if (fromSession==null fromCookie!=null) out.println(Session lived but has been expired); //fchain.doFilter(req, resp); } public void destroy() { fconf=null; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: CGIServlet -- tomcat
Hi, Us ;) Being the greater tomcat community, mostly the committers. If your question wasn't answered, maybe no one knows the answer. Yoav Shapira Millennium Research Informatics -Original Message- From: Alex [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 7:42 AM To: [EMAIL PROTECTED] Subject: CGIServlet -- tomcat who maintains the code for the cgiservlet used within tomcat? i have some specific questions and all attempts to get information from this list have prooven to be quite disappointing :( thanks! - 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: equivalent of DefaultContext element for Host
Hi, The spirit of the servlet specification calls for every webapp to be self-contained and portable. Using DefaultContext by definition means your webapp depends on server-global settings. It's a subtle but significant difference from it depending just on its own server configuration (in this case its own Context element or its equivalent in other servers). This is not the end of the world as far as portability or self-containment goes, and if this is your worst design mistake then you're in great shape, but nonetheless try not to overuse it. And of course your point about having many hosts mitigates your choice. Yoav Shapira Millennium Research Informatics -Original Message- From: wsedio [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 5:58 AM To: Tomcat Users List Subject: Re: equivalent of DefaultContext element for Host On 20-05-2004 16:03, Shapira, Yoav wrote: Be careful when relying on the DefaultContext, it can lead to laziness. Can you be a bit more specific? :-) I am dealing with a bunch of virtual hosts ... Thanks. - 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: CGIServlet -- tomcat
this is what i fear : ) i want to find someone who can duplicate what i have to help affect some change. i realize i'm but a little person with a little problem in the grand scheme of things. had i more time to direct towards looking at the source of the cgiservlet i'd hope to come up with a more concrete answer. i do know that it did work with tomcat 4.x.x (can't recall the version now) but is not working with the cgiservlet that is bundled with the five series. there are differences in the size of the jar files too...hm. oh well. no one specifically wrote the cgiservlet / jar file that is distributed? On Fri, 21 May 2004, Shapira, Yoav wrote: Date: Fri, 21 May 2004 08:42:38 -0400 From: Shapira, Yoav [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: CGIServlet -- tomcat Hi, Us ;) Being the greater tomcat community, mostly the committers. If your question wasn't answered, maybe no one knows the answer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: CGIServlet -- tomcat
Hi, this is what i fear : ) i want to find someone who can duplicate what i have to help affect some change. i realize i'm but a little person with a little problem in the grand scheme of things. If you find a bug, and file it with a reproducible test case, it won't be ignored. had i more time to direct towards looking at the source of the cgiservlet i'd hope to come up with a more concrete answer. i do know that it did work with tomcat 4.x.x (can't recall the version now) but is not working with the cgiservlet that is bundled with the five series. I strongly doubt the CGI servlet is simply not working with tomcat 5. You need to be more specific. there are differences in the size of the jar files too...hm. Naturally, as the servlet has been modified in the tomcat 5 releases. The changelog contains more information if you don't feel like looking at the exact CVS details: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/changelog.html. oh well. no one specifically wrote the cgiservlet / jar file that is distributed? The jar file is packaged by the release manager -- is there something wrong with the packaging? The servlet, like 99% of our source code files, has been written and edited by numerous people, and often time the original contributor is no longer an active committer. Yoav Shapira On Fri, 21 May 2004, Shapira, Yoav wrote: Date: Fri, 21 May 2004 08:42:38 -0400 From: Shapira, Yoav [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: CGIServlet -- tomcat Hi, Us ;) Being the greater tomcat community, mostly the committers. If your question wasn't answered, maybe no one knows the answer. - 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]
Tomcat 4.1.30
Whenever I attempt to enable SSL in Tomcat 4.1.30 by uncommenting SSL Coyote HTTP/1.1 Connector on port 8443 section of my server.xml. Tomcat will not start, any ideas?
RE: Memory leak with Tomcat 5.0.19
I added the request.registerRequests=false to jk2.properties yesterday, but I still do not have a definite confirmation on whether this problem is fixed. The JVM did grow to over 600MB, which is more that my Tomcat 4.1.x instances, but Tomcat crashed the site yesterday at about 7pm, so I didn't have a chance to see if the memory continued to grow. (there was about 200MB free of the 624 MB allocated at the time of the crash - I'll have to deal with that later). I read the documentation on jk2.properties, but didn't really get much there. Is there anyone with a good documented jk2.properties files that would care to share? BTW - for all interested, I also set development to false, and fork to true in web.xml. I have also removed jsvc from the equation just to make sure it is not part of the problem. Brian Beckham [EMAIL PROTECTED] Office: 770.924.6444 ext. 203 Mobile: 404.406.8355 -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Thursday, May 20, 2004 1:09 PM To: Tomcat Users List Subject: Re: Memory leak with Tomcat 5.0.19 wsedio wrote: On 19-05-2004 23:15, Michiel Toneman wrote: We were having severe memory problems too with 5.0.19. Does Tomcat 5.0.24 fix this problem? We added this to the jk2.properties: request.registerRequests=false and the memory usage was normal again. Somewhat non-obvious, I agree. It also gets rid of Error registering request messages in catalina.out. We are using mod_jk (1.2) with Apache 1.3.x on Sun Solaris and Linux. Do you have to add the setting even if you are using jk 1.2 (not jk 2)? Someone could answer this question, please? Becouse my available memory is going down from 120 to 50 and to 10 megabytes to fast. And I'm not finding any leak in my apps... Below is the memory profile of one of our servers before and after the change (old generation memory refers to the memory buckets in the garbage collector. For more information, see jvmstat. At 100% you will start getting OutOfMemory errors): How do you get the memory profile? Is it a Tomcat command? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Emerson Cargnin Analista de Sistemas Setor de Desenvolvimento de Sistemas - TRE-SC tel : (048) - 251-3700 - Ramal 3181 - 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: session data in Tomcat 5
Hi, Oh, this reminds me to have a vote on the stability of 5.0.25! You never answered the key question of whether your session attributes are Serializable or not: that's a binary question, should be easy to determine ;) Yoav Shapira Millennium Research Informatics -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 7:24 AM To: Tomcat Users List Subject: Re: session data in Tomcat 5 Mike, If you have a small, reproducable test case, send it up. I'd like to take a look at it. On Friday 21 May 2004 01:10 am, you wrote: Jacob Kjome wrote: I didn't see the earlier posts, but are you using Tomcat-5.0.24? There's a bug related to session cookies which requires a hotfix. However, I'd just install 5.0.25 which has the fix, plus a few others. Also note that Tomcat-5.0.24+ is very strict about objects in the session being serializable (where 5.0.19 was less so). Upon application shutdown, non-serializable attributes will be removed so that upon restart, the non-serializable attributes won't exist in the session. Not sure if that is your problem here, but it's a good thing to note. http://archive.apache.org/dist/jakarta/tomcat-5/v5.0.25-alpha/ Jake Well, yes and no. That is, on the remote server it is 5.0.19 but locally on my laptop (Win2K) and on a Linux box (FC1) I downloaded and installed 5.0.24. I wrote a pair of simple test jsp's and the version on the Win2K machine certainly has problems as the session is different on every submit. The remote server and the Linux box seem better. After reading your note I uninstalled the 5.0.24 version then downloaded and installed the 5.0.25-alpha version (the alpha part scared me which is why I went with the 5.0.24 before). Interestingly enough it also seems to exhibit the same behaviour (new session on every submit). I guess this means that all the straining and heaving to get things to work on a local Tomcat 5 server before deploying them remotely was a wasted day. For those interested, my test consisted of two simple jsp's like the following one. This is second.jsp the other being first.jsp. In the other jsp test is test2 and test2 is test. %@ page language=java contentType=text/html; charset=UTF-8 pageEncoding=UTF-8 % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN HTML HEAD TITLEsecond.jsp/TITLE /HEAD BODY Pfont color=blueSecond/font/P pSession ID=%=session.getId()%/p brtest = %=session.getAttribute(test)% brtest2 = %=session.getAttribute(test2)% br form method=post action=first.jsp input type=submit/ /form % session.setAttribute(test,test); % brtest confirm = %=session.getAttribute(test)% /BODY /HTML For the most part I'm only concerned with session stuff while a user is busy editing -- it doesn't have to survive stop/start at all. My feeling right now (FWIF) after repeated deploy/undeploy on the three installs of Tomcat is that Tomcat 5 is certainly is not as solidly stable as Tomcat 4.1. Mike - 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]
Tomcat 5: Location of 3rd party JNDI datasource jars in $CATALINA _HOME/common/lib
Hi all, This probably a simple question but I cannot find any answer to this in the FAQ or buglist. Why is it that the required jars for 3rd party JNDI datasource (such as JDBC pools) have to be placed in $CATALINA_HOME/common/lib? Why does the Tomcat instance not use $CATALINA_BASE/[common|shared]/lib instead? I've tried various different ways but the only one that works is the CATALINA_HOME approach. From the JNDI Datasource HOW-TO: NOTE: Third Party drivers should be in jarfiles, not zipfiles. Tomcat only adds $CATALINA_HOME/common/lib/*.jar to the classpath. NOTE: Do not install these jarfiles in your /WEB-INF/lib, or $JAVA_HOME/jre/lib/ext, or anywhere else. You will experience problems if you install them anyplace other than $CATALINA_HOME/common/lib. There may be something blindingly obvious that I am missing here but it seems to mean that you can only have a partially shared tomcat installation. Resource jars from the different instances have to be placed in the CATALINA_HOME common area somewhat negating the benefits of using a separate server via CATALINA_BASE. Cheer, Chris Carroll *** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our websites at: http://www.rbs.co.uk/CBFM http://www.rbsmarkets.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4.1.30
Hi, Here's an idea: look at the log and check for error messages ;) If there's insufficient information in the logs: for elements in server.xml that have debug=0 set debug=99. For everything else, follow the guidelines at http://jakarta.apache.org/tomcat/faq/misc.html#commonsLoggingLog4j to set the logging level for org.apache to DEBUG. Yoav Shapira Millennium Research Informatics -Original Message- From: Damon Henderson [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 8:53 AM To: Tomcat Users List Subject: Tomcat 4.1.30 Whenever I attempt to enable SSL in Tomcat 4.1.30 by uncommenting SSL Coyote HTTP/1.1 Connector on port 8443 section of my server.xml. Tomcat will not start, any ideas? 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: Use of Apache Commons Logging in Tomcat
Hi, This might help: http://jakarta.apache.org/tomcat/faq/misc.html#commonsLoggingLog4j Yoav Shapira Millennium Research Informatics -Original Message- From: Hut Carspecken [mailto:[EMAIL PROTECTED] Sent: Thursday, May 20, 2004 5:52 PM To: [EMAIL PROTECTED] Subject: Use of Apache Commons Logging in Tomcat Hello There, I have a particular problem that someone may have seen before. I am writing a web service using Apache Axis 1.1 and I want to use Apache Commons to do my logging. I am using Apache Commons in the correct manner import org.apache.commons.logging.Log org.apache.axis.components.logger.LogFactory and then make an instance with the following line: private static Log log = LogFactory.getLog(MyClass.class.getName()) My problem is manipulating the log file configuration. I can't find the log4j.properties which is responsible for changing how the logging works. Also how does org.apache.catalina.logger.FileLogger work so I can call different levels of traces? I am pretty sure that FileLogger is connected to Apache Commons Logging. Thanks! Hut - 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: CGIServlet -- tomcat
Who wrote what of the Servlet: http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java?annotate=1.19 -Original Message- From: Alex [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 2:29 PM To: Tomcat Users List Subject: RE: CGIServlet -- tomcat oh well. no one specifically wrote the cgiservlet / jar file that is distributed? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
URL Rewriting
Hi! We are using Struts 1.1 and Tomcat 4.1.x at our company. We are considering to separate our urls from our struts configuration. Instead of /news.do?articleid=43 we would like the url to look like this: /news/article/43. Furthermore the generated html should contain urls of the form /news/article/43. This change should happen as transparently as possible for our Action classes. We have found the UrlRewriteFilter at tuckey.org. However it only solves part of the problem. The incoming requests will be translated correctly. However, the anchors in the generated html remains unchanged. A solution could be to write our own HttpConnector and then implement our own HttpServetResponse.encodeURL, which in turn will translate the links. Do anyone on this list have an (better) alternative to this problem? Thanks in advance Morten Knudsen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: CGIServlet -- tomcat
Thanks ralph. On Fri, 21 May 2004, Ralph Einfeldt wrote: Date: Fri, 21 May 2004 14:59:14 +0200 From: Ralph Einfeldt [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: CGIServlet -- tomcat Who wrote what of the Servlet: http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java?annotate=1.19 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATALINA _HOME/common/lib
If a class needs to be accessed by both server components and web apps, it must be in the common classloader. The classes in the common class loader are all in $CATALINA_HOME. $CATALINA_BASE is for instance specific information, and the shared class loader is for classes that only need to be available to web apps (not server components); all $CATALINA_BASEs share the same server classes. The unpredictable behavior mentioned is that the classloaders that web apps use do not necessarily delegate to their parents (ie, by default they prioritize the local version of a class), which means you might get nasty class definition errors if you put copies of the same classes in, say, shared/lib and server/lib. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: CARROLL, Chris, FM [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 7:54 AM To: '[EMAIL PROTECTED]' Subject: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATALINA _HOME/common/lib Hi all, This probably a simple question but I cannot find any answer to this in the FAQ or buglist. Why is it that the required jars for 3rd party JNDI datasource (such as JDBC pools) have to be placed in $CATALINA_HOME/common/lib? Why does the Tomcat instance not use $CATALINA_BASE/[common|shared]/lib instead? I've tried various different ways but the only one that works is the CATALINA_HOME approach. From the JNDI Datasource HOW-TO: NOTE: Third Party drivers should be in jarfiles, not zipfiles. Tomcat only adds $CATALINA_HOME/common/lib/*.jar to the classpath. NOTE: Do not install these jarfiles in your /WEB-INF/lib, or $JAVA_HOME/jre/lib/ext, or anywhere else. You will experience problems if you install them anyplace other than $CATALINA_HOME/common/lib. There may be something blindingly obvious that I am missing here but it seems to mean that you can only have a partially shared tomcat installation. Resource jars from the different instances have to be placed in the CATALINA_HOME common area somewhat negating the benefits of using a separate server via CATALINA_BASE. Cheer, Chris Carroll *** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our websites at: http://www.rbs.co.uk/CBFM http://www.rbsmarkets.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URL Rewriting
Hi, IMHO (literally) this is not that good an idea in that your solution will be incur more costs (complexity, customization, long-term maintenance) than benefits (??). Yoav Shapira Millennium Research Informatics -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Morten Sent: Friday, May 21, 2004 8:41 AM To: [EMAIL PROTECTED] Subject: URL Rewriting Hi! We are using Struts 1.1 and Tomcat 4.1.x at our company. We are considering to separate our urls from our struts configuration. Instead of /news.do?articleid=43 we would like the url to look like this: /news/article/43. Furthermore the generated html should contain urls of the form /news/article/43. This change should happen as transparently as possible for our Action classes. We have found the UrlRewriteFilter at tuckey.org. However it only solves part of the problem. The incoming requests will be translated correctly. However, the anchors in the generated html remains unchanged. A solution could be to write our own HttpConnector and then implement our own HttpServetResponse.encodeURL, which in turn will translate the links. Do anyone on this list have an (better) alternative to this problem? Thanks in advance Morten Knudsen - 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: session data in Tomcat 5
On Friday 21 May 2004 08:53 am, Shapira, Yoav wrote: You never answered the key question of whether your session attributes are Serializable or not: that's a binary question, should be easy to determine ;) He didn't answer it but he did mention that he wasn't concerned with maintaining state across server restsarts: For the most part I'm only concerned with session stuff while a user is busy editing -- it doesn't have to survive stop/start at all. I don't think his problem has to do with whether or not the objects are serializable. Yoav Shapira Millennium Research Informatics -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 7:24 AM To: Tomcat Users List Subject: Re: session data in Tomcat 5 Mike, If you have a small, reproducable test case, send it up. I'd like to take a look at it. On Friday 21 May 2004 01:10 am, you wrote: Jacob Kjome wrote: I didn't see the earlier posts, but are you using Tomcat-5.0.24? There's a bug related to session cookies which requires a hotfix. However, I'd just install 5.0.25 which has the fix, plus a few others. Also note that Tomcat-5.0.24+ is very strict about objects in the session being serializable (where 5.0.19 was less so). Upon application shutdown, non-serializable attributes will be removed so that upon restart, the non-serializable attributes won't exist in the session. Not sure if that is your problem here, but it's a good thing to note. http://archive.apache.org/dist/jakarta/tomcat-5/v5.0.25-alpha/ Jake Well, yes and no. That is, on the remote server it is 5.0.19 but locally on my laptop (Win2K) and on a Linux box (FC1) I downloaded and installed 5.0.24. I wrote a pair of simple test jsp's and the version on the Win2K machine certainly has problems as the session is different on every submit. The remote server and the Linux box seem better. After reading your note I uninstalled the 5.0.24 version then downloaded and installed the 5.0.25-alpha version (the alpha part scared me which is why I went with the 5.0.24 before). Interestingly enough it also seems to exhibit the same behaviour (new session on every submit). I guess this means that all the straining and heaving to get things to work on a local Tomcat 5 server before deploying them remotely was a wasted day. For those interested, my test consisted of two simple jsp's like the following one. This is second.jsp the other being first.jsp. In the other jsp test is test2 and test2 is test. %@ page language=java contentType=text/html; charset=UTF-8 pageEncoding=UTF-8 % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN HTML HEAD TITLEsecond.jsp/TITLE /HEAD BODY Pfont color=blueSecond/font/P pSession ID=%=session.getId()%/p brtest = %=session.getAttribute(test)% brtest2 = %=session.getAttribute(test2)% br form method=post action=first.jsp input type=submit/ /form % session.setAttribute(test,test); % brtest confirm = %=session.getAttribute(test)% /BODY /HTML For the most part I'm only concerned with session stuff while a user is busy editing -- it doesn't have to survive stop/start at all. My feeling right now (FWIF) after repeated deploy/undeploy on the three installs of Tomcat is that Tomcat 5 is certainly is not as solidly stable as Tomcat 4.1. Mike - 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] -- Ben Souther F.W. Davison Company, Inc. This e-mail message, and any accompanying documents, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, distribution or copying is prohibited. If you are not the intended recipient, please contact our office by email or by telephone at (508) 747-7261 and immediately destroy all copies of the original message. - To
RE: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATA LINA _HOME/common/lib
Thanks for the info Ben. The only counter argument I have is ...$CATALINA_BASE is for instance specific information Making a datasource reference available to a single instance would imply CATALINA_BASE. ALL Tomcat instances would imply CATALINA_HOME. It's a picky point and maybe I misunderstand the use of CATALINA_BASE. To me CATALINA_HOME is the a basic installation and CATALINA_BASE is the fully configured instance (including shared resources). Not every instance based off a shared tomcat installation would use the same resources. Dtasources would be specific to individual instances. Cheers, Chris -Original Message- From: Benjamin Armintor [mailto:[EMAIL PROTECTED] Sent: 21 May 2004 14:03 To: Tomcat Users List Subject: RE: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATALINA _HOME/common/lib If a class needs to be accessed by both server components and web apps, it must be in the common classloader. The classes in the common class loader are all in $CATALINA_HOME. $CATALINA_BASE is for instance specific information, and the shared class loader is for classes that only need to be available to web apps (not server components); all $CATALINA_BASEs share the same server classes. The unpredictable behavior mentioned is that the classloaders that web apps use do not necessarily delegate to their parents (ie, by default they prioritize the local version of a class), which means you might get nasty class definition errors if you put copies of the same classes in, say, shared/lib and server/lib. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: CARROLL, Chris, FM [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 7:54 AM To: '[EMAIL PROTECTED]' Subject: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATALINA _HOME/common/lib Hi all, This probably a simple question but I cannot find any answer to this in the FAQ or buglist. Why is it that the required jars for 3rd party JNDI datasource (such as JDBC pools) have to be placed in $CATALINA_HOME/common/lib? Why does the Tomcat instance not use $CATALINA_BASE/[common|shared]/lib instead? I've tried various different ways but the only one that works is the CATALINA_HOME approach. From the JNDI Datasource HOW-TO: NOTE: Third Party drivers should be in jarfiles, not zipfiles. Tomcat only adds $CATALINA_HOME/common/lib/*.jar to the classpath. NOTE: Do not install these jarfiles in your /WEB-INF/lib, or $JAVA_HOME/jre/lib/ext, or anywhere else. You will experience problems if you install them anyplace other than $CATALINA_HOME/common/lib. There may be something blindingly obvious that I am missing here but it seems to mean that you can only have a partially shared tomcat installation. Resource jars from the different instances have to be placed in the CATALINA_HOME common area somewhat negating the benefits of using a separate server via CATALINA_BASE. Cheer, Chris Carroll *** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our websites at: http://www.rbs.co.uk/CBFM http://www.rbsmarkets.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
access logging
Access log entries seem to be logged without being buffered, in the default setting on Tomcat. Can this be configured to log every 50 or 100 lines in a batch or every N minutes? Thanks Nanda key words: buffer buffering access log logging - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: access logging
Hi, Nope. Feel free to submit an enhancement (though this is not that likely to get through: the access log's impact on performance is negligible). Yoav Shapira Millennium Research Informatics -Original Message- From: Nanda [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 9:15 AM To: [EMAIL PROTECTED] Subject: access logging Access log entries seem to be logged without being buffered, in the default setting on Tomcat. Can this be configured to log every 50 or 100 lines in a batch or every N minutes? Thanks Nanda key words: buffer buffering access log logging - 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: session data in Tomcat 5
Shapira, Yoav wrote: Hi, Oh, this reminds me to have a vote on the stability of 5.0.25! You never answered the key question of whether your session attributes are Serializable or not: that's a binary question, should be easy to determine ;) Yoav Shapira Millennium Research Informatics Hi ! Yes, sorry, I forgot. I think for the most part the answer is no, however for these apps I'm not worried about maintaining data over a shutdown-startup of the server nor am I running in a cluster. The interesting thing is that on Windows (Win2K to be exact) every hit to Tomcat seems to start a new session! I'm making a set of tests that will eventually work up to the actions that the application does to maintain session data. And, yes, I will be making the session objects serializable just to avoid future problems... For your enjoyment here is the same test app on two machines, my Win2K laptop and a Linux (Fedora Core 1) server. On Windows it is 5.0.25-alpha (previously 5.0.24) and on Linux it is 5.0.24 (out-of-the-box with no patches applied). I _think_ I have the external url correct. Linux http://ontarioshoots.ath.cx:8080/TC5test/ Windows http://ontarioshoots.ath.cx:8088/TC5test/ If you would like the .war file that it is deployed from just let me know... Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: access log format
Hi, I was watching this thread and noticed that is was very close to my thread. I am trying to use Apache Commons Logger, but I will settle for this default logger. Two questions: how do I write to this file (i.e. what class, like log, would I call) and how do I set the verbosity (i.e. trace, debug, info, warn, error, fatal) of the messages. Many thanks! Hut - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session data in Tomcat 5
Could you just attach the src to the two JSPs? On Friday 21 May 2004 09:18 am, M.Hockings wrote: Shapira, Yoav wrote: Hi, Oh, this reminds me to have a vote on the stability of 5.0.25! You never answered the key question of whether your session attributes are Serializable or not: that's a binary question, should be easy to determine ;) Yoav Shapira Millennium Research Informatics Hi ! Yes, sorry, I forgot. I think for the most part the answer is no, however for these apps I'm not worried about maintaining data over a shutdown-startup of the server nor am I running in a cluster. The interesting thing is that on Windows (Win2K to be exact) every hit to Tomcat seems to start a new session! I'm making a set of tests that will eventually work up to the actions that the application does to maintain session data. And, yes, I will be making the session objects serializable just to avoid future problems... For your enjoyment here is the same test app on two machines, my Win2K laptop and a Linux (Fedora Core 1) server. On Windows it is 5.0.25-alpha (previously 5.0.24) and on Linux it is 5.0.24 (out-of-the-box with no patches applied). I _think_ I have the external url correct. Linux http://ontarioshoots.ath.cx:8080/TC5test/ Windows http://ontarioshoots.ath.cx:8088/TC5test/ If you would like the .war file that it is deployed from just let me know... Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Souther F.W. Davison Company, Inc. This e-mail message, and any accompanying documents, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, distribution or copying is prohibited. If you are not the intended recipient, please contact our office by email or by telephone at (508) 747-7261 and immediately destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
just ignore this messages: Problems with session handling, carts example (Tomcat 5) !!
hi, sorry for bothering, the firewall blocked all sessions efforts... tomcat works well, no problems anymore. thanks -Ursprüngliche Nachricht- Von: Marc Arnold [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 21. Mai 2004 12:55 An: 'Tomcat Users List' Betreff: RE: Problems with session handling, carts example (Tomcat 5) !! hi again, I've still this problem, however made an interesting discovery: the servlet example of tomcat about sessions works. There data can be stored within the session. Can anybody tell me how to fix this with jsp? Thanks a lot Marc -Ursprüngliche Nachricht- Von: Marc Arnold [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 21. Mai 2004 11:49 An: [EMAIL PROTECTED] Betreff: Problems with session handling, carts example (Tomcat 5) !! Hi, I've real troubles with tomcat sessions. My tomcat server works well, version 4 and 5 (5.0.25), installed with windows installer. However, something is wrong with session information. I tried to run my own application and the carts example with Mozilla 1.6, MS IE 6.0 and Opera 7.23. The browsers accept cookies and my web.xml and server.xml are not changed. So in the carts example I cannot add items, only 1 is displayed when I add another item. I have Java SDK 1_4_2_04 installed. Thanks very, very much for help Marc Arnold - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat book
Hi wsedio I quite liked the short but sweet OReilly Tomcat the definitive . Regards Dave ** -Original Message- From: wsedio [mailto:[EMAIL PROTECTED] Sent: 21 May 2004 10:38 To: Tomcat Users List Subject: tomcat book Hi all, what is the best Tomcat book around? It would be great if it also covers Tomcat 5 ... Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
RE: Memory leak with Tomcat 5.0.19
Ok, after adding that setting in jk2.properties I have had 2 lockups of tomcat on my production siteany help!!?!!? Brian Beckham [EMAIL PROTECTED] Office: 770.924.6444 ext. 203 Mobile: 404.406.8355 -Original Message- From: Brian Beckham [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 8:53 AM To: Tomcat Users List Subject: RE: Memory leak with Tomcat 5.0.19 I added the request.registerRequests=false to jk2.properties yesterday, but I still do not have a definite confirmation on whether this problem is fixed. The JVM did grow to over 600MB, which is more that my Tomcat 4.1.x instances, but Tomcat crashed the site yesterday at about 7pm, so I didn't have a chance to see if the memory continued to grow. (there was about 200MB free of the 624 MB allocated at the time of the crash - I'll have to deal with that later). I read the documentation on jk2.properties, but didn't really get much there. Is there anyone with a good documented jk2.properties files that would care to share? BTW - for all interested, I also set development to false, and fork to true in web.xml. I have also removed jsvc from the equation just to make sure it is not part of the problem. Brian Beckham [EMAIL PROTECTED] Office: 770.924.6444 ext. 203 Mobile: 404.406.8355 -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Thursday, May 20, 2004 1:09 PM To: Tomcat Users List Subject: Re: Memory leak with Tomcat 5.0.19 wsedio wrote: On 19-05-2004 23:15, Michiel Toneman wrote: We were having severe memory problems too with 5.0.19. Does Tomcat 5.0.24 fix this problem? We added this to the jk2.properties: request.registerRequests=false and the memory usage was normal again. Somewhat non-obvious, I agree. It also gets rid of Error registering request messages in catalina.out. We are using mod_jk (1.2) with Apache 1.3.x on Sun Solaris and Linux. Do you have to add the setting even if you are using jk 1.2 (not jk 2)? Someone could answer this question, please? Becouse my available memory is going down from 120 to 50 and to 10 megabytes to fast. And I'm not finding any leak in my apps... Below is the memory profile of one of our servers before and after the change (old generation memory refers to the memory buckets in the garbage collector. For more information, see jvmstat. At 100% you will start getting OutOfMemory errors): How do you get the memory profile? Is it a Tomcat command? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Emerson Cargnin Analista de Sistemas Setor de Desenvolvimento de Sistemas - TRE-SC tel : (048) - 251-3700 - Ramal 3181 - 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: access logging
If I ever get my servers upgraded to 5 - thats on my todo list. -Tim Nanda wrote: Access log entries seem to be logged without being buffered, in the default setting on Tomcat. Can this be configured to log every 50 or 100 lines in a batch or every N minutes? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URL Rewriting
I think the struts list can probably answer this better than this list. -Tim Morten wrote: Hi! We are using Struts 1.1 and Tomcat 4.1.x at our company. We are considering to separate our urls from our struts configuration. Instead of /news.do?articleid=43 we would like the url to look like this: /news/article/43. Furthermore the generated html should contain urls of the form /news/article/43. This change should happen as transparently as possible for our Action classes. We have found the UrlRewriteFilter at tuckey.org. However it only solves part of the problem. The incoming requests will be translated correctly. However, the anchors in the generated html remains unchanged. A solution could be to write our own HttpConnector and then implement our own HttpServetResponse.encodeURL, which in turn will translate the links. Do anyone on this list have an (better) alternative to this problem? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there any way to check # of Records in RecordSet
Adam Buglass wrote: This is the wrong list but never mind An alternative is the following: ResultSet rs; int i = 0; while( rs.next() ) { i++; } The integer i should be the length of your result set (by the way, don't get confused with RecordSets which are VB - I used to do that all the time!) at the end of the loop - assuming of course that you start from the start of the set, you could use rs.first() to ensure this. There's tons of useful info on Java methods and classes on suns site: http://java.sun.com/j2se/1.3/docs/api/ http://java.sun.com/j2se/1.3/ Also look on www.sun.com for good java mailing lists where this kind of question is more specific. Adam. On Thu, 2004-05-20 at 15:26, Dale, Matt wrote: This is the wrong list i'm pretty sure but there are a couple of ways to get the number but there isnt a direct method that returns it. If the result set is scrollable you can iterate through it counting the number of iterations, then set it back to the start when you want to process the records. The other option (one I prefer) is to load the records into an ArrayList, you can then determine the size quite easily. If anyone else has any neater solutions i'd like to hear them too as I've had to do this in a few places. Ta Matt -Original Message- From: soh_mah [mailto:[EMAIL PROTECTED] Sent: 20 May 2004 15:20 To: [EMAIL PROTECTED] Subject: Is there any way to check # of Records in RecordSet Hi Is there any way to check number of Records in RecordSet? = Regards Sohail Mahmood (416) 636-2553 __ Do you Yahoo!? Yahoo! Domains - Claim yours for only $14.70/year http://smallbusiness.promotions.yahoo.com/offer - 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] A faster aproach if you are using TYPE_SCROLL_INSENSITIVE is to call rs.last() then call rs.getRow() I use this all the time and have not had any problems as of yet. To get back to the beginning is to then call rs.beforeFirst() then begin using as usual. Hope that helps. Wade - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: access log format
Apache Commons Logger and accesslogs are 2 totally different topics. -Tim Hut Carspecken wrote: Hi, I was watching this thread and noticed that is was very close to my thread. I am trying to use Apache Commons Logger, but I will settle for this default logger. Two questions: how do I write to this file (i.e. what class, like log, would I call) and how do I set the verbosity (i.e. trace, debug, info, warn, error, fatal) of the messages. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: CGIServlet -- tomcat
* h3TODO:/h3 * ul * li Support for setting headers (for example, Location headers don't work) Taken from the CGIServlet code. Given this, if i have a piece of perl that is doing the below and is being pushed through the cgiservlet: print $q-header(-type = image/png, -expires = $expire{$CGI::png}); is not going to work? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat thru netbeans 3.6
On Fri May 21 2004 1:07 am, Illya Kysil wrote: Tim Ashman wrote: I've got this problem and I'm not sure how to solve it. I'm hoping someone can steer me the right way. My problem is that I have my static files for the webapp located right off of the webapps directory like this. $tomcat/webapps/myapps $tomcat/webapps/myapps/images Now on my production server I use jk and apache and I was able to JkMount / myapps/* ajp13 and this allowed by webapp to see the images directory and the other static include files it works correctly. BUT on my development machine (I'm switching from a win98 to a linux) Anyway I'm using Netbeans 3.6 and the builtin tomcat server that it comes with (5.0.19) I setup my complier for external and netbeans places all the classes in the correct way, I can compile the entire app. But when I run tomcat I can run my app but the references to the images, my include scripts.js, don't load. Can someone help me with where in either tomcat's server.xml, web.xml or with the apps web.xml that I place the correct config info so that tomcat allows the app access to these directories. It would be much easier to use, say, Struts HTML taglib, to render application context path for you. strutshtml:img page=/images/content-logon.png / will work for any context path without any additional configuration you've mentioned above needed. My app is all servlets. Would this still work? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Tricky situation
Tim, I want Tomcat to pick .jsp's from c:\workspace and other files like .html, .gif from c:\iplanet\server\docs is that possible - Raj why not Context path= reloadable=true docBase=C:\iplanet\server\docs / -Tim Rajesh_Narayanan wrote: I have to configure my tomcat to look into two different directories for file availability. Scenario: I have a different webserver iplanet with docroot say C:\iplanet\server\docs... I hv my tomcat installed in c:\tomcat lets assume that a user try to access http:\\localhost:8080\a (where a is a directory in iplanet docroot..) I want tomcat to pick that(index.html) up from iplanet docroot how can i do that?.. I already configured my context path like this Context path= reloadable=true docBase=C:\workspace / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory leak with Tomcat 5.0.19
Brian Beckham wrote: Ok, after adding that setting in jk2.properties I have had 2 lockups of tomcat on my production siteany help!!?!!? lockup doesn't mean anything to me. Details please :) Also, this property cannot possibly cause that (look in the code if in doubt). -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATALINA _HOME/common/lib
I understand where you're coming from. Maybe Yoav will correct me if I'm wrong, but the important caveat is that classes are only specific to the instance if the app server classes don't need to know about them. The problem with JNDI is that the naming context is created by the app server, and not the web app - but of course, the web app is the one that uses the naming context. If you wanted to isolate the drivers by instance, you could forego JNDI as the access mechanism for the JDBC pools (create some singleton pool in the shared classloader, etc.)- although this would need kludging some things like password files, etc. It would, though, give you some ways to leave the code in shared/lib. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: CARROLL, Chris, FM [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 8:13 AM To: 'Tomcat Users List' Subject: RE: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATALINA _HOME/common/lib Thanks for the info Ben. The only counter argument I have is ...$CATALINA_BASE is for instance specific information Making a datasource reference available to a single instance would imply CATALINA_BASE. ALL Tomcat instances would imply CATALINA_HOME. It's a picky point and maybe I misunderstand the use of CATALINA_BASE. To me CATALINA_HOME is the a basic installation and CATALINA_BASE is the fully configured instance (including shared resources). Not every instance based off a shared tomcat installation would use the same resources. Dtasources would be specific to individual instances. Cheers, Chris -Original Message- From: Benjamin Armintor [mailto:[EMAIL PROTECTED] Sent: 21 May 2004 14:03 To: Tomcat Users List Subject: RE: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATALINA _HOME/common/lib If a class needs to be accessed by both server components and web apps, it must be in the common classloader. The classes in the common class loader are all in $CATALINA_HOME. $CATALINA_BASE is for instance specific information, and the shared class loader is for classes that only need to be available to web apps (not server components); all $CATALINA_BASEs share the same server classes. The unpredictable behavior mentioned is that the classloaders that web apps use do not necessarily delegate to their parents (ie, by default they prioritize the local version of a class), which means you might get nasty class definition errors if you put copies of the same classes in, say, shared/lib and server/lib. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: CARROLL, Chris, FM [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 7:54 AM To: '[EMAIL PROTECTED]' Subject: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATALINA _HOME/common/lib Hi all, This probably a simple question but I cannot find any answer to this in the FAQ or buglist. Why is it that the required jars for 3rd party JNDI datasource (such as JDBC pools) have to be placed in $CATALINA_HOME/common/lib? Why does the Tomcat instance not use $CATALINA_BASE/[common|shared]/lib instead? I've tried various different ways but the only one that works is the CATALINA_HOME approach. From the JNDI Datasource HOW-TO: NOTE: Third Party drivers should be in jarfiles, not zipfiles. Tomcat only adds $CATALINA_HOME/common/lib/*.jar to the classpath. NOTE: Do not install these jarfiles in your /WEB-INF/lib, or $JAVA_HOME/jre/lib/ext, or anywhere else. You will experience problems if you install them anyplace other than $CATALINA_HOME/common/lib. There may be something blindingly obvious that I am missing here but it seems to mean that you can only have a partially shared tomcat installation. Resource jars from the different instances have to be placed in the CATALINA_HOME common area somewhat negating the benefits of using a separate server via CATALINA_BASE. Cheer, Chris Carroll *** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that
RE: Re: Tricky situation
Why not just leave the JSP's in the iPlanet docroot, but use a service directive for the .jsp file extension to send all of those requests to Tomcat? Then you just need to make the iPlanet docroot the docbase for the root webapp in Tomcat. That's what I'm doing with iPlanet 6 right now, and it seems to be working just fine. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: Rajesh_Narayanan [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 9:24 AM To: '[EMAIL PROTECTED]' Cc: 'Tim Funk ' Subject: Re: Re: Tricky situation Tim, I want Tomcat to pick .jsp's from c:\workspace and other files like .html, .gif from c:\iplanet\server\docs is that possible - Raj why not Context path= reloadable=true docBase=C:\iplanet\server\docs / -Tim Rajesh_Narayanan wrote: I have to configure my tomcat to look into two different directories for file availability. Scenario: I have a different webserver iplanet with docroot say C:\iplanet\server\docs... I hv my tomcat installed in c:\tomcat lets assume that a user try to access http:\\localhost:8080\a (where a is a directory in iplanet docroot..) I want tomcat to pick that(index.html) up from iplanet docroot how can i do that?.. I already configured my context path like this Context path= reloadable=true docBase=C:\workspace / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. ** - 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]
jk2 cluster groups
Hello There, I finally managed to install and configure modJk2 with Apache 1.3 and Tomcat 5. It's running fine and the new graceful shutdown functionality is doing a good job :-) Now I want to set up in memory session replication. The problem I see with that is when I shutdown the first node, deploy the new code and restart it I would have two nodes running on a different code basis trying to replicate session information. The newly started Tomcat instance gets all the session data from the running node before it eventually opens all the ports and lets people connect to it, doesn't it?! There's now switch enabling me to activate and deactivate session replication on runtime (like JK2 offers configuration reloading by accessing the jkstatus page). Please correct me if I'm wrong... Assuming the above I think I'll need FOUR tomcat instances (1a, 1b, 2a, 2b) to implement a real failover solution. I would assign two instances to one group (1a, 1b) and the other two to a second group (2a, 2b). The tomcat instances would replicate session states just with other instances in the same group, i.e 1a with 1b and 2a with 2b respectively. This way I would be able to graceful shutdown one group (e.g. group 1) and deploy the new code without affecting the other group (e.g. group 2). Also one of the tomcat instances could fail (e.g. 1a) because there is always a 'backup node' in the same group (1b). Now the question (sorry for the long introduction to my problem): How can I assign the tomcat instances to different groups running under the same loadbalancer? Is that possible at all or is there a better solution for the scenario described above? Thanks TJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session data in Tomcat 5
Certainly ! They are attached (please don't laugh at them tooo much ) BTW, I'm finding that my test server on FC1 (Tomcat 5.0.24) is working quite well, fast response, can deploy, undeploy reliably and sessions seem to work as expected. On Win2K however the 5.0.25 version is considerably slower, often has to be re-started to get a successful deploy and every touch is a new session. This is as configured by the installer (I have not changed any of the config files other than setting up a manager id/pwd) and the only change on install was to modify the install directory from c:\... to d:\... In the past I've had Tomcat 4.0 4.1 working solidly on Win2K even jk'd to Apache.I must admit that I'm not a Tomcat expert, our main deployment platform is IBM's WAS but I like to make sure that our product runs on Tomcat as some prefer a different servlet container. I guess what I'm trying to say is I wonder if some of my woes have been due to trying to use Tomcat 5 on my Win2K laptop rather than a real server box. Mike Ben Souther wrote: Could you just attach the src to the two JSPs? On Friday 21 May 2004 09:18 am, M.Hockings wrote: Shapira, Yoav wrote: Hi, Oh, this reminds me to have a vote on the stability of 5.0.25! You never answered the key question of whether your session attributes are Serializable or not: that's a binary question, should be easy to determine ;) Yoav Shapira Millennium Research Informatics Hi ! Yes, sorry, I forgot. I think for the most part the answer is no, however for these apps I'm not worried about maintaining data over a shutdown-startup of the server nor am I running in a cluster. The interesting thing is that on Windows (Win2K to be exact) every hit to Tomcat seems to start a new session! I'm making a set of tests that will eventually work up to the actions that the application does to maintain session data. And, yes, I will be making the session objects serializable just to avoid future problems... For your enjoyment here is the same test app on two machines, my Win2K laptop and a Linux (Fedora Core 1) server. On Windows it is 5.0.25-alpha (previously 5.0.24) and on Linux it is 5.0.24 (out-of-the-box with no patches applied). I _think_ I have the external url correct. Linux http://ontarioshoots.ath.cx:8080/TC5test/ Windows http://ontarioshoots.ath.cx:8088/TC5test/ If you would like the .war file that it is deployed from just let me know... Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] %@ page language=java contentType=text/html; charset=UTF-8 pageEncoding=UTF-8 % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN HTML HEAD TITLEfirst.jsp/TITLE /HEAD BODY Pfont color=redFirst/font/P pSession ID=%=session.getId()%/p brtest = %=session.getAttribute(test)% brtest2 = %=session.getAttribute(test2)% br form method=post action=second.jsp input type=submit/ /form % session.setAttribute(test2,test2); % brtest2 confirm = %=session.getAttribute(test2)% /BODY /HTML %@ page language=java contentType=text/html; charset=UTF-8 pageEncoding=UTF-8 % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN HTML HEAD TITLEsecond.jsp/TITLE /HEAD BODY Pfont color=blueSecond/font/P pSession ID=%=session.getId()%/p brtest = %=session.getAttribute(test)% brtest2 = %=session.getAttribute(test2)% br form method=post action=first.jsp input type=submit/ /form % session.setAttribute(test,test); % brtest confirm = %=session.getAttribute(test)% /BODY /HTML %@ page language=java contentType=text/html; charset=ISO-8859-1 pageEncoding=ISO-8859-1 % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN HTML HEAD META http-equiv=Content-Type content=text/html; charset=ISO-8859-1 META name=GENERATOR content=IBM WebSphere Studio TITLEFirst Test/TITLE /HEAD BODY PFirst Test/P br This test will just test the passing of a couple of strings between two jsp's by saving the strings as attributes in the session. If this test is successful the session id should be unchanging and the test and test2 variables should be equal to test and test2. brbr In the failing case the variables will remain as null and the session id will change with each submit. brbr Click [a href=first.jsphere/a] to start /BODY /HTML - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATA LINA _HOME/common/lib
I couldn't agree with you more about the logical differences between the web app(s) and the app server itself. However, I would have thought that the CATALINA_BASE is the instance of the app server which requires the classes and not the raw installation in CATALINA_HOME. I am trying to understand why jars in $CATALINA_BASE/common/lib are not included in the app server (common classloader) classpath. The base common/lib augments the home/common/lib. I realise that there will be problems if you placed conflicting versions of the jars in the base that were already in the home but if you were halfway sensible that wouldn't be done. Cheers again, Chris -Original Message- From: Benjamin Armintor [mailto:[EMAIL PROTECTED] Sent: 21 May 2004 15:27 To: Tomcat Users List Subject: RE: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATALINA _HOME/common/lib I understand where you're coming from. Maybe Yoav will correct me if I'm wrong, but the important caveat is that classes are only specific to the instance if the app server classes don't need to know about them. The problem with JNDI is that the naming context is created by the app server, and not the web app - but of course, the web app is the one that uses the naming context. If you wanted to isolate the drivers by instance, you could forego JNDI as the access mechanism for the JDBC pools (create some singleton pool in the shared classloader, etc.)- although this would need kludging some things like password files, etc. It would, though, give you some ways to leave the code in shared/lib. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: CARROLL, Chris, FM [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 8:13 AM To: 'Tomcat Users List' Subject: RE: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATALINA _HOME/common/lib Thanks for the info Ben. The only counter argument I have is ...$CATALINA_BASE is for instance specific information Making a datasource reference available to a single instance would imply CATALINA_BASE. ALL Tomcat instances would imply CATALINA_HOME. It's a picky point and maybe I misunderstand the use of CATALINA_BASE. To me CATALINA_HOME is the a basic installation and CATALINA_BASE is the fully configured instance (including shared resources). Not every instance based off a shared tomcat installation would use the same resources. Dtasources would be specific to individual instances. Cheers, Chris -Original Message- From: Benjamin Armintor [mailto:[EMAIL PROTECTED] Sent: 21 May 2004 14:03 To: Tomcat Users List Subject: RE: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATALINA _HOME/common/lib If a class needs to be accessed by both server components and web apps, it must be in the common classloader. The classes in the common class loader are all in $CATALINA_HOME. $CATALINA_BASE is for instance specific information, and the shared class loader is for classes that only need to be available to web apps (not server components); all $CATALINA_BASEs share the same server classes. The unpredictable behavior mentioned is that the classloaders that web apps use do not necessarily delegate to their parents (ie, by default they prioritize the local version of a class), which means you might get nasty class definition errors if you put copies of the same classes in, say, shared/lib and server/lib. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: CARROLL, Chris, FM [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 7:54 AM To: '[EMAIL PROTECTED]' Subject: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATALINA _HOME/common/lib Hi all, This probably a simple question but I cannot find any answer to this in the FAQ or buglist. Why is it that the required jars for 3rd party JNDI datasource (such as JDBC pools) have to be placed in $CATALINA_HOME/common/lib? Why does the Tomcat instance not use $CATALINA_BASE/[common|shared]/lib instead? I've tried various different ways but the only one that works is the CATALINA_HOME approach. From the JNDI Datasource HOW-TO: NOTE: Third Party drivers should be in jarfiles, not zipfiles. Tomcat only adds $CATALINA_HOME/common/lib/*.jar to the classpath. NOTE: Do not install these jarfiles in your /WEB-INF/lib, or $JAVA_HOME/jre/lib/ext, or anywhere else. You will experience problems if you install them anyplace other than $CATALINA_HOME/common/lib. There may be something blindingly obvious that I am missing here but it seems to mean that you can only have a partially shared tomcat installation. Resource jars from the different instances have to be placed in the CATALINA_HOME common area somewhat negating the benefits of using a separate server via
RE: Memory leak with Tomcat 5.0.19
Sorry bout that...got a little flustered :) Some more details...tomcat non-responsive, but JVM still running ps -ef showed several java processes still running, several defunct - Running with following: LD_ASSUME_KERNEL=2.2.5 CATALINA_HOME=/opt/jakarta-tomcat-5.0.19 JAVA_HOME=/opt/j2sdk1.4.2_04 CATALINA_OPTS=-server -Xms256m -Xmx1024m -Djava.awt.headless=true error file created (attached): Unexpected Signal : 11 occurred at PC=0x3FC6AC09 Function=(null)+0x3FC6AC09 Library=/opt/j2sdk1.4.2_04/jre/lib/i386/server/libjvm.so NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353) - locked 0x7b528488 (a java.net.PlainSocketImpl) at java.net.ServerSocket.implAccept(ServerSocket.java:448) at java.net.ServerSocket.accept(ServerSocket.java:419) at org.apache.catalina.core.StandardServer.await(StandardServer.java:551) at org.apache.catalina.startup.Catalina.await(Catalina.java:657) at org.apache.catalina.startup.Catalina.start(Catalina.java:617) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398) System was at about 128 MB when crash occurred. Brian Beckham [EMAIL PROTECTED] Office: 770.924.6444 ext. 203 Mobile: 404.406.8355 -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 10:21 AM To: Tomcat Users List Subject: Re: Memory leak with Tomcat 5.0.19 Brian Beckham wrote: Ok, after adding that setting in jk2.properties I have had 2 lockups of tomcat on my production siteany help!!?!!? lockup doesn't mean anything to me. Details please :) Also, this property cannot possibly cause that (look in the code if in doubt). -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there any way to check # of Records in RecordSet
Adam Buglass wrote: This is the wrong list but never mind An alternative is the following: ResultSet rs; int i = 0; while( rs.next() ) { i++; } The integer i should be the length of your result set (by the way, don't get confused with RecordSets which are VB - I used to do that all the time!) at the end of the loop - assuming of course that you start from the start of the set, you could use rs.first() to ensure this. There's tons of useful info on Java methods and classes on suns site: http://java.sun.com/j2se/1.3/docs/api/ http://java.sun.com/j2se/1.3/ Also look on www.sun.com for good java mailing lists where this kind of question is more specific. Adam. On Thu, 2004-05-20 at 15:26, Dale, Matt wrote: This is the wrong list i'm pretty sure but there are a couple of ways to get the number but there isnt a direct method that returns it. If the result set is scrollable you can iterate through it counting the number of iterations, then set it back to the start when you want to process the records. The other option (one I prefer) is to load the records into an ArrayList, you can then determine the size quite easily. If anyone else has any neater solutions i'd like to hear them too as I've had to do this in a few places. Ta Matt -Original Message- From: soh_mah [mailto:[EMAIL PROTECTED] Sent: 20 May 2004 15:20 To: [EMAIL PROTECTED] Subject: Is there any way to check # of Records in RecordSet Hi Is there any way to check number of Records in RecordSet? = Regards Sohail Mahmood (416) 636-2553 __ Do you Yahoo!? Yahoo! Domains - Claim yours for only $14.70/year http://smallbusiness.promotions.yahoo.com/offer - 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] A faster aproach if you are using TYPE_SCROLL_INSENSITIVE is to call rs.last() then call rs.getRow() I use this all the time and have not had any problems as of yet. To get back to the beginning is to then call rs.beforeFirst() then begin using as usual. Hope that helps. Wade - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: tomcat book
Hi, I can recommend 'Professional Apache Tomcat' published by WROX (ISBN: 0764543725). It does not cover Tomcat 5 though. A new book about Tomcat 5 is gonna be released in June I think (ISBN: 0764559028). So I'd say just wait for that... Thomas -Ursprüngliche Nachricht- Von: wsedio [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 21. Mai 2004 11:38 An: Tomcat Users List Betreff: tomcat book Hi all, what is the best Tomcat book around? It would be great if it also covers Tomcat 5 ... Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory leak with Tomcat 5.0.19
Hmm, signal 11's are bad news and usually not related to OutOfMemory problems. There is a dated, but pretty good explanation at: http://www.bitwizard.nl/sig11/ Michiel Brian Beckham wrote: Sorry bout that...got a little flustered :) Some more details...tomcat non-responsive, but JVM still running ps -ef showed several java processes still running, several defunct - Running with following: LD_ASSUME_KERNEL=2.2.5 CATALINA_HOME=/opt/jakarta-tomcat-5.0.19 JAVA_HOME=/opt/j2sdk1.4.2_04 CATALINA_OPTS=-server -Xms256m -Xmx1024m -Djava.awt.headless=true error file created (attached): Unexpected Signal : 11 occurred at PC=0x3FC6AC09 Function=(null)+0x3FC6AC09 Library=/opt/j2sdk1.4.2_04/jre/lib/i386/server/libjvm.so NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353) - locked 0x7b528488 (a java.net.PlainSocketImpl) at java.net.ServerSocket.implAccept(ServerSocket.java:448) at java.net.ServerSocket.accept(ServerSocket.java:419) at org.apache.catalina.core.StandardServer.await(StandardServer.java:551) at org.apache.catalina.startup.Catalina.await(Catalina.java:657) at org.apache.catalina.startup.Catalina.start(Catalina.java:617) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398) System was at about 128 MB when crash occurred. Brian Beckham [EMAIL PROTECTED] Office: 770.924.6444 ext. 203 Mobile: 404.406.8355 -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 10:21 AM To: Tomcat Users List Subject: Re: Memory leak with Tomcat 5.0.19 Brian Beckham wrote: Ok, after adding that setting in jk2.properties I have had 2 lockups of tomcat on my production siteany help!!?!!? lockup doesn't mean anything to me. Details please :) Also, this property cannot possibly cause that (look in the code if in doubt). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Michiel Toneman Software Engineer Bibit Global Payment Services Regulierenring 10 3981 LB Bunnik [EMAIL PROTECTED] Tel. +31-30-6595168 Fax +31-30-6564464 http://www.bibit.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory leak with Tomcat 5.0.19
Brian Beckham wrote: Sorry bout that...got a little flustered :) I don't have any answers but I'd just like to chime in to say that I've had nearly identical problems when I was using 5.0.19. I've moved on to 5.0.24 now, but I found some error logs in one of my backups so I'm attaching them in case they might help. I think with both of these errors I was using j2sdk1.4.1 although I was having the same problem using 1.4.2 too. -- Jeff Hoffmann PropertyKey.com Unexpected Signal : 11 occurred at PC=0x403647F4 Function=(null)+0x403647F4 Library=/usr/java/j2sdk1.4.1/jre/lib/i386/server/libjvm.so NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353) - locked 0x49fcd1c0 (a java.net.PlainSocketImpl) at java.net.ServerSocket.implAccept(ServerSocket.java:439) at java.net.ServerSocket.accept(ServerSocket.java:410) at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:312) at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:613) at org.apache.jk.common.SocketAcceptor.runIt(ChannelSocket.java:810) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688) at java.lang.Thread.run(Thread.java:536) Dynamic libraries: 08048000-0804e000 r-xp 03:04 817673 /usr/java/j2sdk1.4.1/bin/java 0804e000-0804f000 rw-p 5000 03:04 817673 /usr/java/j2sdk1.4.1/bin/java 4000-40013000 r-xp 03:04 1602502/lib/ld-2.2.5.so 40013000-40014000 rw-p 00013000 03:04 1602502/lib/ld-2.2.5.so 40014000-40017000 r--s 03:04 1144706 /usr/java/j2sdk1.4.1/jre/lib/ext/dnsns.jar 40017000-40018000 r--s 03:04 801367 /home/iris/tomcat-5.0.19/common/lib/naming-java.jar 40018000-40025000 r-xp 03:04 2371049/lib/i686/libpthread-0.9.so 40025000-4002c000 rw-p d000 03:04 2371049/lib/i686/libpthread-0.9.so 4002d000-4002f000 r-xp 03:04 1602515/lib/libdl-2.2.5.so 4002f000-4003 rw-p 1000 03:04 1602515/lib/libdl-2.2.5.so 4003-404c8000 r-xp 03:04 883027 /usr/java/j2sdk1.4.1/jre/lib/i386/server/libjvm.so 404c8000-406d4000 rw-p 00497000 03:04 883027 /usr/java/j2sdk1.4.1/jre/lib/i386/server/libjvm.so 406e6000-406f8000 r-xp 03:04 1602519/lib/libnsl-2.2.5.so 406f8000-406f9000 rw-p 00012000 03:04 1602519/lib/libnsl-2.2.5.so 406fb000-4071c000 r-xp 03:04 2371047/lib/i686/libm-2.2.5.so 4071c000-4071d000 rw-p 0002 03:04 2371047/lib/i686/libm-2.2.5.so 4071d000-40726000 r-xp 03:04 359767 /usr/java/j2sdk1.4.1/jre/lib/i386/native_threads/libhpi.so 40726000-40727000 rw-p 8000 03:04 359767 /usr/java/j2sdk1.4.1/jre/lib/i386/native_threads/libhpi.so 40728000-40738000 r-xp 03:04 245402 /usr/java/j2sdk1.4.1/jre/lib/i386/libverify.so 40738000-4073a000 rw-p f000 03:04 245402 /usr/java/j2sdk1.4.1/jre/lib/i386/libverify.so 4073a000-4075b000 r-xp 03:04 245403 /usr/java/j2sdk1.4.1/jre/lib/i386/libjava.so 4075b000-4075d000 rw-p 0002 03:04 245403 /usr/java/j2sdk1.4.1/jre/lib/i386/libjava.so 4075d000-40772000 r-xp 03:04 245405 /usr/java/j2sdk1.4.1/jre/lib/i386/libzip.so 40772000-40774000 rw-p 00014000 03:04 245405 /usr/java/j2sdk1.4.1/jre/lib/i386/libzip.so 40774000-4085f000 r--s 03:04 212729 /home/iris/tomcat-5.0.19/common/endorsed/xercesImpl.jar 4085f000-4087e000 r--s 03:04 212730 /home/iris/tomcat-5.0.19/common/endorsed/xmlParserAPIs.jar 4087e000-41f4c000 r--s 03:04 1373665/usr/java/j2sdk1.4.1/jre/lib/rt.jar 41f8f000-41fa6000 r--s 03:04 1373645 /usr/java/j2sdk1.4.1/jre/lib/sunrsasign.jar 41fa6000-41fb9000 r--s 03:04 1373646/usr/java/j2sdk1.4.1/jre/lib/jce.jar 41fe1000-41fe7000 r--s 03:04 2354875/usr/lib/gconv/gconv-modules.cache 41fe7000-41ff r-xp 03:04 1602535/lib/libnss_files-2.2.5.so 41ff-41ff1000 rw-p 9000 03:04 1602535/lib/libnss_files-2.2.5.so 41ff1000-41fff000 r--s 03:04 1144708 /usr/java/j2sdk1.4.1/jre/lib/ext/ldapsec.jar 41fff000-4200 r--s 03:04 1782607 /home/iris/tomcat-5.0.19/server/lib/jkshm.jar 4200-4212c000 r-xp 03:04 2371045/lib/i686/libc-2.2.5.so 4212c000-42131000 rw-p 0012c000 03:04 2371045/lib/i686/libc-2.2.5.so 42135000-421a6000 r--s 03:04 1373647/usr/java/j2sdk1.4.1/jre/lib/jsse.jar 421a6000-42462000 r--s 03:04 1373663 /usr/java/j2sdk1.4.1/jre/lib/charsets.jar 444e2000-444e8000 r--s 03:04 2076877 /home/iris/tomcat-5.0.19/bin/bootstrap.jar 444e8000-444eb000 r--s 03:04 2076880
Re: RE: Re: Tricky situation
Yes thats a good idea.. I am very much interested to know how have you done that using iPlanet... I will try the same over here (can u pls give the exact file name and command u used) our corporate vision is to remove iPlanet and want to use tomcat for serving pages in the future... [So I keep this thread still open for ideas] -Raj Why not just leave the JSP's in the iPlanet docroot, but use a service directive for the .jsp file extension to send all of those requests to Tomcat? Then you just need to make the iPlanet docroot the docbase for the root webapp in Tomcat. That's what I'm doing with iPlanet 6 right now, and it seems to be working just fine. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: Rajesh_Narayanan [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 9:24 AM To: '[EMAIL PROTECTED]' Cc: 'Tim Funk ' Subject: Re: Re: Tricky situation Tim, I want Tomcat to pick .jsp's from c:\workspace and other files like .html, .gif from c:\iplanet\server\docs is that possible - Raj why not Context path= reloadable=true docBase=C:\iplanet\server\docs / -Tim Rajesh_Narayanan wrote: I have to configure my tomcat to look into two different directories for file availability. Scenario: I have a different webserver iplanet with docroot say C:\iplanet\server\docs... I hv my tomcat installed in c:\tomcat lets assume that a user try to access http:\\localhost:8080\a (where a is a directory in iplanet docroot..) I want tomcat to pick that(index.html) up from iplanet docroot how can i do that?.. I already configured my context path like this Context path= reloadable=true docBase=C:\workspace / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. ** - 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 email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: session data in Tomcat 5
Hi, How does 5.0.25 run on FC1? Yoav Shapira Millennium Research Informatics -Original Message- From: M.Hockings [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 10:37 AM To: Tomcat Users List Subject: Re: session data in Tomcat 5 Certainly ! They are attached (please don't laugh at them tooo much ) BTW, I'm finding that my test server on FC1 (Tomcat 5.0.24) is working quite well, fast response, can deploy, undeploy reliably and sessions seem to work as expected. On Win2K however the 5.0.25 version is considerably slower, often has to be re-started to get a successful deploy and every touch is a new session. This is as configured by the installer (I have not changed any of the config files other than setting up a manager id/pwd) and the only change on install was to modify the install directory from c:\... to d:\... In the past I've had Tomcat 4.0 4.1 working solidly on Win2K even jk'd to Apache.I must admit that I'm not a Tomcat expert, our main deployment platform is IBM's WAS but I like to make sure that our product runs on Tomcat as some prefer a different servlet container. I guess what I'm trying to say is I wonder if some of my woes have been due to trying to use Tomcat 5 on my Win2K laptop rather than a real server box. Mike Ben Souther wrote: Could you just attach the src to the two JSPs? On Friday 21 May 2004 09:18 am, M.Hockings wrote: Shapira, Yoav wrote: Hi, Oh, this reminds me to have a vote on the stability of 5.0.25! You never answered the key question of whether your session attributes are Serializable or not: that's a binary question, should be easy to determine ;) Yoav Shapira Millennium Research Informatics Hi ! Yes, sorry, I forgot. I think for the most part the answer is no, however for these apps I'm not worried about maintaining data over a shutdown-startup of the server nor am I running in a cluster. The interesting thing is that on Windows (Win2K to be exact) every hit to Tomcat seems to start a new session! I'm making a set of tests that will eventually work up to the actions that the application does to maintain session data. And, yes, I will be making the session objects serializable just to avoid future problems... For your enjoyment here is the same test app on two machines, my Win2K laptop and a Linux (Fedora Core 1) server. On Windows it is 5.0.25-alpha (previously 5.0.24) and on Linux it is 5.0.24 (out-of-the-box with no patches applied). I _think_ I have the external url correct. Linux http://ontarioshoots.ath.cx:8080/TC5test/ Windows http://ontarioshoots.ath.cx:8088/TC5test/ If you would like the .war file that it is deployed from just let me know... Mike - 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: Memory leak with Tomcat 5.0.19
Jeff, Can you tell me more about your sitation? Did 5.0.24 help? What options were you setting? Were you using / are you using jsvc? What OS? Brian Beckham [EMAIL PROTECTED] Office: 770.924.6444 ext. 203 Mobile: 404.406.8355 -Original Message- From: Jeff Hoffmann [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 10:54 AM To: Tomcat Users List Subject: Re: Memory leak with Tomcat 5.0.19 Brian Beckham wrote: Sorry bout that...got a little flustered :) I don't have any answers but I'd just like to chime in to say that I've had nearly identical problems when I was using 5.0.19. I've moved on to 5.0.24 now, but I found some error logs in one of my backups so I'm attaching them in case they might help. I think with both of these errors I was using j2sdk1.4.1 although I was having the same problem using 1.4.2 too. -- Jeff Hoffmann PropertyKey.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SSL shutdown after socket write error
Hi, I am developing a couple of web apps and have been getting the following exceptions appear in the log file: java.net.SocketException: Software caused connection abort: socket write error Until recently I have just been ignoring these errors as they didn't affect the functionality of the system. However, I have just added an SSL connector to tomcat which works on my development server, but on the live machine every time I get one of these exceptions over a secure connection, the SSL connector is apparently shutdown as no further requests to https:// respond. I have to restart Tomcat and then it's up for a very short time until the expection is thrown again. The exceptions seem to occur when navigating through pages quickly (not waiting for them to load entirely). I'm not worried about stopping the exceptions occuring just stopping the secure connection from going down. Any help would be greatly appreciated. The error in the log file is: 2004-05-21 10:19:42 ErrorDispatcherValve[localhost]: Exception Processing ErrorPage[errorCode=404, location=/error/404.do] OR 2004-05-21 15:30:59 StandardWrapperValve[default]: Servlet.service() for servlet default threw exception Followed by the same exception: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Software caused connection abort: socket write error at com.sun.net.ssl.internal.ssl.SSLSocketImpl.d(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.e(DashoA6275) at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275) at org.apache.coyote.http11.InternalOutputBuffer $OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:668) at org.apache.coyote.http11.InternalOutputBuffer.doWrite (InternalOutputBuffer.java:521) at org.apache.coyote.Response.doWrite(Response.java:524) at org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes (OutputBuffer.java:384) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer (ByteChunk.java:360) at org.apache.coyote.tomcat4.OutputBuffer.flush (OutputBuffer.java:345) at org.apache.coyote.tomcat4.CoyoteResponse.flushBuffer (CoyoteResponse.java:555) at org.apache.coyote.tomcat4.CoyoteResponseFacade.flushBuffer (CoyoteResponseFacade.java:227) at org.apache.catalina.valves.ErrorDispatcherValve.status (ErrorDispatcherValve.java:307) at org.apache.catalina.valves.ErrorDispatcherValve.invoke (ErrorDispatcherValve.java:180) at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service (CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:432) at org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.processConnection(Http11Protocol.java:386) at org.apache.tomcat.util.net.TcpWorkerThread.runIt (PoolTcpEndpoint.java:534) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (ThreadPool.java:530) at java.lang.Thread.run(Thread.java:534) Caused by: javax.net.ssl.SSLException: java.net.SocketException: Software caused connection abort: socket write error at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275) at org.apache.coyote.http11.InternalOutputBuffer $OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:668) at org.apache.coyote.http11.InternalOutputBuffer.doWrite (InternalOutputBuffer.java:521) at org.apache.coyote.Response.doWrite(Response.java:524) at org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes (OutputBuffer.java:384) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer (ByteChunk.java:360) at org.apache.coyote.tomcat4.OutputBuffer.flush (OutputBuffer.java:345) at
Quiestion about Average cluster serialize/send
Hello I got clustering up last night. In the log file I am seeing some thing that I was wondering if someone could help explain. What concerns me is the difference in Average cluster Is this the time it takes to serialize and send over the session info? I am trying to understand where the problem is? Thanks Box 1 log file snippet May 21, 2004 1:17:19 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=245486 over 200 ==1227 bytes/request May 21, 2004 1:19:24 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=120 ms for 300 requests (36046ms). May 21, 2004 1:36:31 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=302688 over 300 ==1008 bytes/request May 21, 2004 1:50:09 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=369314 over 400 ==923 bytes/request May 21, 2004 2:13:33 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=91 ms for 400 requests (36640ms). Box 2 log file snippet May 21, 2004 1:39:17 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=9 ms for 100 requests (947ms). May 21, 2004 1:54:41 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=158650 over 200 ==793 bytes/request May 21, 2004 2:30:03 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=216767 over 300 ==722 bytes/request May 21, 2004 3:28:29 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=283745 over 400 ==709 bytes/request May 21, 2004 4:16:34 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=9 ms for 200 requests (1846ms). May 21, 2004 4:31:52 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=354565 over 500 ==709 bytes/request May 21, 2004 5:13:15 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=436113 over 600 ==726 bytes/request May 21, 2004 5:40:14 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=8 ms for 300 requests (2401ms). May 21, 2004 5:42:29 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=511204 over 700 ==730 bytes/request May 21, 2004 6:04:17 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=587590 over 800 ==734 bytes/request May 21, 2004 6:30:18 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=657453 over 900 ==730 bytes/request - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JDBC Realm Problem
Hi , I 've installed tomcat 5.0.24 and i try to implement security byJDBC Realm and the context is Loaded in the web.xml i wrote that: security-constraint web-resource-collection web-resource-nameBACK OFFICE/web-resource-name url-pattern/carpetaUno/*/url-pattern /web-resource-collection auth-constraint role-nameAdministadorST/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method realm-nameTomcat Manager Application/realm-name form-login-config form-login-page/login.jsp/form-login-page form-error-page/error.jsp/form-error-page /form-login-config /login-config my directory structure is ST ---carpetaUno ---WEB-INF ---classes ---lib I 've configured a JDBCRealm in the administrator and i 've check that in this context file ST.xml. All seems is OK but it's doesen't work. I've made the same in Tomcat 4.1.24 and it's work,i have inmyDataBasei 2 tables and its work in tomcat 4.1.24 Somebody can help me ? TKS Ignacio J. TisseraJava DeveloperArea de DesarrolloBRANDIGITAL(0054) 351 681931www.brandigital.com[EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
URGENT!! Relocation error problem
I am getting the following error when trying to start apache 1.3.27 Syntax error on line 4 of /opt/applocal/imt/webi/jakarta-tomcat-4.1.29/conf/auto/mod_jk.conf: Cannot load /opt/applocal/imt/webi/httpd_1.3.27/modules/mod_jk.so into server: ld.so.1: /opt/applocal/imt/webi/httpd_1.3.27/bin/httpd: fatal: relocation error: file /opt/applocal/imt/webi/httpd_1.3.27/modules/mod_jk.so: symbol ap_ctx_get: referenced symbol not found ./apachectl start: httpd could not be started I am also using Jakarta Tomcat 4.1.29 which trys to load the mod_jk.so library that I have place in my Apache modules directory. The files and paths are being found ok, however the referenced symbol seems to be causing the error? Also if I comment out the part about loading the mod_jk.so (by not including the mod_jk.conf file, all other modules load just fine? I have looked through the old archives and tried a number of different solutions: Changing my LD_LIBRARY_PATH ./configureing with SHARED_CORE Etc. I have done this successfully with Apache 2.0.48 but 1.3.x will not work for me? Nothing seems to be working. Has anyone seen/resolved this? Thanks Terry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session data in Tomcat 5
Shapira, Yoav wrote: Hi, How does 5.0.25 run on FC1? Yoav Shapira Millennium Research Informatics Hi Yoav, No, not yet as the 5.0.24 seems to be working fine (worlds better than .24 or .25 on Win2K). If I get some free time I'll give it a whirl. Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
workers.properties question
Hi, I have a question about workers.properties setting In mod_jk.log, I have JkMount /* loadbalancer In workers.properties, I have worker.list = worker1, worker2, loadbalancer(1) #worker1 configuration #worker2 configuration #---Load balancer worker -- worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers = worker1, worker2 (2) worker1 and worker2 are real tomcat instance. loadbalance is for dispatching message to worker1 and worker2. My question do I need worker1 and worker2 on line(1). Somewhere between lines in tomcat HOWTO, I read those workers on line (2) are those not on line(1). I tried both keep them on line(1) aand remove them from line(1) and don't see any different result. Could anyone please enlighten me which is the right way and where can I find description on suchs issues? Thanks, -Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATA LINA _HOME/common/lib
CATALINA_BASE allows you to have separate config files and a separate shared/lib (along with a separate webapps and work dirs). However, most everything such as core libraries in server/lib and common/lib are used in each CATALINA_BASE instance. I guess it would be nice if there were a place to put jars which the core server can see, but can be different per/CATALINA_BASE. For instance when configuring a datasource, one app might need a certain set of, say... Oracle drivers while another might need different ones. Tomcat must be able to see the driver in order to use container managed datasources but, as things stand, the only place to put them is in common/lib which would be seen by all CATALINA_BASE instances. The only solution is to have two entirely separate Tomcat installs. I think that is what you'll have to do unless the classloading hierarchy gets changed. As a side note (and this probably wouldn't solve the problem above, but...) it would be nice if Tomcat supported the deployment of ear files, but only used them for deploying contained .war files and shared libraries (not EJB's, of course). That would make deploying related apps and shared libs so much easier and under the control of the developer/deployer rather than the server admin since. Anyway, just a thought. Jake Quoting CARROLL, Chris, FM [EMAIL PROTECTED]: I couldn't agree with you more about the logical differences between the web app(s) and the app server itself. However, I would have thought that the CATALINA_BASE is the instance of the app server which requires the classes and not the raw installation in CATALINA_HOME. I am trying to understand why jars in $CATALINA_BASE/common/lib are not included in the app server (common classloader) classpath. The base common/lib augments the home/common/lib. I realise that there will be problems if you placed conflicting versions of the jars in the base that were already in the home but if you were halfway sensible that wouldn't be done. Cheers again, Chris -Original Message- From: Benjamin Armintor [mailto:[EMAIL PROTECTED] Sent: 21 May 2004 15:27 To: Tomcat Users List Subject: RE: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATALINA _HOME/common/lib I understand where you're coming from. Maybe Yoav will correct me if I'm wrong, but the important caveat is that classes are only specific to the instance if the app server classes don't need to know about them. The problem with JNDI is that the naming context is created by the app server, and not the web app - but of course, the web app is the one that uses the naming context. If you wanted to isolate the drivers by instance, you could forego JNDI as the access mechanism for the JDBC pools (create some singleton pool in the shared classloader, etc.)- although this would need kludging some things like password files, etc. It would, though, give you some ways to leave the code in shared/lib. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: CARROLL, Chris, FM [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 8:13 AM To: 'Tomcat Users List' Subject: RE: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATALINA _HOME/common/lib Thanks for the info Ben. The only counter argument I have is ...$CATALINA_BASE is for instance specific information Making a datasource reference available to a single instance would imply CATALINA_BASE. ALL Tomcat instances would imply CATALINA_HOME. It's a picky point and maybe I misunderstand the use of CATALINA_BASE. To me CATALINA_HOME is the a basic installation and CATALINA_BASE is the fully configured instance (including shared resources). Not every instance based off a shared tomcat installation would use the same resources. Dtasources would be specific to individual instances. Cheers, Chris -Original Message- From: Benjamin Armintor [mailto:[EMAIL PROTECTED] Sent: 21 May 2004 14:03 To: Tomcat Users List Subject: RE: Tomcat 5: Location of 3rd party JNDI datasource jars in $CATALINA _HOME/common/lib If a class needs to be accessed by both server components and web apps, it must be in the common classloader. The classes in the common class loader are all in $CATALINA_HOME. $CATALINA_BASE is for instance specific information, and the shared class loader is for classes that only need to be available to web apps (not server components); all $CATALINA_BASEs share the same server classes. The unpredictable behavior mentioned is that the classloaders that web apps use do not necessarily delegate to their parents (ie, by default they prioritize the local version of a class), which means you might get nasty class definition errors if you put copies of the same classes in, say, shared/lib and server/lib. Benjamin J. Armintor Systems
Re: session data in Tomcat 5
Well, it works for me on Win2k with Tomcat-5.0.25. Same session every post. You don't have sessions turned off in web.xml by setting the session-timeout to 0 or -1 (can't remember which one, if any, disables sessions) by chance, do you? You might also check for virus or firewall softwared/hardware on your machine. That stuff can mess things up pretty badly. Jake Quoting M.Hockings [EMAIL PROTECTED]: Certainly ! They are attached (please don't laugh at them tooo much ) BTW, I'm finding that my test server on FC1 (Tomcat 5.0.24) is working quite well, fast response, can deploy, undeploy reliably and sessions seem to work as expected. On Win2K however the 5.0.25 version is considerably slower, often has to be re-started to get a successful deploy and every touch is a new session. This is as configured by the installer (I have not changed any of the config files other than setting up a manager id/pwd) and the only change on install was to modify the install directory from c:\... to d:\... In the past I've had Tomcat 4.0 4.1 working solidly on Win2K even jk'd to Apache.I must admit that I'm not a Tomcat expert, our main deployment platform is IBM's WAS but I like to make sure that our product runs on Tomcat as some prefer a different servlet container. I guess what I'm trying to say is I wonder if some of my woes have been due to trying to use Tomcat 5 on my Win2K laptop rather than a real server box. Mike Ben Souther wrote: Could you just attach the src to the two JSPs? On Friday 21 May 2004 09:18 am, M.Hockings wrote: Shapira, Yoav wrote: Hi, Oh, this reminds me to have a vote on the stability of 5.0.25! You never answered the key question of whether your session attributes are Serializable or not: that's a binary question, should be easy to determine ;) Yoav Shapira Millennium Research Informatics Hi ! Yes, sorry, I forgot. I think for the most part the answer is no, however for these apps I'm not worried about maintaining data over a shutdown-startup of the server nor am I running in a cluster. The interesting thing is that on Windows (Win2K to be exact) every hit to Tomcat seems to start a new session! I'm making a set of tests that will eventually work up to the actions that the application does to maintain session data. And, yes, I will be making the session objects serializable just to avoid future problems... For your enjoyment here is the same test app on two machines, my Win2K laptop and a Linux (Fedora Core 1) server. On Windows it is 5.0.25-alpha (previously 5.0.24) and on Linux it is 5.0.24 (out-of-the-box with no patches applied). I _think_ I have the external url correct. Linux http://ontarioshoots.ath.cx:8080/TC5test/ Windows http://ontarioshoots.ath.cx:8088/TC5test/ If you would like the .war file that it is deployed from just let me know... Mike - 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: session data in Tomcat 5
I just dropped your JSPs in a box running win2k server and tomcat 5.0.24. They run fine, same session. Once the strings are created, they stay created, no nulls. I'm hitting from a linux box using Mozilla, but I also tried from MSIE on the machine that's hosting your JSPs. All looks good. For kicks, try doing this: In MSIE, click Internet Options - Privacy (tab) - Advanced (button) Then check the Always Allow Session Cookies checkbox. Let me know if that fixes it. -good luck On Friday 21 May 2004 10:36 am, M.Hockings wrote: Certainly ! They are attached (please don't laugh at them tooo much ) BTW, I'm finding that my test server on FC1 (Tomcat 5.0.24) is working quite well, fast response, can deploy, undeploy reliably and sessions seem to work as expected. On Win2K however the 5.0.25 version is considerably slower, often has to be re-started to get a successful deploy and every touch is a new session. This is as configured by the installer (I have not changed any of the config files other than setting up a manager id/pwd) and the only change on install was to modify the install directory from c:\... to d:\... In the past I've had Tomcat 4.0 4.1 working solidly on Win2K even jk'd to Apache.I must admit that I'm not a Tomcat expert, our main deployment platform is IBM's WAS but I like to make sure that our product runs on Tomcat as some prefer a different servlet container. I guess what I'm trying to say is I wonder if some of my woes have been due to trying to use Tomcat 5 on my Win2K laptop rather than a real server box. Mike Ben Souther wrote: Could you just attach the src to the two JSPs? On Friday 21 May 2004 09:18 am, M.Hockings wrote: Shapira, Yoav wrote: Hi, Oh, this reminds me to have a vote on the stability of 5.0.25! You never answered the key question of whether your session attributes are Serializable or not: that's a binary question, should be easy to determine ;) Yoav Shapira Millennium Research Informatics Hi ! Yes, sorry, I forgot. I think for the most part the answer is no, however for these apps I'm not worried about maintaining data over a shutdown-startup of the server nor am I running in a cluster. The interesting thing is that on Windows (Win2K to be exact) every hit to Tomcat seems to start a new session! I'm making a set of tests that will eventually work up to the actions that the application does to maintain session data. And, yes, I will be making the session objects serializable just to avoid future problems... For your enjoyment here is the same test app on two machines, my Win2K laptop and a Linux (Fedora Core 1) server. On Windows it is 5.0.25-alpha (previously 5.0.24) and on Linux it is 5.0.24 (out-of-the-box with no patches applied). I _think_ I have the external url correct. Linux http://ontarioshoots.ath.cx:8080/TC5test/ Windows http://ontarioshoots.ath.cx:8088/TC5test/ If you would like the .war file that it is deployed from just let me know... Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Souther F.W. Davison Company, Inc. This e-mail message, and any accompanying documents, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, distribution or copying is prohibited. If you are not the intended recipient, please contact our office by email or by telephone at (508) 747-7261 and immediately destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory leak with Tomcat 5.0.19
Brian Beckham wrote: Jeff, Can you tell me more about your sitation? Did 5.0.24 help? So far I haven't had any problems with 5.0.24, although I've only been running it a couple of days. When I had the problem with 5.0.19, I jumped back to 5.0.16 until a couple of days ago when I went up to 5.0.24. What options were you setting? They were essentially the same. My initial memory was set to 128M and max memory was set to 512M but I never maxed out the memory before the crash. I was using server VM and set the headless property. Were you using / are you using jsvc? No. What OS? It's mostly Redhat Hat 7.3 with kernel 2.4.20-20.7smp. I've used both of the following java environments and saw the same problem with both: Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21) Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode) Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode) I don't know what else you'd like to know. I'm not running that version any more so it'd be kind of hard for me to test things but I'd be glad to tell you what I can remember from when I was. Like I said, I never found an answer but I wanted to corroborate in case somebody was inclined to dismiss it as a one-off problem. -- Jeff Hoffmann PropertyKey.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with error-page
The suggestion to change 403.jsp to something like _403.jsp did not work. I did however change my browser setting in the advanced section concerning friendly error messages. This did work. I still don't understand why the IE browser distinguishes between an HTML error page and a JSP error page. The browser, it would seem to me, would not be aware of that. Here's the first message again: I am trying to configure a custom error page when users try to access an area of my site that they don't have sufficient rights to access. The book says this to configure this in web.xml: error-page error-code403/error-code location/error/403.jsp/location /error-page This doesn't work for me, but error-page error-code403/error-code location/error/403.html/location /error-page Does work. Is there a problem with using JSP's. I'm am using JBOSS with Tomcat, but that shouldn't matter. It's still the Tomcat engine. I'm also using Struts. I'm using Tomcat 4.1.24. -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, May 20, 2004 5:32 PM To: 'Tomcat Users List' Subject: RE: Problem with error-page Doooh. My quick guess was not right, then:). Sorry. -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: May 20, 2004 14:48 To: 'Tomcat Users List' Subject: RE: Problem with error-page DOH! prepend is what I meant to say. -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Thursday, May 20, 2004 3:45 PM To: 'Tomcat Users List' Subject: RE: Problem with error-page I had never thought of that! But when I tested it, it seems that JASPER appends a _, and so a JSP page that starts with a number should still work. - 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: Problem with error-page
I'm not shure about the response code that is returned in both cases. It's possible that tomcat returns a different response code for a html and a jsp. (Like 200 for html because the html error page was found and some other value for the jsp because the jsp explicitly sets an response code.) Some recommendations to verify that: - Listen with a tcp monitor and watch the headers. - Use a browser (or other tool like telnet) that is able to display the headers . -Original Message- From: Jim Kennedy [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 6:30 PM To: 'Tomcat Users List' Subject: RE: Problem with error-page The suggestion to change 403.jsp to something like _403.jsp did not work. I did however change my browser setting in the advanced section concerning friendly error messages. This did work. I still don't understand why the IE browser distinguishes between an HTML error page and a JSP error page. The browser, it would seem to me, would not be aware of that. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pass info between Tomcat Valve and Filter
Hi Jon All, Thanks for your information. It's very helpful. I've been looking at ValveContext but did not find anything useful. Yes, I tried to pass the info object along as an attribute of ServletRequest. But problem occured with the retrieval of the object in the Filter, where ServletRequest.getAttribute() successfully located my attribute, but promtted a ClassCastException when the returned Object was casted back to the original info class. It seems Tomcat somehow lost the class structure of the original info class...? Anyone got a clue of this? Many thanks. Rui On Fri, 21 May 2004, Jon Wingfield wrote: An invocation of a Tomcat Valve gives you a Request object. This is a facade to a ServletRequest, which you can access via the getRequest() method. You could set your info object as an attribute on the ServletRequest. This should then be visible to your filter. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/index.html Just curious, why the custom Valve? Jon Rui Zhang wrote: Hi all, I'm trying to pass some info (say, as an Object) between a valve and a filter. Is anyone aware of a effective way to do this within the context of Tomcat? Many thanks. Best, Rui - 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: Pass info between Tomcat Valve and Filter
Jon, To answer your query, I'm using a custom valve to instrument Tomcat with response time monitoring, as part of the project I'm working on... http://web.comlab.ox.ac.uk/oucl/research/areas/softeng/eWLM/ Cheers, Rui On Fri, 21 May 2004, Jon Wingfield wrote: An invocation of a Tomcat Valve gives you a Request object. This is a facade to a ServletRequest, which you can access via the getRequest() method. You could set your info object as an attribute on the ServletRequest. This should then be visible to your filter. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/index.html Just curious, why the custom Valve? Jon Rui Zhang wrote: Hi all, I'm trying to pass some info (say, as an Object) between a valve and a filter. Is anyone aware of a effective way to do this within the context of Tomcat? Many thanks. Best, Rui - 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: Pass info between Tomcat Valve and Filter
One possible cause: The component that store your object find the class through a different classloader than the component that tries to retrieve the object. Where do you store the class/jar for the stored object ? -Original Message- From: Rui Zhang [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 6:53 PM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: Pass info between Tomcat Valve and Filter Hi Jon All, Thanks for your information. It's very helpful. I've been looking at ValveContext but did not find anything useful. Yes, I tried to pass the info object along as an attribute of ServletRequest. But problem occured with the retrieval of the object in the Filter, where ServletRequest.getAttribute() successfully located my attribute, but promtted a ClassCastException when the returned Object was casted back to the original info class. It seems Tomcat somehow lost the class structure of the original info class...? Anyone got a clue of this? Many thanks. Rui On Fri, 21 May 2004, Jon Wingfield wrote: An invocation of a Tomcat Valve gives you a Request object. This is a facade to a ServletRequest, which you can access via the getRequest() method. You could set your info object as an attribute on the ServletRequest. This should then be visible to your filter. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/index.html Just curious, why the custom Valve? Jon Rui Zhang wrote: Hi all, I'm trying to pass some info (say, as an Object) between a valve and a filter. Is anyone aware of a effective way to do this within the context of Tomcat? Many thanks. Best, Rui - 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: Pass info between Tomcat Valve and Filter
Rui Zhang wrote: Hi Jon All, Thanks for your information. It's very helpful. I've been looking at ValveContext but did not find anything useful. Yes, I tried to pass the info object along as an attribute of ServletRequest. But problem occured with the retrieval of the object in the Filter, where ServletRequest.getAttribute() successfully located my attribute, but promtted a ClassCastException when the returned Object was casted back to the original info class. It seems Tomcat somehow lost the class structure of the original info class...? Anyone got a clue of this? Sounds like a ClassLoader problem. The valve is going to use tomcat's libraries. The filter will use the webapps's libraries, in preference to tomcat's libraries. If the class is in the webapp's libraries, it's going to try to cast it to an instance of the webapp version of the class, which will be different from the version the valve created. (Classes with different classloaders are different, even if they happen to be identical.) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with error-page
Could be the size of the generated page. Check the thread I started about the different problem with the error-page. In order for IE not to hijack it it s/b bigger than 500k. see this url http://www.404-error-page.com/404-error-page-too-short-problem-microsoft-ie.shtml |-+ | | Jim Kennedy| | | [EMAIL PROTECTED]| | | ring.com| | || | | 05/21/2004 12:30 | | | PM | | | Please respond to| | | Tomcat Users| | | List| | || |-+ ---| | | | To: 'Tomcat Users List' [EMAIL PROTECTED] | | cc: | | Subject: RE: Problem with error-page | ---| The suggestion to change 403.jsp to something like _403.jsp did not work. I did however change my browser setting in the advanced section concerning friendly error messages. This did work. I still don't understand why the IE browser distinguishes between an HTML error page and a JSP error page. The browser, it would seem to me, would not be aware of that. Here's the first message again: I am trying to configure a custom error page when users try to access an area of my site that they don't have sufficient rights to access. The book says this to configure this in web.xml: error-page error-code403/error-code location/error/403.jsp/location /error-page This doesn't work for me, but error-page error-code403/error-code location/error/403.html/location /error-page Does work. Is there a problem with using JSP's. I'm am using JBOSS with Tomcat, but that shouldn't matter. It's still the Tomcat engine. I'm also using Struts. I'm using Tomcat 4.1.24. -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, May 20, 2004 5:32 PM To: 'Tomcat Users List' Subject: RE: Problem with error-page Doooh. My quick guess was not right, then:). Sorry. -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: May 20, 2004 14:48 To: 'Tomcat Users List' Subject: RE: Problem with error-page DOH! prepend is what I meant to say. -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Thursday, May 20, 2004 3:45 PM To: 'Tomcat Users List' Subject: RE: Problem with error-page I had never thought of that! But when I tested it, it seems that JASPER appends a _, and so a JSP page that starts with a number should still work. - 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]
org.apache.jasper.JasperException: Unable to compile class for JSP
Hi, and thanks for reading this query - it isn't (at least to me) anything to do with putting tools.jar into web-inf/lib, or anywhere else, for that matter. Here is the problem: 2004-05-22 02:25:00 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP No Java compiler was found to compile the generated source for the JSP. This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK to the common/lib directory of the Tomcat server, followed by a Tomcat restart. If using an alternate Java compiler, please check its installation and access path. at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:458) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:578) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:696) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677) at java.lang.Thread.run(Thread.java:536) Here is what has been happening: I am doing a thesis involving using tomcat+hibernate+mysql to create a web-site that auto-marks web applications. Using Tomcat ver. 5. Until yesterday I could fire up tomcat, run my code, make changes to .jsp and .java files and, without restarting tomcat, see the changes. Yes, tools.jar, and in fact ALL the necessary jar files for rinning my app are in the right place. The application has been running smoothly for about 2 months now. Today I began to use ant (in a java file - by importing org.apache.tools.ant.*) to deploy .war files in a particular directory when I wanted to. To do so appeared to require the use of a manager setting, so I made on up, and added it to TOMCAT_HOME\conf\tomcat-users.xml. Here is the entry: user username=andrew password=iyer roles=manager/ Which was put with the other entries. NOW when I went to the website 1.jsp in TOMCAT_HOME\webapps\thesis (contents as follows) I got the above org.apache.jasper.JasperException: Unable to compile class for JSP error. 1.jsp: %@ page language=java contentType = text/html% %@
Re: Pass info between Tomcat Valve and Filter
Yes, indeed. I got around it by retrieving the info using getClass(), getField() etc. Thanks again. Rui On Fri, 21 May 2004, Carl Howells wrote: Rui Zhang wrote: Hi Jon All, Thanks for your information. It's very helpful. I've been looking at ValveContext but did not find anything useful. Yes, I tried to pass the info object along as an attribute of ServletRequest. But problem occured with the retrieval of the object in the Filter, where ServletRequest.getAttribute() successfully located my attribute, but promtted a ClassCastException when the returned Object was casted back to the original info class. It seems Tomcat somehow lost the class structure of the original info class...? Anyone got a clue of this? Sounds like a ClassLoader problem. The valve is going to use tomcat's libraries. The filter will use the webapps's libraries, in preference to tomcat's libraries. If the class is in the webapp's libraries, it's going to try to cast it to an instance of the webapp version of the class, which will be different from the version the valve created. (Classes with different classloaders are different, even if they happen to be identical.) - 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: Quiestion about Average cluster serialize/send
Nr of bytes sent=369314 over 400 ==923 bytes/request average number of bytes sent over in each replication request INFO: Average cluster serialize/send time=91 ms for 400 requests (36640ms) the average time it takes to perform a replication request. IE, this is the overhead you have per request when using clustering. 91ms, this time includes: 1. Serialize the request 2. Send the request over to the other server 3. Deserialize and recreate the request (including invoke any listeners on the session) on the other server 4. Send a ACK message back to the original server 5. Receive the ACK message Usually what takes time is the deserialization of the request. Send us info on the two machines and the two configurations Filip -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 10:10 AM To: 'Tomcat Users List' Subject: Quiestion about Average cluster serialize/send Hello I got clustering up last night. In the log file I am seeing some thing that I was wondering if someone could help explain. What concerns me is the difference in Average cluster Is this the time it takes to serialize and send over the session info? I am trying to understand where the problem is? Thanks Box 1 log file snippet May 21, 2004 1:17:19 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=245486 over 200 ==1227 bytes/request May 21, 2004 1:19:24 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=120 ms for 300 requests (36046ms). May 21, 2004 1:36:31 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=302688 over 300 ==1008 bytes/request May 21, 2004 1:50:09 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=369314 over 400 ==923 bytes/request May 21, 2004 2:13:33 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=91 ms for 400 requests (36640ms). Box 2 log file snippet May 21, 2004 1:39:17 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=9 ms for 100 requests (947ms). May 21, 2004 1:54:41 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=158650 over 200 ==793 bytes/request May 21, 2004 2:30:03 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=216767 over 300 ==722 bytes/request May 21, 2004 3:28:29 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=283745 over 400 ==709 bytes/request May 21, 2004 4:16:34 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=9 ms for 200 requests (1846ms). May 21, 2004 4:31:52 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=354565 over 500 ==709 bytes/request May 21, 2004 5:13:15 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=436113 over 600 ==726 bytes/request May 21, 2004 5:40:14 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=8 ms for 300 requests (2401ms). May 21, 2004 5:42:29 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=511204 over 700 ==730 bytes/request May 21, 2004 6:04:17 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=587590 over 800 ==734 bytes/request May 21, 2004 6:30:18 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=657453 over 900 ==730 bytes/request - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pass info between Tomcat Valve and Filter
Cool. I guess a Valve is good for that type of thing :) I think Carl and Ralph are right about the ClassClassException being a ClassLoader issue. I've seen similar things before when using custom Realms, JNDI resources etc. Our build process generates a minimal jar for deploying to common/lib which contains all the classes needed by the container classloaders. These classes are excluded from the webapp jars and all is happy. You have to be really careful about dependencies though or virtually all your webapp ends up in common/lib. Try jarring up your info object and putting in common/lib (or common/classes). Or you could use reflection as I've just read in your reply to Ralph ;) Good weekend all, Jon Rui Zhang wrote: Jon, To answer your query, I'm using a custom valve to instrument Tomcat with response time monitoring, as part of the project I'm working on... http://web.comlab.ox.ac.uk/oucl/research/areas/softeng/eWLM/ Cheers, Rui On Fri, 21 May 2004, Jon Wingfield wrote: An invocation of a Tomcat Valve gives you a Request object. This is a facade to a ServletRequest, which you can access via the getRequest() method. You could set your info object as an attribute on the ServletRequest. This should then be visible to your filter. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/index.html Just curious, why the custom Valve? Jon Rui Zhang wrote: Hi all, I'm trying to pass some info (say, as an Object) between a valve and a filter. Is anyone aware of a effective way to do this within the context of Tomcat? Many thanks. Best, Rui - 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: RE: RE: Re: Tricky situation
Nice to know that... its really exciting... Can you please send me the nsapi_redirect.dll.. I am not able to find this download anywhere in the internet :(. Thanks a lot for you immediate response. Raj --- Read about the NSAPI redirector in the JK documentaton: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/neshowto.html This covers the connector as well as the magnus.conf and obj.conf changes you need to make to redirect to Tomcat. Just make sure that you have a NameTrans directive for requests from=/*.jsp. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: Rajesh_Narayanan [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 10:00 AM To: '[EMAIL PROTECTED]' Cc: Benjamin Armintor Subject: Re: RE: Re: Tricky situation Yes thats a good idea.. I am very much interested to know how have you done that using iPlanet... I will try the same over here (can u pls give the exact file name and command u used) our corporate vision is to remove iPlanet and want to use tomcat for serving pages in the future... [So I keep this thread still open for ideas] -Raj Why not just leave the JSP's in the iPlanet docroot, but use a service directive for the .jsp file extension to send all of those requests to Tomcat? Then you just need to make the iPlanet docroot the docbase for the root webapp in Tomcat. That's what I'm doing with iPlanet 6 right now, and it seems to be working just fine. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: Rajesh_Narayanan [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 9:24 AM To: '[EMAIL PROTECTED]' Cc: 'Tim Funk ' Subject: Re: Re: Tricky situation Tim, I want Tomcat to pick .jsp's from c:\workspace and other files like .html, .gif from c:\iplanet\server\docs is that possible - Raj why not Context path= reloadable=true docBase=C:\iplanet\server\docs / -Tim Rajesh_Narayanan wrote: I have to configure my tomcat to look into two different directories for file availability. Scenario: I have a different webserver iplanet with docroot say C:\iplanet\server\docs... I hv my tomcat installed in c:\tomcat lets assume that a user try to access http:\\localhost:8080\a (where a is a directory in iplanet docroot..) I want tomcat to pick that(index.html) up from iplanet docroot how can i do that?.. I already configured my context path like this Context path= reloadable=true docBase=C:\workspace / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. ** - 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 email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.
RE: CGIServlet -- tomcat
Alex, I have been looking after the CGI servlet for the last few months. If you look in CVS you'll see my name against most of the changes. Sorry I didn't see your early posts on the user list. I do keep my eyes open for anything CGI servlet related and must have missed it. Is the header issue the only one? I am no perl expert, so if you could post a complete (but as simple as possible) script test case that doesn't work that would be a big help. Mark -Original Message- From: Alex [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 2:50 PM To: Tomcat Users List Subject: RE: CGIServlet -- tomcat * h3TODO:/h3 * ul * li Support for setting headers (for example, Location headers don't work) Taken from the CGIServlet code. Given this, if i have a piece of perl that is doing the below and is being pushed through the cgiservlet: print $q-header(-type = image/png, -expires = $expire{$CGI::png}); is not going to work? - 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: Quiestion about Average cluster serialize/send
Thanks for any help These are two identical machines Rh9 Apache2 Tomcat 5.0.24 with hotfix Connected by gigaBit ethernet nics and switches. Box 1 is using mod_jk Box 2 is using mod_jk2 Box 1 has the real docroot Box 2 has box1 docroot mounted nfs (from previous message) Box 1 INFO: Average cluster serialize/send time=120 ms for 300 requests (36046ms). Box 2 INFO: Average cluster serialize/send time=8 ms for 300 requests (2401ms). As an FYI these are real servers in an LVS env. Both Boxes have same Cluster entries (different tcpListenAddress) Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.4 mcastPort=45564 mcastFrequency=500 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=192.168.0.203 tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;.*\.pdf;/ /Cluster -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 12:46 PM To: Tomcat Users List Subject: RE: Quiestion about Average cluster serialize/send Nr of bytes sent=369314 over 400 ==923 bytes/request average number of bytes sent over in each replication request INFO: Average cluster serialize/send time=91 ms for 400 requests (36640ms) the average time it takes to perform a replication request. IE, this is the overhead you have per request when using clustering. 91ms, this time includes: 1. Serialize the request 2. Send the request over to the other server 3. Deserialize and recreate the request (including invoke any listeners on the session) on the other server 4. Send a ACK message back to the original server 5. Receive the ACK message Usually what takes time is the deserialization of the request. Send us info on the two machines and the two configurations Filip -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 10:10 AM To: 'Tomcat Users List' Subject: Quiestion about Average cluster serialize/send Hello I got clustering up last night. In the log file I am seeing some thing that I was wondering if someone could help explain. What concerns me is the difference in Average cluster Is this the time it takes to serialize and send over the session info? I am trying to understand where the problem is? Thanks Box 1 log file snippet May 21, 2004 1:17:19 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=245486 over 200 ==1227 bytes/request May 21, 2004 1:19:24 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=120 ms for 300 requests (36046ms). May 21, 2004 1:36:31 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=302688 over 300 ==1008 bytes/request May 21, 2004 1:50:09 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=369314 over 400 ==923 bytes/request May 21, 2004 2:13:33 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=91 ms for 400 requests (36640ms). Box 2 log file snippet May 21, 2004 1:39:17 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=9 ms for 100 requests (947ms). May 21, 2004 1:54:41 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=158650 over 200 ==793 bytes/request May 21, 2004 2:30:03 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=216767 over 300 ==722 bytes/request May 21, 2004 3:28:29 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=283745 over 400 ==709 bytes/request May 21, 2004 4:16:34 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=9 ms for 200 requests (1846ms). May 21, 2004 4:31:52 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=354565 over 500 ==709
RE: webdav servlet problems with Tomcat 5.0.24 and IE
From: Roy Gardner [mailto:[EMAIL PROTECTED] Do you know how the TC4 handles the redirection issue? We have a webapp to which we are adding webdav support. Our webdav implementation has exactly the same problem as the TC5 implementation when using IE clients. If we set the url-pattern to /* we break our webapp. From what I recall TC4 doesn't actually do a redirection, it handles it inside the mapper. TC5 Sends a 302 - this is what IE seems to have difficulty with in some circumstances although I can't replicate the error now with either mapping. I have searched bugzilla for this and there is more info at http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26449 from the last time I looked at this. The essence is that welcome file behaviour also causes problems. Try specifying welcome-file /. - does it work if you run TC5 on a windows box? Have not tried this. I'll install on one of our boxes and test. Let me know how this goes. What happened with the telnet tests? Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RE: RE: Re: Tricky situation
Anyway Thanks a lot I really appreciate your help. I will try that and post the result soon. Thanks once again. -Raj Sorry: I work in a unix shop. The instructions to build the dll are on the NSAPI redirector documentation page (at the bottom). Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: Rajesh_Narayanan [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 1:16 PM To: '[EMAIL PROTECTED]' Cc: Benjamin Armintor Subject: Re: RE: RE: Re: Tricky situation Nice to know that... its really exciting... Can you please send me the nsapi_redirect.dll.. I am not able to find this download anywhere in the internet :(. Thanks a lot for you immediate response. Raj --- Read about the NSAPI redirector in the JK documentaton: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/neshowto.html This covers the connector as well as the magnus.conf and obj.conf changes you need to make to redirect to Tomcat. Just make sure that you have a NameTrans directive for requests from=/*.jsp. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: Rajesh_Narayanan [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 10:00 AM To: '[EMAIL PROTECTED]' Cc: Benjamin Armintor Subject: Re: RE: Re: Tricky situation Yes thats a good idea.. I am very much interested to know how have you done that using iPlanet... I will try the same over here (can u pls give the exact file name and command u used) our corporate vision is to remove iPlanet and want to use tomcat for serving pages in the future... [So I keep this thread still open for ideas] -Raj Why not just leave the JSP's in the iPlanet docroot, but use a service directive for the .jsp file extension to send all of those requests to Tomcat? Then you just need to make the iPlanet docroot the docbase for the root webapp in Tomcat. That's what I'm doing with iPlanet 6 right now, and it seems to be working just fine. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: Rajesh_Narayanan [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 9:24 AM To: '[EMAIL PROTECTED]' Cc: 'Tim Funk ' Subject: Re: Re: Tricky situation Tim, I want Tomcat to pick .jsp's from c:\workspace and other files like .html, .gif from c:\iplanet\server\docs is that possible - Raj why not Context path= reloadable=true docBase=C:\iplanet\server\docs / -Tim Rajesh_Narayanan wrote: I have to configure my tomcat to look into two different directories for file availability. Scenario: I have a different webserver iplanet with docroot say C:\iplanet\server\docs... I hv my tomcat installed in c:\tomcat lets assume that a user try to access http:\\localhost:8080\a (where a is a directory in iplanet docroot..) I want tomcat to pick that(index.html) up from iplanet docroot how can i do that?.. I already configured my context path like this Context path= reloadable=true docBase=C:\workspace / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. ** - 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 email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard
RE: Quiestion about Average cluster serialize/send
and your loadbalancing algorithm is distributing the requests equally. also, in a previous email you wrote They are diffent sized boxes what does that mean? Filip -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Quiestion about Average cluster serialize/send Thanks for any help These are two identical machines Rh9 Apache2 Tomcat 5.0.24 with hotfix Connected by gigaBit ethernet nics and switches. Box 1 is using mod_jk Box 2 is using mod_jk2 Box 1 has the real docroot Box 2 has box1 docroot mounted nfs (from previous message) Box 1 INFO: Average cluster serialize/send time=120 ms for 300 requests (36046ms). Box 2 INFO: Average cluster serialize/send time=8 ms for 300 requests (2401ms). As an FYI these are real servers in an LVS env. Both Boxes have same Cluster entries (different tcpListenAddress) Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.4 mcastPort=45564 mcastFrequency=500 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=192.168.0.203 tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;.*\.pdf;/ /Cluster -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 12:46 PM To: Tomcat Users List Subject: RE: Quiestion about Average cluster serialize/send Nr of bytes sent=369314 over 400 ==923 bytes/request average number of bytes sent over in each replication request INFO: Average cluster serialize/send time=91 ms for 400 requests (36640ms) the average time it takes to perform a replication request. IE, this is the overhead you have per request when using clustering. 91ms, this time includes: 1. Serialize the request 2. Send the request over to the other server 3. Deserialize and recreate the request (including invoke any listeners on the session) on the other server 4. Send a ACK message back to the original server 5. Receive the ACK message Usually what takes time is the deserialization of the request. Send us info on the two machines and the two configurations Filip -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 10:10 AM To: 'Tomcat Users List' Subject: Quiestion about Average cluster serialize/send Hello I got clustering up last night. In the log file I am seeing some thing that I was wondering if someone could help explain. What concerns me is the difference in Average cluster Is this the time it takes to serialize and send over the session info? I am trying to understand where the problem is? Thanks Box 1 log file snippet May 21, 2004 1:17:19 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=245486 over 200 ==1227 bytes/request May 21, 2004 1:19:24 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=120 ms for 300 requests (36046ms). May 21, 2004 1:36:31 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=302688 over 300 ==1008 bytes/request May 21, 2004 1:50:09 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=369314 over 400 ==923 bytes/request May 21, 2004 2:13:33 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=91 ms for 400 requests (36640ms). Box 2 log file snippet May 21, 2004 1:39:17 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=9 ms for 100 requests (947ms). May 21, 2004 1:54:41 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=158650 over 200 ==793 bytes/request May 21, 2004 2:30:03 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=216767 over 300 ==722 bytes/request May 21, 2004 3:28:29 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes
Re: Pass info between Tomcat Valve and Filter
Hi All, Thanks very much for your incisive comments. Similar problem, but it seems much trickier to pass info from a Filter to a Valve. No attribute is associated with a ServletResponse. And when I try to cast it to HttpServletResponse to make use of its addHeader() method, my program simply hangs... Any clue? Thanks again. Best, Rui On Fri, 21 May 2004, Jon Wingfield wrote: Cool. I guess a Valve is good for that type of thing :) I think Carl and Ralph are right about the ClassClassException being a ClassLoader issue. I've seen similar things before when using custom Realms, JNDI resources etc. Our build process generates a minimal jar for deploying to common/lib which contains all the classes needed by the container classloaders. These classes are excluded from the webapp jars and all is happy. You have to be really careful about dependencies though or virtually all your webapp ends up in common/lib. Try jarring up your info object and putting in common/lib (or common/classes). Or you could use reflection as I've just read in your reply to Ralph ;) Good weekend all, Jon Rui Zhang wrote: Jon, To answer your query, I'm using a custom valve to instrument Tomcat with response time monitoring, as part of the project I'm working on... http://web.comlab.ox.ac.uk/oucl/research/areas/softeng/eWLM/ Cheers, Rui On Fri, 21 May 2004, Jon Wingfield wrote: An invocation of a Tomcat Valve gives you a Request object. This is a facade to a ServletRequest, which you can access via the getRequest() method. You could set your info object as an attribute on the ServletRequest. This should then be visible to your filter. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/index.html Just curious, why the custom Valve? Jon Rui Zhang wrote: Hi all, I'm trying to pass some info (say, as an Object) between a valve and a filter. Is anyone aware of a effective way to do this within the context of Tomcat? Many thanks. Best, Rui - 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]
nsapi_redirect.dll
Can any one send me a copy of nsapi_redirect.dll, I am not able to find any precompiled binary version and also I dont have VC++ to compile the source. I would really appreciate if anybody can help me. Thanks, Raj* * This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jakarta-tomcat-5.0.24.tar.gz really a Windows Dist?
Maybe a silly question. Seems the jakarta-tomcat-5.0.24.tar.gz is really a Windows binary distribution. And then the jakarta-tomcat-5.0.24.zip contains both Windows and Unix distribution. Am I out of my mind here or can someone please confirm what I'm seeing is true? Thanks. Dan Barron - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]