client disconnect
Yoav, I understand that the spec says that the container may throw an exception at client disconnection. I understand it and I will cope with that. Wat was unbelievable to me was that even when the other side of the stream is clearly closed you can still write in it and flush it without it telling to you nada. zip. So you are sure that what you wrote arived safely to the other side. and guess what . In fact it didn't. I don't think you as a programmer would like to rely on such infrastructure. Whatever the specs may say.
RE: RE: Please introduce a good Tomcat debug tool
NetBeans is also a good IDE for Tomcat 5.0.x development Regards. Mariano López -Mensaje original- De: deepak shripat mane [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 16 de junio de 2004 6:26 Para: Tomcat Users List Asunto: Re: RE: Please introduce a good Tomcat debug tool Hii.. You can use Eclipse or JBuilder with tomcat server for debugging and Tracing servlet and JSP Page or u can use third party tool for program Deepak On Wed, 16 Jun 2004 Michael Cardon wrote : I use eclipse with the 'myeclipse' plug-in. see www.eclipse.org and www.myeclipseide.com -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 15, 2004 12:13 PM To: Tomcat Users List Subject: Please introduce a good Tomcat debug tool I currently run Tomcat 4.1.9 (without apache) to run JSP and ervlet. How to debug JSP and Servelt in TOMCAT? 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How can I access a file located in WEB-INF
Hi, I need to access a file located in the directory WEB-INF of my web application. In fact, in WEB-INF/conf. How can I open this file in one of my servlet ? Any advise is welcome. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: high server load
I configured the fork-setting to true and the load went down from 10 to 1.5 so the configuration helped a lot. Also the server availibility was enhanced. Is there still another configuration parameter which could decrease the load under 1.0 or do we need to buy better hardware ;) So thank you for your help, Jouko Shapira, Yoav wrote: Hi, It's kind of hard to help with a non-existent tomcat version ;) Do things improve if you set fork to true for your JSP servlet? Tomcat 4 and 5 have different memory models, different optimization, etc, so the performance characteristics for the same app under the same load will not be the same between them. They should be better in tomcat 5, of course. Yoav Shapira Millennium Research Informatics -Original Message- From: Jouko Johansson [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 15, 2004 6:18 AM To: Tomcat Users List Subject: high server load Hi, I have experienced some problems while testing the tomcat 5.0.28 on linux. After the restart the tomcat is running without any problems. After 3 to 4 hours the server load starts to increase. Even though the server load is very high (30), the tomcat response time is very good. I assume that there is a some kind of problem with background thread which increases the load because the server still provides the service. I have decreased the server load to 10 with configuring the maxSpareThread-value to same as maxThreads-value. The server handles about 10-20 req/sec, so maybe the maxThreads-value is too high. The same web application is running fluently with version 4.0.6 on another application server. The garbage collection takes about 0.1 secs to complete and full garbage collection takes about 1-2 seconds. The running java process count is 222. I included changes to the configuration files which I have done: System information: Linux 2.4.18 #1 Fri May 17 17:08:04 EEST 2002 java version 1.4.2_03 tomcat 5.0.28 I have added following lines to catalina.sh : ulimit -s 2048 # suggested on Release-notes JAVA_OPTS=-Xms512M -Xmx1024M -server -verbose:gc # provide more memory and inform about the garbage collection export LD_ASSUME_KERNEL=2.2.5 # suggested on Release-notes server.xml looks like this: Connector port=8080 maxThreads=200 minSpareThreads=100 maxSpareThreads=200 enableLookups=false redirectPort=8443 acceptCount=75 debug=0 connectionTimeout=2 proxyPort=80 proxyName=www.our_service_name.com disableUploadTimeout=false / Context path= docBase=/doc/path debug=0 reloadable=false liveDeploy=false swallowOutput=false / web.xml looks like this: servlet servlet-namejsp/servlet-name servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class init-param param-namefork/param-name param-valuefalse/param-value /init-param init-param param-namexpoweredBy/param-name param-valuefalse/param-value /init-param init-param param-nameenablePooling/param-name param-valuefalse/param-value /init-param load-on-startup3/load-on-startup /servlet I am running out of configuration ideas so I hope somebody could provide information about the load problem Yours, - Jouko --- Jouko Johansson software engineer Infosto Oy / SanomaWSOY konserni Pyhäranta 7, 33211 Tampere, Finland Email: [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] -- --- Jouko Johansson software engineer Infosto Oy / SanomaWSOY konserni Pyhäranta 7, 33211 Tampere, Finland Email: [EMAIL PROTECTED] Puh : +358 3 2524 525 Mob :+358 40 578 57 58 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting JAVA_HOME and CATALINA_HOME on XP
On WinXP you will want to set these in the Environment Variables located under properties of My Computer. You can get there by right clicking on the My Computer icon and selecting properties. When the new window comes up click on the Advance tab and then select the Environment Variables button located at the bottom of the screen. This is where you will set up the new System Variables for the applications. CATALINA_HOME and JAKARTA_HOME as System variables click on the new button and then insert the information required. For example: Variable Name: CATALINA_HOME Variable Value: c:\tomcat Variable Value being the root directory for the tomcat installation. This may differ with your setup. Let me know if you have any questions on this. Jason L. West, Sr. Internet Application Specialist, Sr. Bader Qurashi wrote on 6/16/2004, 01:45: Hi, I want to run servlets and JSP pages on tomcat but I am having problems with the installation of tomcat. I am not sure how to configure the JAVA_HOME and CATALINA_HOME envioronment variables could someone help me with this. I have tried google and yahoo search and tried configuring it to some of the recommendation but to no avail. Thanks, Bader __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting JAVA_HOME and CATALINA_HOME on XP
Hi.. For setting CATALINA_HOME and JAVA_HOME For windows-98 u can open autoexec.bat file for Windows XP/2000 go to control panel select System then select Advanced then select Environment variables u can set JAVA_HOME=installation directory CATALINA_HOME=tomcat installation path Deepak On Wed, 16 Jun 2004 Bader Qurashi wrote : Hi, I want to run servlets and JSP pages on tomcat but I am having problems with the installation of tomcat. I am not sure how to configure the JAVA_HOME and CATALINA_HOME envioronment variables could someone help me with this. I have tried google and yahoo search and tried configuring it to some of the recommendation but to no avail. Thanks, Bader __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can I access a file located in WEB-INF
u can define path variable into web.xml file and u can call this path variable into ur servlet file. Deepak On Wed, 16 Jun 2004 STOCKHOLM,Raymond wrote : Hi, I need to access a file located in the directory WEB-INF of my web application. In fact, in WEB-INF/conf. How can I open this file in one of my servlet ? Any advise is welcome. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Embed Tomcat Question
Can an existing web app which use listener and filter etc, be deployed without any changes in a new embedded tomcat enviroment? I'm having troubles with the new embedded tomcat environment. Any guidance? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache, tomcat and ajp13
I put i httpd.conf this: LocationMatch ^/doc Allow from all /LocationMatch Alias /doc /usr/local/apache2/htdocs Directory usr/local/apache2/htdocs allow from all /Directory LocationMatch (?!^/doc) JkUriSet worker ajp13:localhost:8009 /LocationMatch But, all request go to TOMCAT Moreover i want this www.site.com/doc/*** So, when a user connect to web www.site.com -- tomcat www.site.com/doc/* -- apache php Some another idea -Mensaje original- De: Elijah Epifanov [mailto:[EMAIL PROTECTED] Enviado el: dimecres, 16 / juny / 2004 00:01 Para: Tomcat Users List Asunto: Re: Apache, tomcat and ajp13 Delete [uri:/*] section from your worker2.properties file, and use httpd.conf instead (I think it's more correct approach): LocationMatch (?!^/doc) JkUriSet worker ajp13:localhost:8009 /LocationMatch LocationMatch ^/doc php stuff /LocationMatch - Original Message - From: Sez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 15, 2004 7:23 PM Subject: Apache, tomcat and ajp13 Hi people! I have a apache and tomcat working together. In worker2.properties i have [uri:/*] worker=ajp13:localhost:8009 It pass all connections to tomcat. Now, i want that some connections go to apache with php and others to tomcat. www.site.com/doc --apache and php www.site.com/* -- tomcat I want that anything go to tomcat, except the doc folder... It's possible? HOw can i configure workers2.properties? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Error in Building JK2 on HP-UX 11.22/23
Hi, Im building Apache and JK2 on multiple platform. I have built successfully on HP-UX11.0, Solaris 8, Debian Linux and Windows. :) However, I'm not able to compile jk2 connector on HP-UX 11.22 itanium. Any one built on HP-UX 11.22? Here is the make output of JK2 Thanks and Regards, Yuvi (0) 0x057ab920 _ZN12ErrorHandler9toolErrorE11StringTokenRK8Positionz + 0x180 [/opt/ansic/lbin/ctcom] (1) 0x05690e30 fe_message + 0x7c0 [/opt/ansic/lbin/ctcom] (2) 0x05a4e9a0 _Z16UT_AssertFailurePKci + 0x120 [/opt/ansic/lbin/ctcom] (3) 0x052d89b0 _Z42TCG_Declare_Integer_Constant_From_Unsignedjyj + 0x310 [/opt/ansic/lbin/ctcom] (4) 0x05956920 convertToU2Bool + 0x8e0 [/opt/ansic/lbin/ctcom] (5) 0x0512c550 _ZN7Convert8emitCodeEv + 0xc10 [/opt/ansic/lbin/ctcom] (6) 0x051a7470 _ZN3Not8emitCodeEv + 0x90 [/opt/ansic/lbin/ctcom] (7) 0x051a1070 _ZN17ConditionalBranch20emitCodeForStatementEv + 0x90 [/opt/ansic/lbin/ctcom] (8) 0x050e00c0 _ZN9Statement14emitCodeDriverEj + 0x380 [/opt/ansic/lbin/ctcom] (9) 0x052a0750 _ZN8Function6doCodeEv + 0xc80 [/opt/ansic/lbin/ctcom] (10) 0x05431080 _ZN8Function4codeEv + 0xe0 [/opt/ansic/lbin/ctcom] (11) 0x051acb80 _ZN8Compiler26ProcessExternalDeclarationEP11Declarationb + 0x530 [/opt/ansic/lbin/ctcom] (12) 0x050bdff0 _ZN8Compiler30ProcessExternalDeclarationListEP11Declaration + 0x310 [/opt/ansic/lbin/ctcom] (13) 0x05044640 _Z12doReduction1iR12ScannerValuePS_ + 0x920 [/opt/ansic/lbin/ctcom] (14) 0x05080f00 _Z7yyparsev + 0xff0 [/opt/ansic/lbin/ctcom] (15) 0x055aa640 _ZN8Compiler9DoCompileEv + 0x390 [/opt/ansic/lbin/ctcom] (16) 0x0562a0b0 _ZN8Compiler9DoCompileEP6Buffer + 0xd0 [/opt/ansic/lbin/ctcom] (17) 0x055e4770 _ZN8Compiler13DoCompileFileEPc + 0x230 [/opt/ansic/lbin/ctcom] (18) 0x055e1120 main + 0xac0 [/opt/ansic/lbin/ctcom] (19) 0x6000c006bde0 main_opd_entry + 0x50 [/usr/lib/hpux32/dld.so] Error (internal problem) 1: Exact position unknown; near [../../common/jk_logger_file.c, line 183]. # [../../common/jk_logger_file.c, line 196:7 jk2_logger_file_jkVLog] Backend Error (43746E6174736E75:0246) gmake[1]: *** [../../../build/jk2/apache2/jk_logger_file.lo] Error 1 gmake[1]: Leaving directory `.../jk2/jk/native2/server/apache2' gmake: *** [jk2-build] Error_1
Too many open files on Solaris
My application is hitting that 'too many open files' limit on Solaris. Jun 15, 2004 11:23:01 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket SEVERE: Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080] ignored exception: java.net.SocketException: Too many open files java.net.SocketException: Too many open files at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353) at java.net.ServerSocket.implAccept(ServerSocket.java:448) at java.net.ServerSocket.accept(ServerSocket.java:419) at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:107) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:387) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:557) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) Jun 15, 2004 11:23:01 AM org.apache.tomcat.util.net.PoolTcpEndpoint closeServerSocket SEVERE: Caught exception trying to unlock accept on 8080 java.net.SocketException: Too many open files Jun 15, 2004 11:23:01 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket WARNING: Reinitializing ServerSocket I realize that increasing file descriptor limit per process could help a bit, but my system administrator simply doesn't want to do that (since it requires restart). Now, the problem is how to avoid too many open files exception. Any suggestions regarding Tomcat (or Apache) configuration, coding practice, some runtime operating system parameters would be greatly appreciated. Here's my configuration: Default Solaris 8 (I believe) installation on 2CPU+4GB RAM box. TCP connection wait timeout (I believe that the correct wording) is decreased from 240sec to 60sec and that's the only parameter changed on Solaris. Tomcat 4.1.30 with j2sdk 1.4.2_04 (server mode) with Apache 2.0 as a proxy. Every single request goes through Apache which then routes it to Tomcat. 600.000 hits and cca 3GB of data daily, with peaks during working hours, of course, about 50.000 hits per hour. The delivered content consists mostly of small images (3-20k) delivered directly from a database (servlet sets content type etc, img src=/preview?id=123 style) Application lives about 24hours and then dies with the exception shown above. As far as I can see, all input- and output- streams are flushed and closed, at least in my application. Cannot guarantee for the underlining libraries. Somehow I think that I cannot squeeze the application anymore and that we're hitting tomcat+solaris limit. Ahm... whoever managed to completelly read this rather long post I hope will have some suggestions. Thanks in advance! Cheers, Davor -- Davor Cengija, [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JK2: lb_factor
Hello, I've got a cluster with 2 tomcat 2.0.25 on different machines, on one of them also running Apache 2.0.49 with JK2 as a loadbalancer. Requests get redirected to both tomcat instances, but it always ends up with around 1/3 of all requests at the local server and about 2/3 at the remote one, no matter what value the lb_factors are. So, could anyone tell me which values I should use to make the lb_factor work correctly? All information I found was that a lower value means more requests (official JK2-documentation at jakarta.apache.org). = My workers2.properties: [lb:lb] stickySession=1 # First Tomcat Instance (Localhost / 10.32.97.44) [channel.socket:localhost:8009] port=8009 host=127.0.0.1 group=lb lb_factor=1 tomcatId=tomcat01 # Second Tomcat Instance (10.32.97.23) [channel.socket:10.32.97.23:8009] port=8009 host=10.32.97.23 group=lb lb_factor=1 tomcatId=tomcat02 # define the worker for tomcat instance 1 (localhost) [ajp13:localhost:8009] channel=channel.socket:localhost:8009 # define the worker for tomcat instance 2 [ajp13:10.32.97.23:8009] channel=channel.socket:10.32.97.23:8009 #This is the application to test the cluster / load balancing... [uri:/benchmark/*] info=Benchmark application Anything wrong with that? Anything missing? If more information needed, just tell me.. I just guessed that the workers2.properties is the problem. Greets, Nicole Diese E-Mail enthalt vertrauliche und/oder rechtlich geschutzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtumlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JK2: lb_factor
The quality of the distribution depends on the worker type of apache. (AFAIK only the 'worker' MPM will work) Nevertheless AFAIK the load balancing in mod_jk is not complete in this area, so I'm not shure if you will get the desired distribution (but it should be closer). -Original Message- From: Weseloh, Nicole [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 11:48 AM To: [EMAIL PROTECTED] Subject: JK2: lb_factor I've got a cluster with 2 tomcat 2.0.25 on different machines, on one of them also running Apache 2.0.49 with JK2 as a loadbalancer. Requests get redirected to both tomcat instances, but it always ends up with around 1/3 of all requests at the local server and about 2/3 at the remote one, no matter what value the lb_factors are. So, could anyone tell me which values I should use to make the lb_factor work correctly? All information I found was that a lower value means more requests (official JK2-documentation at jakarta.apache.org). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Too many open files on Solaris
I am having similar problem and i am running Tomcat 4.0 on Open vms 7.2. We have increased number of files open by a process to some ridiculous value but this error is still comming up. Can someone also help with this issue? Thanks Ajwat -Original Message- From: Davor Cengija [mailto:[EMAIL PROTECTED] Sent: 16 June 2004 09:59 To: [EMAIL PROTECTED] Subject: Too many open files on Solaris My application is hitting that 'too many open files' limit on Solaris. Jun 15, 2004 11:23:01 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket SEVERE: Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080] ignored exception: java.net.SocketException: Too many open files java.net.SocketException: Too many open files at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353) at java.net.ServerSocket.implAccept(ServerSocket.java:448) at java.net.ServerSocket.accept(ServerSocket.java:419) at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultSe rverSocketFactory.java:107) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java :387) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:557) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:534) Jun 15, 2004 11:23:01 AM org.apache.tomcat.util.net.PoolTcpEndpoint closeServerSocket SEVERE: Caught exception trying to unlock accept on 8080 java.net.SocketException: Too many open files Jun 15, 2004 11:23:01 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket WARNING: Reinitializing ServerSocket I realize that increasing file descriptor limit per process could help a bit, but my system administrator simply doesn't want to do that (since it requires restart). Now, the problem is how to avoid too many open files exception. Any suggestions regarding Tomcat (or Apache) configuration, coding practice, some runtime operating system parameters would be greatly appreciated. Here's my configuration: Default Solaris 8 (I believe) installation on 2CPU+4GB RAM box. TCP connection wait timeout (I believe that the correct wording) is decreased from 240sec to 60sec and that's the only parameter changed on Solaris. Tomcat 4.1.30 with j2sdk 1.4.2_04 (server mode) with Apache 2.0 as a proxy. Every single request goes through Apache which then routes it to Tomcat. 600.000 hits and cca 3GB of data daily, with peaks during working hours, of course, about 50.000 hits per hour. The delivered content consists mostly of small images (3-20k) delivered directly from a database (servlet sets content type etc, img src=/preview?id=123 style) Application lives about 24hours and then dies with the exception shown above. As far as I can see, all input- and output- streams are flushed and closed, at least in my application. Cannot guarantee for the underlining libraries. Somehow I think that I cannot squeeze the application anymore and that we're hitting tomcat+solaris limit. Ahm... whoever managed to completelly read this rather long post I hope will have some suggestions. Thanks in advance! Cheers, Davor -- Davor Cengija, [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This communication together with any attachments transmitted with it (this E-Mail) is intended only for the use of the addressee and may contain information which is privileged and confidential. If the reader of this E-Mail is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient you are hereby notified that any use, dissemination, forwarding, printing or copying of this E-Mail is strictly prohibited. Addressees should check this E-mail for viruses. The Company makes no representations as regards the absence of viruses in this E-Mail. If you have received this E-Mail in error please notify our ISe Response Team immediately by telephone on +44 (0)20 8896 5828 or via e-mail at [EMAIL PROTECTED] Please then immediately delete, erase or otherwise destroy this E-Mail and any copies of it. Any opinions expressed in this E-Mail are those of the author and do not necessarily constitute the views of the Company. Nothing in this E-Mail shall bind the Company in any contract or obligation. For the purposes of this E-Mail the Company means The Carphone Warehouse Group Plc and/or any of its subsidiaries. Please feel free to visit our website: http:// www.carphonewarehouse.com or http://www.phonehouse.com The Carphone Warehouse Group Plc (Registered in England No. 3253714) 1 Portal Way, London W3 6RS
[OT] Problem unzipping files in servlet with german umlauts in filenames of zipentries.
Hello, I hope somebody can help me with this problem. I have a servlet in my application which unzips a uploaded zip archive and stores the contained files. This works fine until the filename of a zipentry contains german umlauts. For example in a zipfile a.zip is an entry äöü.txt. When i get the ZipEntry for that file zipEntry.getName() returns me ???.txt instead of äöü.txt. I think this has something to do with the right Characterencoding but I don't know how to do it. thanks in advance Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache and Tomcat - Apache.exe application error
Greetings. I am having a problem with Apache 2.0.49 causing an Application Error on Windows. I know this is the tomcat list - but the issue ony crops up when using mod_jk2 with Tomcat - so I am posting here in case anyone has any ideas?! I have also posted a bug report on the HTTPD bugzilla. I am using Apache 2.0.49 with (major non-standard mods): mod_ssl mod_jk2 with Tomcat 5.0.x being connected to via mod_jk2. I am running on Windows XP Professional, as well as Windows 2000 Server, Windows 2000 Advanced Server, Windows 2003 Server. In all cases I have installed the Apache2 service using the Apache.exe -k install mechanism. When restarting the service using: - net stop Apache2 - The ApacheMonitor interface - The services control panel in windows I invariably get the following dialog popping up: Apache.exe - Application Error The instruction at 0x77f51baa referenced memory at 0x0010. The memory could not be written. If you cick OK or Cancel, the popup dialog eternally pops straight back up. Apache DOES actually stop and start OK - but the popup cannot be minimized, closed or anything. It is VERY annoying. Could this have to do with the Tomcat mod_jk - specifcally the sharded memory file (SHM) that both Tomcat and Apache use for workers (if I am understanding that correctly)? This bug was definitely NOT around when I was using Apache 2.0.46 and mod_jk2.02/3, but since upgrading to Apache2.0.49 and mod_jk2.04/5dev it has started. Funny thing is it does NOT happen on all servers! Any assistance would be greatly appreciated! Regards, Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Parameters and where is log
hello, this is reply to your second query. U have to use Logger tag in server.xml and in code ServletContext context; context.log(); Asim Ghosh Gabi [EMAIL PROTECTED] wrote: Trying to pass from resin to apache, in resin Coonection='jdbc:bla bla...'/ I've put the equivalent in /WEB-INF/web-xml as: Connection jdbc:bla bla... But the servlet response is a NullPointer, I think it's not taking the value from the session (HttpSession object). What am I doing wrong? The second question is that in the servlet I put a System.err.println(), I've the same server.xml like the default /examples but using my webapp in change of /examples, so I've search in catalina.out and all the localhost_admin... local_host_examples, I think I've search in all the defined logs files but I don't find the line I've print with System.err, do I've to put something more specific in web.xml or something similar? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - ALL-NEW Yahoo! Messenger - so many all-new ways to express yourself
VIRUS ALERT (mailhub esterni)
ISS Mail Filter (C) 2003 WARNING: VIRUS FOUND IN MESSAGE Subject:Re: documento From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] File: message/documento.pif Virus: [EMAIL PROTECTED] ID: 39580 Date: 20040613 (rev. 017) AntiVirus: Symantec AntiVirus Scan Engine 4.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Order of WebApp Loading
Hi Everybody I am using Tomcat 4.1.29 and i have several webapps in my application. I want to set one webapp to load first and the rest of the webapps should be loaded after it. I have tried changing the order in server.xml, but it didn'y help. Is there any way i can set the order of webapp loading ? Thanks Surendra . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Parameters and where is log
I've put the context with his own Logger, I can see all the info of this host here, and in the JavaBean code I've put ServletContext context; context=session.getServletContext(); context.log(test message!!!); But I don't see this message in the log. And, there is a global way I can define that all the System.err. output has to be printed in a text file? How? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Configuring JNDI for tomcat
Sounds like nothing's running on localhost port 1099. I'm not a Tomcat expert so I don't know if Tomcat is supposed to be exposing its Naming Service on that port. If it is, it isn't there. Dave -Original Message- From: Russ Leong [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 15, 2004 11:24 PM To: [EMAIL PROTECTED] Subject: Configuring JNDI for tomcat Hi, I am trying to configure tomcat 5.025 on W2K to be accessible by other machines via JNDI. I have tried using the registry method but am getting Connection refused. And when I try to filesystem approach I get NameNotFoundException. I am new to both Tomcat and JNDI and hope to get some pointers. The way I'm testing now(local machine first) is I run tomcat with my server resource which I want to make accessible, then I try to connect by running my client code via the java command on my command prompt. The following is how I am trying with the registry approach - (jndi.properties in C:\j2sdk1.4.2_04\jre\lib) java.naming.factory.initial=com.sun.jndi.rmi.registry.RegistryContextFactory java.naming.provider.url=rmi:localhost:1099 (iccs.xml in C:\jakarta-tomcat-5.0.25\conf\Catalina\localhost) Resource name=bean/Jndi auth=Container type=test.JndiBean/ ResourceParams name=bean/Jndi parameter namefactory/name valueorg.apache.naming.factory.BeanFactory/value /parameter parameter namebar/name value23/value /parameter /ResourceParams (JndiBean class in C:\jakarta-tomcat-5.0.25\webapps\iccs\WEB-INF\classes\test) package test; public class JndiBean { private String foo = Default Foo; public String getFoo() { return (this.foo); } public void setFoo(String foo) { this.foo = foo; } private int bar = 0; public int getBar() { return (this.bar); } public void setBar(int bar) { this.bar = bar; } } (JndiClient class in C:\jakarta-tomcat-5.0.25\webapps\iccs\WEB-INF\classes\test) package test; import javax.naming.*; public class JndiClient { public static void main(String[] args) { try { Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); JndiBean bean = (JndiBean) envCtx.lookup(bean/Jndi); System.out.println(foo = + bean.getFoo() + , bar = + bean.getBar()); } catch( Exception e ) { e.printStackTrace(); } } } And here is the error that I get C:\java -classpath C:\jakarta-tomcat-5.0.25\webapps\iccs\WEB-INF\classes test.JndiClient javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: local host; nested exception is: java.net.ConnectException: Connection refused: connect] at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:92) at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:98) at javax.naming.InitialContext.lookup(InitialContext.java:347) at test.JndiClient.main(JndiClient.java:9) Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567) at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185) at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171) at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:313) at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:88) ... 3 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) at java.net.Socket.connect(Socket.java:452) at java.net.Socket.connect(Socket.java:402) at java.net.Socket.init(Socket.java:309) at java.net.Socket.init(Socket.java:124) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128) at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562) ... 8 more Deeplyy appreciate any help from anyone. Thanks. Russ
Re: IllegalArgumentException in jsp:forward
Use your stack trace. Its being caused by: Root cause: servlets._0002fservlets_0002fshowClientSubmissions_0002ejspshowClientSub missions_jsp_0._jspService(_0002fservlets_0002fshowClientSubmissions_000 2ejspshowClientSubmissions_jsp_0.java:440) In your work directory, look for showClientSubmissions_jsp_0.java, line 440 and thats probably your problem. If it works fine on new versions of tomcat, then it may have been a bug in an older release. -Tim Giri, Sandeep wrote: Hi! The following code: jsp:forward page=myJsp.jsp / is throwing the following exception on tomcat 4.0 (perhaps): Included servlet error: 500 Location: /servlets/showClientSubmissions.jsp Error Location: /servlets/generaltemplate.jsp Internal Servlet Error: javax.servlet.ServletException at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:459) at servlets._0002fservlets_0002fshowClientSubmissions_0002ejspshowClientSub missions_jsp_0._jspService(_0002fservlets_0002fshowClientSubmissions_000 2ejspshowClientSubmissions_jsp_0.java:450) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcher Impl.java:194) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:4 21) at servlets._0002fservlets_0002flogin_0002ejsplogin_jsp_11._jspService(_000 2fservlets_0002flogin_0002ejsplogin_jsp_11.java:118) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav a:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnec tion(Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416 ) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:49 8) at java.lang.Thread.run(Thread.java:484) Root cause: java.lang.IllegalArgumentException at javax.servlet.http.HttpUtils.parseName(HttpUtils.java:285) at javax.servlet.http.HttpUtils.parseQueryString(HttpUtils.java:154) at org.apache.tomcat.facade.RequestDispatcherImpl.addQueryString(RequestDis patcherImpl.java:491) at org.apache.tomcat.facade.RequestDispatcherImpl.include(RequestDispatcher Impl.java:333) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:4 14) at servlets._0002fservlets_0002fshowClientSubmissions_0002ejspshowClientSub missions_jsp_0._jspService(_0002fservlets_0002fshowClientSubmissions_000 2ejspshowClientSubmissions_jsp_0.java:440) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcher Impl.java:194) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:4 21) at servlets._0002fservlets_0002flogin_0002ejsplogin_jsp_11._jspService(_000 2fservlets_0002flogin_0002ejsplogin_jsp_11.java:118) at
Re: How can I access a file located in WEB-INF
FAQ http://jakarta.apache.org/tomcat/faq/misc.html#getResourceAsStream -Tim STOCKHOLM, Raymond wrote: Hi, I need to access a file located in the directory WEB-INF of my web application. In fact, in WEB-INF/conf. How can I open this file in one of my servlet ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How can I access a file located in WEB-INF
Thanks -Message d'origine- De : Tim Funk [mailto:[EMAIL PROTECTED] Envoyé : mercredi 16 juin 2004 13:24 À : Tomcat Users List Objet : Re: How can I access a file located in WEB-INF FAQ http://jakarta.apache.org/tomcat/faq/misc.html#getResourceAsStream -Tim STOCKHOLM, Raymond wrote: Hi, I need to access a file located in the directory WEB-INF of my web application. In fact, in WEB-INF/conf. How can I open this file in one of my servlet ? - 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: Form data validation
Then can you tell me what is the proper mailing list to ask the question? - Original Message - From: Woodchuck [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 15, 2004 5:51 PM Subject: Re: Form data validation wrong mailing list to be asking this --- Keith Hankin [EMAIL PROTECTED] wrote: I am trying to do jsp form validation but cannot get a solution that works. The problem occurs because my jsp files are not in the same directory as my Servlets. If I have my ControllerServlet redirect the request, all of the jsp files are interpreted relative to the directory of the ControllerServlet, however if I forward the request, I lose the original request data and cannot redisplay the data that the user entered. Is there some way that I can avoid these two problems? __ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail - 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: Parameters and where is log
http://jakarta.apache.org/tomcat/faq/misc.html#catalina.out Where does System.out go? How do I rotate catalina.out? Gabi [EMAIL PROTECTED] wrote:I've put the context with his own Logger, I can see all the info of this host here, and in the JavaBean code I've put ServletContext context; context=session.getServletContext(); context.log(test message!!!); But I don't see this message in the log. And, there is a global way I can define that all the System.err. output has to be printed in a text file? How? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - ALL-NEW Yahoo! Messenger - so many all-new ways to express yourself
Re: Please introduce a good Tomcat debug tool
== Date: Tue, 15 Jun 2004 12:12:41 -0700 From: Daxin Zuo [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Please introduce a good Tomcat debug tool == I currently run Tomcat 4.1.9 (without apache) to run JSP and ervlet. How to debug JSP and Servelt in TOMCAT? Thanks. NetBeans. It is available with a Tomcat embedded too. G -- Giuseppe Briotti [EMAIL PROTECTED] Alme Sol, curru nitido diem qui promis et celas aliusque et idem nasceris, possis nihil urbe Roma visere maius. (Orazio) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Parameters and where is log
That's what I've done, I've created a Context path=... docBase=... Logger className=org.apache.catalina.logger.FileLogger prefix=web_log. suffix=.txt timestamp=true/ I see all the webapp output in web_log file, but not the message from the applicacion, where I use the lines: ServletContext context; context=session.getServletContext(); context.log(test message!!!); Perhaps the application does not have the correct HttpSession? (It works on Resin, I've make the .war and deploy in tomcat, configure the Context in server.xml and put all the resin.conf values of context-param inside web.xml in the tomcat context-param format. Am I missing something? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: JK2: lb_factor
Hello Ralph, could you please explain what you mean by that? My Apache has got the following (default?) modules: snip Compiled in modules: core.c mod_win32.c mpm_winnt.c http_core.c mod_so.c /snip So - do I need to use the mpm_worker_module instead of mpm_winnt? (OS of the server is Win XP Pro) If so - can you tell me how to do that? Just a configuration in httpd.conf? Or do I need to recompile Apache? (yes, I know how to read docs - only need some advice where to look...) Oh, and just to be sure - I'm using JK2, are you talking about that, or do you refer to JK / mod_jk? Btw - does anybody know a way how to distribute requests in a tomcat cluster according to current server load? (CPU-load, RAM-load or number of active sessions, for example ?) Many questions, I know... hope someone can give me a hint... Nicole -Ursprüngliche Nachricht- Von: Ralph Einfeldt [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 16. Juni 2004 12:01 An: Tomcat Users List Betreff: RE: JK2: lb_factor The quality of the distribution depends on the worker type of apache. (AFAIK only the 'worker' MPM will work) Nevertheless AFAIK the load balancing in mod_jk is not complete in this area, so I'm not shure if you will get the desired distribution (but it should be closer). -Original Message- From: Weseloh, Nicole [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 11:48 AM To: [EMAIL PROTECTED] Subject: JK2: lb_factor I've got a cluster with 2 tomcat 2.0.25 on different machines, on one of them also running Apache 2.0.49 with JK2 as a loadbalancer. Requests get redirected to both tomcat instances, but it always ends up with around 1/3 of all requests at the local server and about 2/3 at the remote one, no matter what value the lb_factors are. So, could anyone tell me which values I should use to make the lb_factor work correctly? All information I found was that a lower value means more requests (official JK2-documentation at jakarta.apache.org). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Too many open files on Solaris
On Wed, Jun 16, 2004 at 10:59:12AM +0200, Davor Cengija wrote: : My application is hitting that 'too many open files' limit on Solaris. [I just left this line in for the archives/searching. Read on] : but my system administrator simply doesn't want to do that (since it : requires restart). If this application is mission-critical, your sysadmin may want to rethink his/her approach. =) You could also check out the ulimit command. What sort of load-testing was done on the app before it went live? : Now, the problem is how to avoid too many open files exception. The short version: don't open so many files. ;) The longer version: I'm only half-joking here. Remember, everything in Unix is (accessible as/represented by) a file, including network connections. You could limit the number of network connections in your server.xml Connector elements -- or better still, limit Apache's connections to the container. Reduce the number of DB pool connections, etc. You could also check your app for file I/O, such as your code handling temp files. Slim chance, and it's more of a fine-tuning measure; but it will help on a political/friendliness level when you can honestly tell your sysadmin, I've done all I can do. Your turn. How much memory does the container use during peak periods? You could setup a second Tomcat instance (either on the current host, or a different host) and have Apache/mod_jk load-balance between the two. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Order of WebApp Loading
Please create a *new* message when mailing the list. Responding to an unrelated message makes it difficult to follow the list with a thread-aware mailer. : I am using Tomcat 4.1.29 and i have several webapps in my : application. I want to set one webapp to : load first and the rest of the webapps should be loaded after : it. I have tried changing the order in server.xml, but it : didn'y help. : Is there any way i can set the order of webapp loading ? Directly, through Tomcat, no. Not possible. Indirectly, put the special app in its own container and make sure that starts first (i.e. in your init scripts). What's the rationale behind App #1 starting first? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JK2: lb_factor
Hi Nicole, I guess it's the mpm_worker_module, that you need. Yes, I was talking about mod_jk2. I guess that it is possible to enable a worker by configuration. (After all they are just modules) Sorry, as I'm neither using apache 2 nor mod_jk*, I can't add much. That was just third hand knowledge from posts to this list that managed to stay on my brain heap. Some starting points: http://httpd.apache.org/docs-2.0/mod/worker.html http://httpd.apache.org/docs-2.0/mpm.html -Original Message- From: Weseloh, Nicole [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 1:48 PM To: Tomcat Users List Subject: AW: JK2: lb_factor could you please explain what you mean by that? My Apache has got the following (default?) modules: snip Compiled in modules: core.c mod_win32.c mpm_winnt.c http_core.c mod_so.c /snip So - do I need to use the mpm_worker_module instead of mpm_winnt? (OS of the server is Win XP Pro) If so - can you tell me how to do that? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Too many open files on Solaris
The first thing that came up in Google was this, which might help: http://support.bea.com/support_news/product_troubleshooting/Too_Many_Open_Fi les_Pattern.html Andy -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Davor Cengija Sent: 16 June 2004 09:59 To: [EMAIL PROTECTED] Subject: Too many open files on Solaris My application is hitting that 'too many open files' limit on Solaris. Jun 15, 2004 11:23:01 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket SEVERE: Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080] ignored exception: java.net.SocketException: Too many open files java.net.SocketException: Too many open files at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353) at java.net.ServerSocket.implAccept(ServerSocket.java:448) at java.net.ServerSocket.accept(ServerSocket.java:419) at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(Default ServerSocketFactory.java:107) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.ja va:387) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:557) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.j ava:683) at java.lang.Thread.run(Thread.java:534) Jun 15, 2004 11:23:01 AM org.apache.tomcat.util.net.PoolTcpEndpoint closeServerSocket SEVERE: Caught exception trying to unlock accept on 8080 java.net.SocketException: Too many open files Jun 15, 2004 11:23:01 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket WARNING: Reinitializing ServerSocket I realize that increasing file descriptor limit per process could help a bit, but my system administrator simply doesn't want to do that (since it requires restart). Now, the problem is how to avoid too many open files exception. Any suggestions regarding Tomcat (or Apache) configuration, coding practice, some runtime operating system parameters would be greatly appreciated. Here's my configuration: Default Solaris 8 (I believe) installation on 2CPU+4GB RAM box. TCP connection wait timeout (I believe that the correct wording) is decreased from 240sec to 60sec and that's the only parameter changed on Solaris. Tomcat 4.1.30 with j2sdk 1.4.2_04 (server mode) with Apache 2.0 as a proxy. Every single request goes through Apache which then routes it to Tomcat. 600.000 hits and cca 3GB of data daily, with peaks during working hours, of course, about 50.000 hits per hour. The delivered content consists mostly of small images (3-20k) delivered directly from a database (servlet sets content type etc, img src=/preview?id=123 style) Application lives about 24hours and then dies with the exception shown above. As far as I can see, all input- and output- streams are flushed and closed, at least in my application. Cannot guarantee for the underlining libraries. Somehow I think that I cannot squeeze the application anymore and that we're hitting tomcat+solaris limit. Ahm... whoever managed to completelly read this rather long post I hope will have some suggestions. Thanks in advance! Cheers, Davor -- Davor Cengija, [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]
Anyone have the complied mod_jk for AIX 4.3.3???
Hello, we are running Apache 1.3.19.3 and Tomcat 3.2.4 on AIX 4.3.3. We are have trouble compiling the mod_jk and were wondering if anyone already has this compiled and can send the file?? Thanks! -Bob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Too many open files on Solaris
HasanA wrote: I am having similar problem and i am running Tomcat 4.0 on Open vms 7.2. We have increased number of files open by a process to some ridiculous value but this error is still comming up. Can someone also help with this issue? If you are opening up database connections or files on the local system, you may not be closing the connection. You can use a program called losf, which is available from www.sunfreeware.com and see what it tells you about which process has the descriptors open. -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Too many open files on Solaris
QM wrote: On Wed, Jun 16, 2004 at 10:59:12AM +0200, Davor Cengija wrote: : My application is hitting that 'too many open files' limit on Solaris. [I just left this line in for the archives/searching. Read on] Me too :-) Ok, this post might sound a little bit funny. Read below. : but my system administrator simply doesn't want to do that (since it : requires restart). If this application is mission-critical, your sysadmin may want to rethink his/her approach. =) Very mission critical. But the problem is that (strange enough) sysadmin needs to file a formal restart request (!) in which he needs to explain why a restart is needed. You could also check out the ulimit command. What sort of load-testing was done on the app before it went live? It was tested on linux but not on Solaris (long story). Linux performed quite fine. snip Thanks for the suggestions. I've already done similar steps you're suggesting (your post is a good reference now :-). How much memory does the container use during peak periods? You could Java is started with minimum 1GB and maximum 2GB memory footprint. As soon as Tomcat starts, top says taht memory SIZE is 1.2G and RES about 700MB. When the application is about to crash, RES is about 1.1GB or slightly less. setup a second Tomcat instance (either on the current host, or a different host) and have Apache/mod_jk load-balance between the two. Hehe, really interesting. My next step is to set up a second Tomcat instance + mod_jk on the same box. Another Solaris box is on its way but won't be available very soon. Ok, to resume: QM, your suggestions might be a good quick-fix-how-to for this kind of problems. I already tried them and still have the problems (although the application's lifespan is streched from 2hrs to 24hrs for the current load). My next step is mod_jk balancer. Ah... my sad story continues :-) Kind regards, Davor -- Davor Cengija, [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Too many open files on Solaris
Andy Eastham wrote: The first thing that came up in Google was this, which might help: http://support.bea.com/support_news/product_troubleshooting/Too_Many_Open_Fi les_Pattern.html This is a good reference. Here's a clickable link: http://tinyurl.com/2acgv Thanks -- Davor Cengija, [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem with context element configuration - need some help
hi; regarding the configuration of a Context element. i have an application called 'app' my configuration is currently: Context path=/ docBase=. debug=0 reloadable=true so in order to execute the application i need to type the url 'http://host:port/app i do not want to type the URL with the 'app' suffix so i changed the context element to Context path=/ docBase=app debug=0 reloadable=true now the url without the 'app' executes the first page BUT all the images (static) are not loaded (the images are in the img directory under the app directory). can anyone explain this behaviour? did i configure anything wrong? thanks Guy Katz Allot Communications [EMAIL PROTECTED] tel: +972 9 7619288 fax: +972 9 7443626 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Parameters and where is log
Hi, If you can't see System.out/System.err output anywhere, something serious is wrong, such as the server not starting properly: kill it, clean out your logs, start it again and watch the logs carefully. BTW, you don't have to quote anything in web.xml and we generally recommend that you don't. (Your original post that started this thread had some JNDI configuration parameters quoted, like Connection). Yoav Shapira Millennium Research Informatics -Original Message- From: Gabi [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 7:51 AM To: Tomcat Users List Subject: RE: Parameters and where is log That's what I've done, I've created a Context path=... docBase=... Logger className=org.apache.catalina.logger.FileLogger prefix=web_log. suffix=.txt timestamp=true/ I see all the webapp output in web_log file, but not the message from the applicacion, where I use the lines: ServletContext context; context=session.getServletContext(); context.log(test message!!!); Perhaps the application does not have the correct HttpSession? (It works on Resin, I've make the .war and deploy in tomcat, configure the Context in server.xml and put all the resin.conf values of context-param inside web.xml in the tomcat context-param format. Am I missing something? - 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: Parameters and where is log
Don't know if this will be of any use to you, but if you are using Tomcat 5.0.24, you can define where System.out and System.err are redirected by Configuring Tomcat under the Logging tab. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with context element configuration - need some help
Hi, Change context path=/ to path=. Yoav Shapira Millennium Research Informatics -Original Message- From: Guy Katz [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 9:55 AM To: '[EMAIL PROTECTED]' Subject: problem with context element configuration - need some help hi; regarding the configuration of a Context element. i have an application called 'app' my configuration is currently: Context path=/ docBase=. debug=0 reloadable=true so in order to execute the application i need to type the url 'http://host:port/app i do not want to type the URL with the 'app' suffix so i changed the context element to Context path=/ docBase=app debug=0 reloadable=true now the url without the 'app' executes the first page BUT all the images (static) are not loaded (the images are in the img directory under the app directory). can anyone explain this behaviour? did i configure anything wrong? thanks Guy Katz Allot Communications [EMAIL PROTECTED] tel: +972 9 7619288 fax: +972 9 7443626 - 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: Multiple requests sharing the same Servlet instance
So this means that only one instance of a given Servlet class is every created? How does one do any real work with this? Where do I put my temporary data if not in attributes of the Servlet instance? And what is the reason for having a life cycle of Servlets, with init/destroy methods? I thought it would use Servlet instance pooling. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, June 14, 2004 8:22 PM Subject: RE: Multiple requests sharing the same Servlet instance Hi, I don't think your understanding is correct: the container may allow multiple threads to use the same servlet instance concurrently. If you need synchronization around or within that method, or around some fields in your servlet class, you are responsible for it. The container does guarantee that only one thread will process a request from start to finish, i.e. the same thread will invoke any filters, servlets, etc. for the same request. Yoav Shapira Millennium Research Informatics -Original Message- From: Keith Hankin [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 10:53 AM To: Tomcat Users List Subject: Multiple requests sharing the same Servlet instance I am having a problem where one Servlet instance seems to being used by two different threads at the same time. It is my understanding that Servlet instances will not be used by two threads at the same time, so that the service() method would thus only be called by one thread, then it can be called again if the Servlet instance is reused by way of pooling. This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple requests sharing the same Servlet instance
Hi, No, it doesn't mean one instance of a servlet class is created. It means the container is free to pool the instances any which way it likes, optionally adjusting for load, destroying unused servlets to save resources, etc. The lifecycle of a servlet is not necessarily related to its pooling, they address separate concerns. You have a whole host of options for where to put temporary data used by a servlet, as you do in general for java classes. The design considerations for synchronization are the same as whenever you design an object that can be used by multiple threads concurrently. Yoav Shapira Millennium Research Informatics -Original Message- From: Keith Hankin [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 9:14 AM To: Tomcat Users List Subject: Re: Multiple requests sharing the same Servlet instance So this means that only one instance of a given Servlet class is every created? How does one do any real work with this? Where do I put my temporary data if not in attributes of the Servlet instance? And what is the reason for having a life cycle of Servlets, with init/destroy methods? I thought it would use Servlet instance pooling. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, June 14, 2004 8:22 PM Subject: RE: Multiple requests sharing the same Servlet instance Hi, I don't think your understanding is correct: the container may allow multiple threads to use the same servlet instance concurrently. If you need synchronization around or within that method, or around some fields in your servlet class, you are responsible for it. The container does guarantee that only one thread will process a request from start to finish, i.e. the same thread will invoke any filters, servlets, etc. for the same request. Yoav Shapira Millennium Research Informatics -Original Message- From: Keith Hankin [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 10:53 AM To: Tomcat Users List Subject: Multiple requests sharing the same Servlet instance I am having a problem where one Servlet instance seems to being used by two different threads at the same time. It is my understanding that Servlet instances will not be used by two threads at the same time, so that the service() method would thus only be called by one thread, then it can be called again if the Servlet instance is reused by way of pooling. This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple requests sharing the same Servlet instance
But if a Servlet instance might be used by multiple threads at one time, then what's the point of having Servlet object pooling at all? Why wouldn't all requests just use one instance? I still don't see how I can have variables that are just for storing a single thread's working data. The only way I can do anything like this is to attach attributes to the request. But this seems to be a kludge to me. I don't want to have to use Strings to get to my data by way of a Map. I want regular Java local variables. Why not just - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 6:47 PM Subject: RE: Multiple requests sharing the same Servlet instance Hi, No, it doesn't mean one instance of a servlet class is created. It means the container is free to pool the instances any which way it likes, optionally adjusting for load, destroying unused servlets to save resources, etc. The lifecycle of a servlet is not necessarily related to its pooling, they address separate concerns. You have a whole host of options for where to put temporary data used by a servlet, as you do in general for java classes. The design considerations for synchronization are the same as whenever you design an object that can be used by multiple threads concurrently. Yoav Shapira Millennium Research Informatics -Original Message- From: Keith Hankin [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 9:14 AM To: Tomcat Users List Subject: Re: Multiple requests sharing the same Servlet instance So this means that only one instance of a given Servlet class is every created? How does one do any real work with this? Where do I put my temporary data if not in attributes of the Servlet instance? And what is the reason for having a life cycle of Servlets, with init/destroy methods? I thought it would use Servlet instance pooling. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, June 14, 2004 8:22 PM Subject: RE: Multiple requests sharing the same Servlet instance Hi, I don't think your understanding is correct: the container may allow multiple threads to use the same servlet instance concurrently. If you need synchronization around or within that method, or around some fields in your servlet class, you are responsible for it. The container does guarantee that only one thread will process a request from start to finish, i.e. the same thread will invoke any filters, servlets, etc. for the same request. Yoav Shapira Millennium Research Informatics -Original Message- From: Keith Hankin [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 10:53 AM To: Tomcat Users List Subject: Multiple requests sharing the same Servlet instance I am having a problem where one Servlet instance seems to being used by two different threads at the same time. It is my understanding that Servlet instances will not be used by two threads at the same time, so that the service() method would thus only be called by one thread, then it can be called again if the Servlet instance is reused by way of pooling. This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Configuring JNDI for tomcat
Tomcat does not expose a naming service on any port at all, so far as I know. It just offers an internal API to JNDI in which it populates a namespace. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with context element configuration - need some help
thanks, that did it. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 2:55 PM To: Tomcat Users List Subject: RE: problem with context element configuration - need some help Hi, Change context path=/ to path=. Yoav Shapira Millennium Research Informatics -Original Message- From: Guy Katz [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 9:55 AM To: '[EMAIL PROTECTED]' Subject: problem with context element configuration - need some help hi; regarding the configuration of a Context element. i have an application called 'app' my configuration is currently: Context path=/ docBase=. debug=0 reloadable=true so in order to execute the application i need to type the url 'http://host:port/app i do not want to type the URL with the 'app' suffix so i changed the context element to Context path=/ docBase=app debug=0 reloadable=true now the url without the 'app' executes the first page BUT all the images (static) are not loaded (the images are in the img directory under the app directory). can anyone explain this behaviour? did i configure anything wrong? thanks Guy Katz Allot Communications [EMAIL PROTECTED] tel: +972 9 7619288 fax: +972 9 7443626 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 4.1.x and RHEL3.0 problem
hi is there any bug solution with tomcat 4.1.x and rhel3.0 it gives jdk error sincerely - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple requests sharing the same Servlet instance
any variable declared inside your service(request,response) method (actually any method) are thread specific, since they are added to a separate thread stack. hence you can have 20 threads executing the same servlet, and your method variables will never be shared. Filip - Original Message - From: Keith Hankin [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 8:33 AM Subject: Re: Multiple requests sharing the same Servlet instance But if a Servlet instance might be used by multiple threads at one time, then what's the point of having Servlet object pooling at all? Why wouldn't all requests just use one instance? I still don't see how I can have variables that are just for storing a single thread's working data. The only way I can do anything like this is to attach attributes to the request. But this seems to be a kludge to me. I don't want to have to use Strings to get to my data by way of a Map. I want regular Java local variables. Why not just - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 6:47 PM Subject: RE: Multiple requests sharing the same Servlet instance Hi, No, it doesn't mean one instance of a servlet class is created. It means the container is free to pool the instances any which way it likes, optionally adjusting for load, destroying unused servlets to save resources, etc. The lifecycle of a servlet is not necessarily related to its pooling, they address separate concerns. You have a whole host of options for where to put temporary data used by a servlet, as you do in general for java classes. The design considerations for synchronization are the same as whenever you design an object that can be used by multiple threads concurrently. Yoav Shapira Millennium Research Informatics -Original Message- From: Keith Hankin [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 9:14 AM To: Tomcat Users List Subject: Re: Multiple requests sharing the same Servlet instance So this means that only one instance of a given Servlet class is every created? How does one do any real work with this? Where do I put my temporary data if not in attributes of the Servlet instance? And what is the reason for having a life cycle of Servlets, with init/destroy methods? I thought it would use Servlet instance pooling. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, June 14, 2004 8:22 PM Subject: RE: Multiple requests sharing the same Servlet instance Hi, I don't think your understanding is correct: the container may allow multiple threads to use the same servlet instance concurrently. If you need synchronization around or within that method, or around some fields in your servlet class, you are responsible for it. The container does guarantee that only one thread will process a request from start to finish, i.e. the same thread will invoke any filters, servlets, etc. for the same request. Yoav Shapira Millennium Research Informatics -Original Message- From: Keith Hankin [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 10:53 AM To: Tomcat Users List Subject: Multiple requests sharing the same Servlet instance I am having a problem where one Servlet instance seems to being used by two different threads at the same time. It is my understanding that Servlet instances will not be used by two threads at the same time, so that the service() method would thus only be called by one thread, then it can be called again if the Servlet instance is reused by way of pooling. This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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,
RE: Multiple requests sharing the same Servlet instance
Hi, But if a Servlet instance might be used by multiple threads at one time, then what's the point of having Servlet object pooling at all? Why wouldn't It might and it might not. My point was that the Servlet Spec leaves it for the container implementation to decide, and so you should be careful. all requests just use one instance? I still don't see how I can have variables that are just for storing a single thread's working data. The You can do so easily inside any method, or in ThreadLocal variables, or in request-scope attributes, or in other non-servlet object pools that you write (or use a 3rd party pooling library). The ways are plentiful and except for the request attributes they're not specific to servlet containers (nor is this issue in general specific to servlet containers). way I can do anything like this is to attach attributes to the request. But this seems to be a kludge to me. I don't want to have to use Strings to get to my data by way of a Map. I want regular Java local variables. Address your comments, suggestions, etc. to the Servlet Specification JSR team (it's JSR154). I'm just telling you what the spec guarantees and what it doesn't ;) Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Configuring JNDI for tomcat
Hi, You're right, and this is in the FAQ: http://jakarta.apache.org/tomcat/faq/misc.html#externalJndi. Yoav Shapira Millennium Research Informatics -Original Message- From: Benson Margulies [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 9:29 AM To: Tomcat Users List; Russ Leong Subject: RE: Configuring JNDI for tomcat Tomcat does not expose a naming service on any port at all, so far as I know. It just offers an internal API to JNDI in which it populates a namespace. - 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: Too many open files on Solaris
: : My application is hitting that 'too many open files' limit on Solaris. : [I just left this line in for the archives/searching. Read on] [ yet again ;) ] : Very mission critical. But the problem is that (strange enough) sysadmin : needs to file a formal restart request (!) in which he needs to explain why : a restart is needed. You just explained it. ;) The suggestions I gave were very quick-hit, yes; because by now 1/ your problem is more political than technical; and 2/ the technical fixes for your app are likely long-term. Some of my clients are very conservative companies that have similar policies. Telling someone, this is a huge problem that will eventually cost you money (in terms of loss of client faith) tends to light a fire under the right people. Unfortunately, you (or someone) will then have to explain to upper mgt why this didn't bite you till you went to production. I'm not saying it's your (or anyone's) fault; but someone will have to lay out the facts and point out a solution. This may be rectified in a positive way, long-term: matching -- or at least, semi-matching -- test/prod hardware. One of my clients had such a setup. It was beautiful. Good luck. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 4.1.x and RHEL3.0 problem
On Wed, Jun 16, 2004 at 04:43:18PM +0300, Eyup TEKIN wrote: : is there any bug solution with tomcat 4.1.x and rhel3.0 : it gives jdk error Maybe. Share the error, and someone may share a more thorough answer. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 4.1.x and RHEL3.0 problem
hi jdk1.3.x rhel3.0 tomcat4.1.x and mod_jk2 in redhat bugzilla they say that there is a bug.and advice a solution but i coulnt succeed to solve the bug.is there anybody solve it? i dont have a chance to paste error thanks sincerely - Original Message - From: QM [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 4:43 PM Subject: Re: tomcat 4.1.x and RHEL3.0 problem On Wed, Jun 16, 2004 at 04:43:18PM +0300, Eyup TEKIN wrote: : is there any bug solution with tomcat 4.1.x and rhel3.0 : it gives jdk error Maybe. Share the error, and someone may share a more thorough answer. -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: Form data validation
Your answer has more to do with Servlets/JSP programming topics in general, rather than Tomcat in specific. So I'd recommend a forum like: http://saloon.javaranch.com/ pick either the Servlets or JSP forums. -Original Message- From: Keith Hankin [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 6:38 AM To: Tomcat Users List Subject: Re: Form data validation Then can you tell me what is the proper mailing list to ask the question? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Too many open files on Solaris
QM wrote: : : My application is hitting that 'too many open files' limit on : : Solaris. : [I just left this line in for the archives/searching. Read on] [ yet again ;) ] Yeah baby! :-)) This may be rectified in a positive way, long-term: matching -- or at least, semi-matching -- test/prod hardware. One of my clients had such a setup. It was beautiful. It is bad that some customers learn the hard way. They finally accepted to set up a test machine. Ahmmm... it is always difficult to fight big companies intertia. Thanks, QM. -- Davor Cengija, [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Deployment to ROOT context
Hello all. I have such problem: I'm working on some web-application and I need my servlet change default servlet. So I'm publishing my web-application to default (ROOT) context (/). I'm using NetBeans 3.6 and tomcat 5.0.19. When I try to deploy my web-application automatically I'm getting strange problems like: No context exists for path / or IllegalStateException: Container StandardContext[] has not been started. I will appreciate any help. On Wednesday 16 June 2004 17:04, [EMAIL PROTECTED] wrote: Hi! This is the ezmlm program. I'm managing the [EMAIL PROTECTED] mailing list. I'm working for my owner, who can be reached at [EMAIL PROTECTED] Acknowledgment: I have added the address [EMAIL PROTECTED] to the tomcat-user mailing list. Welcome to [EMAIL PROTECTED] Please save this message so that you know the address you are subscribed under, in case you later want to unsubscribe or change your subscription address. --- Administrative commands for the tomcat-user list --- I can handle administrative requests automatically. Please do not send them to the list address! Instead, send your message to the correct command address: To subscribe to the list, send a message to: [EMAIL PROTECTED] To remove your address from the list, send a message to: [EMAIL PROTECTED] Send mail to the following for info and FAQ for this list: [EMAIL PROTECTED] [EMAIL PROTECTED] Similar addresses exist for the digest list: [EMAIL PROTECTED] [EMAIL PROTECTED] To get messages 123 through 145 (a maximum of 100 per request), mail: [EMAIL PROTECTED] To get an index with subject and author for messages 123-456 , mail: [EMAIL PROTECTED] They are always returned as sets of 100, max 2000 per request, so you'll actually get 100-499. To receive all messages with the same subject as message 12345, send an empty message to: [EMAIL PROTECTED] The messages do not really need to be empty, but I will ignore their content. Only the ADDRESS you send to is important. You can start a subscription for an alternate address, for example [EMAIL PROTECTED], just add a hyphen and your address (with '=' instead of '@') after the command word: [EMAIL PROTECTED] To stop subscription for this address, mail: [EMAIL PROTECTED] In both cases, I'll send a confirmation message to that address. When you receive it, simply reply to it to complete your subscription. If despite following these instructions, you do not get the desired results, please contact my owner at [EMAIL PROTECTED] Please be patient, my owner is a lot slower than I am ;-) --- Enclosed is a copy of the request I received. Return-Path: [EMAIL PROTECTED] Received: (qmail 5210 invoked by uid 99); 16 Jun 2004 14:04:43 - Received: from [217.196.165.116] (HELO marlboro.softsky.com.ua) (217.196.165.116) by apache.org (qpsmtpd/0.27.1) with ESMTP; Wed, 16 Jun 2004 07:04:43 -0700 Received: from trussardi.softsky.com.ua (trussardi.softsky.com.ua [192.168.0.3]) by marlboro.softsky.com.ua (Postfix) with ESMTP id C325B48E8 for [EMAIL PROTECTED] a.apache.org; Wed, 16 Jun 2004 16:42:23 +0300 (EEST) From: Arsen A. Gutsal [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Organization: SOFTSKY To: [EMAIL PROTECTED] .apache.org Subject: SUBSCRIBE Date: Wed, 16 Jun 2004 17:04:27 +0300 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: [EMAIL PROTECTED] X-Virus-Checked: Checked -- Sincerely, Arsen A. Gutsal SOFTSKY Cost Effective Software Development http://www.softsky.com.ua - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple requests sharing the same Servlet instance
Maybe I'm being dumb, but it seems to me that based upon what I'm hearing, there is no benefit of doing Servlet instance pooling since the Servlets aren't true objects; they are merely places to put code, since no local state is useful. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 7:06 PM Subject: RE: Multiple requests sharing the same Servlet instance Hi, But if a Servlet instance might be used by multiple threads at one time, then what's the point of having Servlet object pooling at all? Why wouldn't It might and it might not. My point was that the Servlet Spec leaves it for the container implementation to decide, and so you should be careful. all requests just use one instance? I still don't see how I can have variables that are just for storing a single thread's working data. The You can do so easily inside any method, or in ThreadLocal variables, or in request-scope attributes, or in other non-servlet object pools that you write (or use a 3rd party pooling library). The ways are plentiful and except for the request attributes they're not specific to servlet containers (nor is this issue in general specific to servlet containers). way I can do anything like this is to attach attributes to the request. But this seems to be a kludge to me. I don't want to have to use Strings to get to my data by way of a Map. I want regular Java local variables. Address your comments, suggestions, etc. to the Servlet Specification JSR team (it's JSR154). I'm just telling you what the spec guarantees and what it doesn't ;) Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Parameters and where is log
With the first solution commented: ServletContext context; context=session.getServletContext(); context.log(test message!!!); I can`t read anything but it's solved, because if i try the original System.out and .err it outputs in catalina.out. Thanks to everubody. Now I've to configure parameters correctly, (the first part of my email), in resin where context-param tags and I'm translating it to context-param param-name.../param-name param-value.../param-value /context-param I suppose it's the correct way, but my servlet does not work, but it could be another thing so (now) with the logs help I'll try to solve. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Deployment to ROOT context
Hi, The path for the root context is not /. The directory name ROOT is just a choice: the context whose path is doesn't have to be located at a directory named ROOT. Yoav Shapira Millennium Research Informatics -Original Message- From: Arsen A. Gutsal [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 10:14 AM To: [EMAIL PROTECTED] Subject: Deployment to ROOT context Hello all. I have such problem: I'm working on some web-application and I need my servlet change default servlet. So I'm publishing my web-application to default (ROOT) context (/). I'm using NetBeans 3.6 and tomcat 5.0.19. When I try to deploy my web-application automatically I'm getting strange problems like: No context exists for path / or IllegalStateException: Container StandardContext[] has not been started. I will appreciate any help. On Wednesday 16 June 2004 17:04, [EMAIL PROTECTED] wrote: Hi! This is the ezmlm program. I'm managing the [EMAIL PROTECTED] mailing list. I'm working for my owner, who can be reached at [EMAIL PROTECTED] Acknowledgment: I have added the address [EMAIL PROTECTED] to the tomcat-user mailing list. Welcome to [EMAIL PROTECTED] Please save this message so that you know the address you are subscribed under, in case you later want to unsubscribe or change your subscription address. --- Administrative commands for the tomcat-user list --- I can handle administrative requests automatically. Please do not send them to the list address! Instead, send your message to the correct command address: To subscribe to the list, send a message to: [EMAIL PROTECTED] To remove your address from the list, send a message to: [EMAIL PROTECTED] Send mail to the following for info and FAQ for this list: [EMAIL PROTECTED] [EMAIL PROTECTED] Similar addresses exist for the digest list: [EMAIL PROTECTED] [EMAIL PROTECTED] To get messages 123 through 145 (a maximum of 100 per request), mail: [EMAIL PROTECTED] To get an index with subject and author for messages 123-456 , mail: [EMAIL PROTECTED] They are always returned as sets of 100, max 2000 per request, so you'll actually get 100-499. To receive all messages with the same subject as message 12345, send an empty message to: [EMAIL PROTECTED] The messages do not really need to be empty, but I will ignore their content. Only the ADDRESS you send to is important. You can start a subscription for an alternate address, for example [EMAIL PROTECTED], just add a hyphen and your address (with '=' instead of '@') after the command word: [EMAIL PROTECTED] To stop subscription for this address, mail: [EMAIL PROTECTED] In both cases, I'll send a confirmation message to that address. When you receive it, simply reply to it to complete your subscription. If despite following these instructions, you do not get the desired results, please contact my owner at [EMAIL PROTECTED] Please be patient, my owner is a lot slower than I am ;-) --- Enclosed is a copy of the request I received. Return-Path: [EMAIL PROTECTED] Received: (qmail 5210 invoked by uid 99); 16 Jun 2004 14:04:43 - Received: from [217.196.165.116] (HELO marlboro.softsky.com.ua) (217.196.165.116) by apache.org (qpsmtpd/0.27.1) with ESMTP; Wed, 16 Jun 2004 07:04:43 -0700 Received: from trussardi.softsky.com.ua (trussardi.softsky.com.ua [192.168.0.3]) by marlboro.softsky.com.ua (Postfix) with ESMTP id C325B48E8 for tomcat-user-sc.1087394577.kncghobmmenifedhklpn- [EMAIL PROTECTED] a.apache.org; Wed, 16 Jun 2004 16:42:23 +0300 (EEST) From: Arsen A. Gutsal [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Organization: SOFTSKY To: tomcat-user-sc.1087394577.kncghobmmenifedhklpn- [EMAIL PROTECTED] .apache.org Subject: SUBSCRIBE Date: Wed, 16 Jun 2004 17:04:27 +0300 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: [EMAIL PROTECTED] X-Virus-Checked: Checked -- Sincerely, Arsen A. Gutsal SOFTSKY Cost Effective Software Development http://www.softsky.com.ua - 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: Multiple requests sharing the same Servlet instance
It depends on what you mean by state. State can be maintained in many places, each for their own purpose: 1) ServletContext - So all servlets may access the same data 2) Session - User specific state 3) Servlet - resources that are of value only to that servlet. 4) static variables - Available to any class in the classloader. The most dangerous way to maintain state but sometimes a needed evil. The original intent was to have servlets allocated objects and multiple requests each hit the same servlet instance. I would imagine there was an intent to allow admins to configure a servlet to allow for a maximum number of concurrent requests flowing into the same servlet instance at one time. If the limit was reached - new instances would be created. In reality, no one implemented it because it was pretty stupid. Its much easier to have all request got through the same instance and let the servlet worry about the shared resource issues. -Tim Keith Hankin wrote: Maybe I'm being dumb, but it seems to me that based upon what I'm hearing, there is no benefit of doing Servlet instance pooling since the Servlets aren't true objects; they are merely places to put code, since no local state is useful. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 7:06 PM Subject: RE: Multiple requests sharing the same Servlet instance Hi, But if a Servlet instance might be used by multiple threads at one time, then what's the point of having Servlet object pooling at all? Why wouldn't It might and it might not. My point was that the Servlet Spec leaves it for the container implementation to decide, and so you should be careful. all requests just use one instance? I still don't see how I can have variables that are just for storing a single thread's working data. The You can do so easily inside any method, or in ThreadLocal variables, or in request-scope attributes, or in other non-servlet object pools that you write (or use a 3rd party pooling library). The ways are plentiful and except for the request attributes they're not specific to servlet containers (nor is this issue in general specific to servlet containers). way I can do anything like this is to attach attributes to the request. But this seems to be a kludge to me. I don't want to have to use Strings to get to my data by way of a Map. I want regular Java local variables. Address your comments, suggestions, etc. to the Servlet Specification JSR team (it's JSR154). I'm just telling you what the spec guarantees and what it doesn't ;) Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: client disconnect
From: Dorel Vaida [mailto:[EMAIL PROTECTED] Subject: client disconnect Wat was unbelievable to me was that even when the other side of the stream is clearly closed you can still write in it and flush it without it telling to you nada. zip. You may be in a situation where the client only closed half of the connection - quite typical in a TCP environment - thereby allowing the peer to keep sending. Can't really tell without a network trace. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem accessing WEB-INF/lib (Launching Tomcat from Eclipse without any plugins)
Hi, I did set up Eclipse to run Tomcat. When I run Tomcat 5 standalone (I mean NOT from Eclipse) I don't have this problem. My application can't access WEB-INF/lib unless I also put all *.jar files in classpath. I know this should not be required and Tomcat would normally access them without classpath. I configured Eclipse as follows: Main class: org.apache.catalina.startup.Bootstrap Program arguments: start VM arguments: -Djava.endorsed.dirs=c:\java\tomcat\common\endorsed -Dcatalina.base=c:\java\tomcat -Dcatalina.home=c:\java\tomcat -Djava.io.tmpdir=c:\java\tomcat\temp Local directory: C:\Java\tomcat\bin Classpath bootstrap entries: c:\Java\jdk\jre\lib\rt.jar User entries: bootstrap.jar (TOMCAT) and tools.jar (JDK) Tomcat starts correctly but I get NoClassDefException when main application servlet tries to call that JAR (when running from Eclipse). I am sure I have that JAR in my WEB-INF/lib. I don't understand how does Tomcat know it has to make WEB-INF/lib available and why it doesn't do it when I try to run it from Eclipse. Did I miss any settings? My best regards, Vladas P.S. There is workaround by explicitly putting all jars in classpath but I am very anxious to understand why this is happening.
Re: Multiple requests sharing the same Servlet instance
On Wed, Jun 16, 2004 at 07:53:07PM +0530, Keith Hankin wrote: : Maybe I'm being dumb, but it seems to me that based upon what I'm hearing, : there is no benefit of doing Servlet instance pooling since the Servlets : aren't true objects; they are merely places to put code, since no local : state is useful. Depends on how you look at it: they are true objects in that they are self-referential, and hold some (shareable) state. Check out the javadoc for the HttpServlet class: by default, the ServletConfig and some other vars are shared, and you're more than welcome to share thread-safe objects (such as a logger). I'd certainly call those local objects useful. =) -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]
question
Question, please. I have a web application... named matrici/web so i have a tree like this matrici/web/ -many jsp files -WEB-INF/ --web.xml --classes/ --lib/ my application is under $CATALINA_HOME/webapps/ROOT I put my extern class, CreaServizio.class in WEB-INF/classes/ is it right? do i have to create a package for that class? It returns me an error cannot resolve symbol symbol : variable CreaServizio CreaServizio is a class Angelo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Vexing session creation issue
I sent this to the Struts mailing list as well, but it seems like it could be a Tomcat issue as well (probably just some config option I don't know about)... Argh, this one is hurting my head... I have an application that starts out by returning index.jsp (it's the welcome file). This JSP opens a new window via JavaScript and loads into it index1.jsp. index1.jsp populates five frames of a frameset. At the end of all this, my logon screen is seen. The important thing to note here is that no Actions are executed to this point, it's just loading JSP's, and there is not really any JSP code in any of these except for a bunch of request.getContextPath() calls. No code accesses session or anything like that, and there are only two references to getting anything out of request (because the logon page might be shown after a bad attempt, and I need to get the userID and password that was attempted). In all of them, I have session=false in the page tag. Now... I've created a SessionListener to tell me when a session is created or destroyed. Problem is, during all these JSP loads, the create event fires TWICE! What's worse, session is NOT null (which I expected it to be), and worse still, I'm getting two DIFFERENT session ID's! It looks like two sessions are being created when it seems like absolutely NONE should be. I'm banging my head against the wall with this one. Anyone have any ideas? Thanks folks! Frank _ MSN 9 Dial-up Internet Access fights spam and pop-ups now 3 months FREE! http://join.msn.click-url.com/go/onm00200361ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Memory Settings On Tomcat
On Tue, 15 Jun 2004, Shapira, Yoav wrote: | | Hola, Yo! | | I know - but Sun's VMs surely seems to follow your suggestions! | | They might, and they might not, that's the point. Other VM | implementations can choose to ignore System.gc(), or even Sun | implementations on certain platforms (many J2ME installations ignore | these calls). Yes - and I suggested that one could try it out, just for kicks..! ;) | | That depends on your platform and settings. Most definately - but Sun's VMs have been doing this for some time (always?), and thus the gc() diff is interesting on this particular VM, at least. | | I have to debug this now, it will be interesting to see if it is Tomcat | code or my code that have the bug..! ;) | | It is expected that every reload will increase total memory usage, | monotonically, it's not a bug, and there are numerous discussions about | this and related issues in the arhicves. Okay? Expected? I don't get that. Can you point me to a email-subject of one of those threads? Or several?! Thanks for info, anyway! Endre. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
question
Question, please. I have a web application... named matrici/web so i have a tree like this matrici/web/ -many jsp files -WEB-INF/ --web.xml --classes/ --lib/ my application is under $CATALINA_HOME/webapps/ROOT I put my extern class, CreaServizio.class in WEB-INF/classes/ is it right? do i have to create a package for that class? or do i have to use an explicit import instruction? It returns me an error cannot resolve symbol symbol : variable CreaServizio CreaServizio is a class Angelo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple requests sharing the same Servlet instance
since the Servlets aren't true objects A servlet is a true object. It gets instanciated by the container. since no local state is useful. All the variables declared in your service methods (doPost, doGet) are local to a particular request. You also have access to application, session, and page scoped variables. The servlet spec is a good read if you want to understand when and why an evironment will opt for multiple instances of a particular servlet. === Example: === SRV.2.2 Number of Instances The servlet declaration which is part of the deployment descriptor of theWeb application containing the servlet, as described in Chapter SRV.13, Deployment Descriptor , controls how the servlet container provides instances of the servlet. For a servlet not hosted in a distributed environment (the default), the servlet container must use only one instance per servlet declaration. However, for a servlet implementing the SingleThreadModel interface, the servlet container may instantiate multiple instances to handle a heavy request load and serialize requests to a particular instance. === As a rule, I only use instance variables that are static and are initialized in the servlet's init method. On Wednesday 16 June 2004 10:23 am, Keith Hankin wrote: Maybe I'm being dumb, but it seems to me that based upon what I'm hearing, there is no benefit of doing Servlet instance pooling since the Servlets aren't true objects; they are merely places to put code, since no local state is useful. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 7:06 PM Subject: RE: Multiple requests sharing the same Servlet instance Hi, But if a Servlet instance might be used by multiple threads at one time, then what's the point of having Servlet object pooling at all? Why wouldn't It might and it might not. My point was that the Servlet Spec leaves it for the container implementation to decide, and so you should be careful. all requests just use one instance? I still don't see how I can have variables that are just for storing a single thread's working data. The You can do so easily inside any method, or in ThreadLocal variables, or in request-scope attributes, or in other non-servlet object pools that you write (or use a 3rd party pooling library). The ways are plentiful and except for the request attributes they're not specific to servlet containers (nor is this issue in general specific to servlet containers). way I can do anything like this is to attach attributes to the request. But this seems to be a kludge to me. I don't want to have to use Strings to get to my data by way of a Map. I want regular Java local variables. Address your comments, suggestions, etc. to the Servlet Specification JSR team (it's JSR154). I'm just telling you what the spec guarantees and what it doesn't ;) Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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]
Setting the Session Id length
Hi, Fairly recently, methods appeared in org.apache.catalina.session.ManagerBase (setSessionIdLength()) to allow variation of the Session Id length, however I can't find any way of actually calling these methods. Can anyone tell me how this parameter should be set? (I'm using the embedded Tomcat within JBoss) Many thanks, James
RE: Too many open files on Solaris
We are experiencing the same issue with our application. The application is accessed through a 2K box running Tomcat 4.0. The application itself resides on an AIX 5.21 box. The problem is sporadic. The only way our end users can get around it is to exit the application and log back in. -Original Message- From: James Black [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 8:40 AM To: Tomcat Users List Subject: Re: Too many open files on Solaris HasanA wrote: I am having similar problem and i am running Tomcat 4.0 on Open vms 7.2. We have increased number of files open by a process to some ridiculous value but this error is still comming up. Can someone also help with this issue? If you are opening up database connections or files on the local system, you may not be closing the connection. You can use a program called losf, which is available from www.sunfreeware.com and see what it tells you about which process has the descriptors open. -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] - This electronic message may contain information that is confidential and/or legally privileged. It is intended only for the use of the individual(s) and entity named as recipients in the message. If you are not an intended recipient of this message, please notify the sender immediately and delete the material from any computer. Do not deliver, distribute or copy this message, and do not disclose its contents or take any action in reliance on the information it contains. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Vexing session creation issue
Never mind... as usual, it was a stupid developer trick... Turns out I forgot two JSP's that get loaded, and they didn't have session=false in them, so that explains it. My bad. Frank From: Frank Zammetti [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Vexing session creation issue Date: Wed, 16 Jun 2004 10:35:43 -0400 I sent this to the Struts mailing list as well, but it seems like it could be a Tomcat issue as well (probably just some config option I don't know about)... Argh, this one is hurting my head... I have an application that starts out by returning index.jsp (it's the welcome file). This JSP opens a new window via JavaScript and loads into it index1.jsp. index1.jsp populates five frames of a frameset. At the end of all this, my logon screen is seen. The important thing to note here is that no Actions are executed to this point, it's just loading JSP's, and there is not really any JSP code in any of these except for a bunch of request.getContextPath() calls. No code accesses session or anything like that, and there are only two references to getting anything out of request (because the logon page might be shown after a bad attempt, and I need to get the userID and password that was attempted). In all of them, I have session=false in the page tag. Now... I've created a SessionListener to tell me when a session is created or destroyed. Problem is, during all these JSP loads, the create event fires TWICE! What's worse, session is NOT null (which I expected it to be), and worse still, I'm getting two DIFFERENT session ID's! It looks like two sessions are being created when it seems like absolutely NONE should be. I'm banging my head against the wall with this one. Anyone have any ideas? Thanks folks! Frank _ MSN 9 Dial-up Internet Access fights spam and pop-ups now 3 months FREE! http://join.msn.click-url.com/go/onm00200361ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Toolbar provides one-click access to Hotmail from any Web page FREE download! http://toolbar.msn.click-url.com/go/onm00200413ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Vexing session creation issue
Hi, The behavior you're seeing is consistent with the servlet specification. If a client chooses not to join a session (which the page session=false directive indicates), the container may still create sessions for the client, just that it will be a new session each time, with a new ID and empty attributes. This is in the Servlet Spec but summarized nicely in the 2nd to last paragraph of the HttpSession class JavaDoc. Yoav Shapira Millennium Research Informatics -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 10:36 AM To: [EMAIL PROTECTED] Subject: Vexing session creation issue I sent this to the Struts mailing list as well, but it seems like it could be a Tomcat issue as well (probably just some config option I don't know about)... Argh, this one is hurting my head... I have an application that starts out by returning index.jsp (it's the welcome file). This JSP opens a new window via JavaScript and loads into it index1.jsp. index1.jsp populates five frames of a frameset. At the end of all this, my logon screen is seen. The important thing to note here is that no Actions are executed to this point, it's just loading JSP's, and there is not really any JSP code in any of these except for a bunch of request.getContextPath() calls. No code accesses session or anything like that, and there are only two references to getting anything out of request (because the logon page might be shown after a bad attempt, and I need to get the userID and password that was attempted). In all of them, I have session=false in the page tag. Now... I've created a SessionListener to tell me when a session is created or destroyed. Problem is, during all these JSP loads, the create event fires TWICE! What's worse, session is NOT null (which I expected it to be), and worse still, I'm getting two DIFFERENT session ID's! It looks like two sessions are being created when it seems like absolutely NONE should be. I'm banging my head against the wall with this one. Anyone have any ideas? Thanks folks! Frank _ MSN 9 Dial-up Internet Access fights spam and pop-ups - now 3 months FREE! http://join.msn.click-url.com/go/onm00200361ave/direct/01/ - 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: question
Hi, Didn't we discuss this last week? ;) Anyways, don't put your webapp under webapps/ROOT: put it under the webapps folder itself. Put all your classes in packages to establish a good habit. Use explicit imports for your classes unless they're in the same package as the class using the imports. Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 10:39 AM To: tomcat-user Subject: question Question, please. I have a web application... named matrici/web so i have a tree like this matrici/web/ -many jsp files -WEB-INF/ --web.xml --classes/ --lib/ my application is under $CATALINA_HOME/webapps/ROOT I put my extern class, CreaServizio.class in WEB-INF/classes/ is it right? do i have to create a package for that class? or do i have to use an explicit import instruction? It returns me an error cannot resolve symbol symbol : variable CreaServizio CreaServizio is a class Angelo - 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: question
== Date: Wed, 16 Jun 2004 16:35:26 +0200 From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: tomcat-user [EMAIL PROTECTED] Subject: question == Question, please. I have a web application... named matrici/web so i have a tree like this matrici/web/ -many jsp files -WEB-INF/ --web.xml --classes/ --lib/ my application is under $CATALINA_HOME/webapps/ROOT I put my extern class, CreaServizio.class in WEB-INF/classes/ is it right? do i have to create a package for that class? It returns me an error cannot resolve symbol symbol : variable CreaServizio CreaServizio is a class Angelo A little bit more information, please: 1. CreaServizio is servlet? 2. the error is a compilation one? G -- Giuseppe Briotti [EMAIL PROTECTED] Alme Sol, curru nitido diem qui promis et celas aliusque et idem nasceris, possis nihil urbe Roma visere maius. (Orazio) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple requests sharing the same Servlet instance
Yes, those are useful objects, but they can be set at init() time, so there is no point in pooling since only one instance is needed. - Original Message - From: QM [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 8:04 PM Subject: Re: Multiple requests sharing the same Servlet instance On Wed, Jun 16, 2004 at 07:53:07PM +0530, Keith Hankin wrote: : Maybe I'm being dumb, but it seems to me that based upon what I'm hearing, : there is no benefit of doing Servlet instance pooling since the Servlets : aren't true objects; they are merely places to put code, since no local : state is useful. Depends on how you look at it: they are true objects in that they are self-referential, and hold some (shareable) state. Check out the javadoc for the HttpServlet class: by default, the ServletConfig and some other vars are shared, and you're more than welcome to share thread-safe objects (such as a logger). I'd certainly call those local objects useful. =) -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]
tomcat and Apache/mod_security
Does anyone have any experience using Tomcat with Apache and the mod_security module? I run a mutual SSL site using Apache and Tomcat, and wonder if anyone has experience with this. thanks in advance.
RE: question
Hi, You need to have the correct package in /classes : If CreaServizio.class is the package org.company you should have : matrici/web/ -many jsp files -WEB-INF/ --web.xml --classes/org/company/CreaServizio.class -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Envoyé : mercredi 16 juin 2004 16:39 À : tomcat-user Objet : question Question, please. I have a web application... named matrici/web so i have a tree like this matrici/web/ -many jsp files -WEB-INF/ --web.xml --classes/ --lib/ my application is under $CATALINA_HOME/webapps/ROOT I put my extern class, CreaServizio.class in WEB-INF/classes/ is it right? do i have to create a package for that class? or do i have to use an explicit import instruction? It returns me an error cannot resolve symbol symbol : variable CreaServizio CreaServizio is a class Angelo - 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: question
Yes. ALl your classes should be ina package: http://jakarta.apache.org/tomcat/faq/classnotfound.html -Tim [EMAIL PROTECTED] wrote: Question, please. I have a web application... named matrici/web so i have a tree like this matrici/web/ -many jsp files -WEB-INF/ --web.xml --classes/ --lib/ my application is under $CATALINA_HOME/webapps/ROOT I put my extern class, CreaServizio.class in WEB-INF/classes/ is it right? do i have to create a package for that class? or do i have to use an explicit import instruction? It returns me an error cannot resolve symbol symbol : variable CreaServizio CreaServizio is a class - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting the Session Id length
In your Host or Context declaration, you'll need to create to add a element to declare your session manager. Then add the property: sessionIdLength=42 or whatever length you'd like. It might be as simple as: Manager sessionIdLength=42/ -Tim James Maidment wrote: Hi, Fairly recently, methods appeared in org.apache.catalina.session.ManagerBase (setSessionIdLength()) to allow variation of the Session Id length, however I can't find any way of actually calling these methods. Can anyone tell me how this parameter should be set? (I'm using the embedded Tomcat within JBoss) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat UserDatabase
Is there an accepted way for an application to directly access/manipulate the tomcat-users.xml database? I would like to automate the process of adding users from my servlet but I am having a hard time finding documentation/samples of how to do this. It may just be that I don't know how to grant access to this resource to my app. I have added a line like grant codeBase file:${catalina.home}/webapps/my_appt/WEB-INF/classes/- { permission java.security.AllPermission; }; to the catalina.policy file. My code compiles but I get a java.lang.NoClassDefFoundError: org/apache/catalina/realm/UserDatabaseRealm error that I assume is due to an access restriction. Any ideas? Thanks in advance. Robert
Re: question
On Wed, Jun 16, 2004 at 04:39:28PM +0200, [EMAIL PROTECTED] wrote: : I put my extern class, CreaServizio.class in WEB-INF/classes/ is it right? : do i have to create a package for that class? Did you try to put it in a package? What happened? Yes, it's required. : or do i have to use an explicit import instruction? yes, unless your servlet is in the same package as the class (though it's considered good form -- and forward-thinking -- to explicitly import, even from the same package) -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deployment to ROOT context
Well, can you please help me to set up tomcat properly. My needs are to have the servlet which handles all requests to server: so, requests like http://myserver.con/somecontextpath/somescript will be handeled as well as http://myserver.con/anothercontextpath/anotherscript. I see that by default Tomcat is configured to use Default servlet to handle such requests. I would use my own. Can you please help me? On Wednesday 16 June 2004 17:20, Shapira, Yoav wrote: Hi, The path for the root context is not /. The directory name ROOT is just a choice: the context whose path is doesn't have to be located at a directory named ROOT. Yoav Shapira Millennium Research Informatics -Original Message- From: Arsen A. Gutsal [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 10:14 AM To: [EMAIL PROTECTED] Subject: Deployment to ROOT context Hello all. I have such problem: I'm working on some web-application and I need my servlet change default servlet. So I'm publishing my web-application to default (ROOT) context (/). I'm using NetBeans 3.6 and tomcat 5.0.19. When I try to deploy my web-application automatically I'm getting strange problems like: No context exists for path / or IllegalStateException: Container StandardContext[] has not been started. I will appreciate any help. On Wednesday 16 June 2004 17:04, [EMAIL PROTECTED] wrote: Hi! This is the ezmlm program. I'm managing the [EMAIL PROTECTED] mailing list. I'm working for my owner, who can be reached at [EMAIL PROTECTED] Acknowledgment: I have added the address [EMAIL PROTECTED] to the tomcat-user mailing list. Welcome to [EMAIL PROTECTED] Please save this message so that you know the address you are subscribed under, in case you later want to unsubscribe or change your subscription address. --- Administrative commands for the tomcat-user list --- I can handle administrative requests automatically. Please do not send them to the list address! Instead, send your message to the correct command address: To subscribe to the list, send a message to: [EMAIL PROTECTED] To remove your address from the list, send a message to: [EMAIL PROTECTED] Send mail to the following for info and FAQ for this list: [EMAIL PROTECTED] [EMAIL PROTECTED] Similar addresses exist for the digest list: [EMAIL PROTECTED] [EMAIL PROTECTED] To get messages 123 through 145 (a maximum of 100 per request), mail: [EMAIL PROTECTED] To get an index with subject and author for messages 123-456 , mail: [EMAIL PROTECTED] They are always returned as sets of 100, max 2000 per request, so you'll actually get 100-499. To receive all messages with the same subject as message 12345, send an empty message to: [EMAIL PROTECTED] The messages do not really need to be empty, but I will ignore their content. Only the ADDRESS you send to is important. You can start a subscription for an alternate address, for example [EMAIL PROTECTED], just add a hyphen and your address (with '=' instead of '@') after the command word: [EMAIL PROTECTED] To stop subscription for this address, mail: [EMAIL PROTECTED] In both cases, I'll send a confirmation message to that address. When you receive it, simply reply to it to complete your subscription. If despite following these instructions, you do not get the desired results, please contact my owner at [EMAIL PROTECTED] Please be patient, my owner is a lot slower than I am ;-) --- Enclosed is a copy of the request I received. Return-Path: [EMAIL PROTECTED] Received: (qmail 5210 invoked by uid 99); 16 Jun 2004 14:04:43 - Received: from [217.196.165.116] (HELO marlboro.softsky.com.ua) (217.196.165.116) by apache.org (qpsmtpd/0.27.1) with ESMTP; Wed, 16 Jun 2004 07:04:43 -0700 Received: from trussardi.softsky.com.ua (trussardi.softsky.com.ua [192.168.0.3]) by marlboro.softsky.com.ua (Postfix) with ESMTP id C325B48E8 for tomcat-user-sc.1087394577.kncghobmmenifedhklpn- [EMAIL PROTECTED] a.apache.org; Wed, 16 Jun 2004 16:42:23 +0300 (EEST) From: Arsen A. Gutsal [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Organization: SOFTSKY To: tomcat-user-sc.1087394577.kncghobmmenifedhklpn- [EMAIL PROTECTED] .apache.org Subject: SUBSCRIBE Date: Wed, 16 Jun 2004 17:04:27 +0300 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: [EMAIL PROTECTED] X-Virus-Checked: Checked -- Sincerely, Arsen A. Gutsal SOFTSKY Cost Effective Software Development http://www.softsky.com.ua - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a
Re: Setting JAVA_HOME and CATALINA_HOME on XP
Hi Jason, Thanks for the inputs I have added the following lines under the system variables Variable name: CATALINA_HOME Variable value: c:\jakarta-tomcat-5.0.19 and my JAVA_HOME is defined in the following way also under system variables as Variable name: JAVA_HOME Variable value : C:\j2sdk1.4.2_01\bin another system variable defined as Variable name: Path Variable value: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\j2sdk1.4.2_01\bin;c:\cis53; one last piece of info is another system variable called Variable name:classpath Variable value: c:\j2sdk1.4.2_01\bin The above Path and classpath system variables defined let's me compile my java classes normally but for running them I have to type C:\java -classpath . {java class file name} I have tried to outline all the things that I have on my system. Let me know of your inputs. Thanks, Bader --- Jason L. West, Sr. [EMAIL PROTECTED] wrote: On WinXP you will want to set these in the Environment Variables located under properties of My Computer. You can get there by right clicking on the My Computer icon and selecting properties. When the new window comes up click on the Advance tab and then select the Environment Variables button located at the bottom of the screen. This is where you will set up the new System Variables for the applications. CATALINA_HOME and JAKARTA_HOME as System variables click on the new button and then insert the information required. For example: Variable Name: CATALINA_HOME Variable Value: c:\tomcat Variable Value being the root directory for the tomcat installation. This may differ with your setup. Let me know if you have any questions on this. Jason L. West, Sr. Internet Application Specialist, Sr. Bader Qurashi wrote on 6/16/2004, 01:45: Hi, I want to run servlets and JSP pages on tomcat but I am having problems with the installation of tomcat. I am not sure how to configure the JAVA_HOME and CATALINA_HOME envioronment variables could someone help me with this. I have tried google and yahoo search and tried configuring it to some of the recommendation but to no avail. Thanks, Bader __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail - 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] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Vexing session creation issue
This is what my research is indicating too, but there seems to be quite a bit of confusion over this point, and not just from me, I've seen a number of posts along these lines... If I call request.getSession(false), the javadocs says of the getSession() method: Returns the current HttpSession associated with this request or, if if there is no current session and create is true, returns a new session. If create is false and the request has no valid HttpSession, this method returns null. But this is not the behavior I'm seeing in my Logon Action... I am in fact NOT getting null back, I am getting a valid session (which no attributesn though). This is in line with what you said, but it seems the javadocs is wrong, and this means that you can never reliably check if a session is null by simply doing session==null, you instead must check if some attribute is present or not to indicate if it's a live session (which is what I was doing previously, I was trying to not do it because it seemed inelegant) because it seems that when a session is invalidated or times out or of course is newly created, the attribute won't be present. Am I missing something, or is the javadocs in fact incorrect here? Frank From: Shapira, Yoav [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: Vexing session creation issue Date: Wed, 16 Jun 2004 10:47:07 -0400 Hi, The behavior you're seeing is consistent with the servlet specification. If a client chooses not to join a session (which the page session=false directive indicates), the container may still create sessions for the client, just that it will be a new session each time, with a new ID and empty attributes. This is in the Servlet Spec but summarized nicely in the 2nd to last paragraph of the HttpSession class JavaDoc. Yoav Shapira Millennium Research Informatics -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 10:36 AM To: [EMAIL PROTECTED] Subject: Vexing session creation issue I sent this to the Struts mailing list as well, but it seems like it could be a Tomcat issue as well (probably just some config option I don't know about)... Argh, this one is hurting my head... I have an application that starts out by returning index.jsp (it's the welcome file). This JSP opens a new window via JavaScript and loads into it index1.jsp. index1.jsp populates five frames of a frameset. At the end of all this, my logon screen is seen. The important thing to note here is that no Actions are executed to this point, it's just loading JSP's, and there is not really any JSP code in any of these except for a bunch of request.getContextPath() calls. No code accesses session or anything like that, and there are only two references to getting anything out of request (because the logon page might be shown after a bad attempt, and I need to get the userID and password that was attempted). In all of them, I have session=false in the page tag. Now... I've created a SessionListener to tell me when a session is created or destroyed. Problem is, during all these JSP loads, the create event fires TWICE! What's worse, session is NOT null (which I expected it to be), and worse still, I'm getting two DIFFERENT session ID's! It looks like two sessions are being created when it seems like absolutely NONE should be. I'm banging my head against the wall with this one. Anyone have any ideas? Thanks folks! Frank _ MSN 9 Dial-up Internet Access fights spam and pop-ups - now 3 months FREE! http://join.msn.click-url.com/go/onm00200361ave/direct/01/ - 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] _ Watch the online reality show Mixed Messages with a friend and enter to win a trip to NY http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Override the system.outs so that no Tomcat Logfile is produced.
Is it possible with a single server.xml (or web.xml) paramter, to overide all the System.out's in my webApp so that no logfile is produced. Many thanks in advance. BB - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat UserDatabase
Hi, Tomcat-users.xml is a plain file: you can edit it manually or using a programmatic file I/O API. Alternatively, you can use JMX to invoke operations on the MemoryUserDatabase(Factory) classes: for that you code should be within a privileged context (it's a context attribute) and the common classloader repository. Yoav Shapira Millennium Research Informatics -Original Message- From: Robert Harper [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 11:00 AM To: Tomcat Users Subject: Tomcat UserDatabase Is there an accepted way for an application to directly access/manipulate the tomcat-users.xml database? I would like to automate the process of adding users from my servlet but I am having a hard time finding documentation/samples of how to do this. It may just be that I don't know how to grant access to this resource to my app. I have added a line like grant codeBase file:${catalina.home}/webapps/my_appt/WEB-INF/classes/- { permission java.security.AllPermission; }; to the catalina.policy file. My code compiles but I get a java.lang.NoClassDefFoundError: org/apache/catalina/realm/UserDatabaseRealm error that I assume is due to an access restriction. Any ideas? Thanks in advance. Robert 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]
Help moving from a ConnectionBroker to using Tomcats DB Connection pool
Hello, I need a little help Hopefully I can give the info needed. My servlets have been using this code I found a long time ago called DbConnectionBroker It works very well. I have been trying to move to the db connection pool of tomcat. They both use org.gjt.mm.mysql.Driver But here is where I am having problems. Hopefully this little piece of code is enough to help The thing that is different is the connection I get from the DbConnectionBroker is different that the one I get from / //this is what I do to use jndi ds = (DataSource)ctx.lookup(JNDICONTEXTLOOKUP); conn = ds.getConnection(); / So I guess my question is, is someone using JNDI with mysql and getting the LastInsertID.. When I use the connection broker this piece of code below works fine, but when I use it with jndi the line long newKey = ((org.gjt.mm.mysql.Statement)stmt).getLastInsertID() ; Gets a class cast exception Thanks for any help... try{ Statement stmt = conn.createStatement(); int ret = stmt.executeUpdate(ustr); rowsProcessed = ret; if ( ret == 0 ){ writeErrorInfo(userID,executeSql, executeSql Failed - non fatal error , no rows processed, no rows processed,-1); stmt.close(); return -1; } long newKey = ((org.gjt.mm.mysql.Statement)stmt).getLastInsertID() ; stmt.close(); return (int)newKey; }catch (SQLException e){ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Setting the Session Id length
Setters on Catalina components are usually reflected in attributes in the corresponding server.xml element. Benjamin J. Armintor Operations Systems Specialist ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: James Maidment [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 9:40 AM To: [EMAIL PROTECTED] Subject: Setting the Session Id length Hi, Fairly recently, methods appeared in org.apache.catalina.session.ManagerBase (setSessionIdLength()) to allow variation of the Session Id length, however I can't find any way of actually calling these methods. Can anyone tell me how this parameter should be set? (I'm using the embedded Tomcat within JBoss) Many thanks, James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Override the system.outs so that no Tomcat Logfile is produced.
Hi, It's possible to redirect System.out/System.err from each webapp to the context's log instead of catalina.out using the Context's swallowOutput attribute. Further, you can add swallowOutput to the DefaultContext element, thereby establishing that for all webapps using one parameter in in server.xml. However, tomcat will still use System.out (which goes to $CATALINA_HOME/logs/catalina.out by default) for some of its own logging: you can configure that further by configuring commons-logging (see the tomcat FAQ entry on configuring tomcat's internal logging). I think even with these configuration entries, however, the catalina.out file will still be touched, so it will be produced although stay at zero size. You can probably avoid even the latter using OS-specific redirection syntax, such as 21 /dev/null or whatever. Yoav Shapira Millennium Research Informatics -Original Message- From: Ben Bookey [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 11:14 AM To: Tomcat User List Subject: Override the system.outs so that no Tomcat Logfile is produced. Is it possible with a single server.xml (or web.xml) paramter, to overide all the System.out's in my webApp so that no logfile is produced. Many thanks in advance. BB - 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: DBCP pooling error
I'm running Tomcat 4.12 and trying to setup the DBCP. I followed everything outlined on the Jakarta/Tomcat site for setting up a DBCP for Oracle 8.1.7 but I'm still receiving the following message: Cannot load JDBC driver class 'null' Any help would be appreciated, thanks! Chris Bliesner Lead Oracle DBA/Unix admin Wk Phone 915-834-1757
Re: Deployment to ROOT context
Well, can you please help me to set up tomcat properly. My needs are to have the servlet which handles all requests to server: so, requests like http://myserver.con/somecontextpath/somescript will be handeled as well as http://myserver.con/anothercontextpath/anotherscript. I see that by default Tomcat is configured to use Default servlet to handle such requests. I would use my own. Can you please help me? On Wednesday 16 June 2004 17:20, Shapira, Yoav wrote: Hi, The path for the root context is not /. The directory name ROOT is just a choice: the context whose path is doesn't have to be located at a directory named ROOT. Yoav Shapira Millennium Research Informatics -Original Message- From: Arsen A. Gutsal [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 10:14 AM To: [EMAIL PROTECTED] Subject: Deployment to ROOT context Hello all. I have such problem: I'm working on some web-application and I need my servlet change default servlet. So I'm publishing my web-application to default (ROOT) context (/). I'm using NetBeans 3.6 and tomcat 5.0.19. When I try to deploy my web-application automatically I'm getting strange problems like: No context exists for path / or IllegalStateException: Container StandardContext[] has not been started. I will appreciate any help. On Wednesday 16 June 2004 17:04, [EMAIL PROTECTED] wrote: Hi! This is the ezmlm program. I'm managing the [EMAIL PROTECTED] mailing list. I'm working for my owner, who can be reached at [EMAIL PROTECTED] Acknowledgment: I have added the address [EMAIL PROTECTED] to the tomcat-user mailing list. Welcome to [EMAIL PROTECTED] Please save this message so that you know the address you are subscribed under, in case you later want to unsubscribe or change your subscription address. --- Administrative commands for the tomcat-user list --- I can handle administrative requests automatically. Please do not send them to the list address! Instead, send your message to the correct command address: To subscribe to the list, send a message to: [EMAIL PROTECTED] To remove your address from the list, send a message to: [EMAIL PROTECTED] Send mail to the following for info and FAQ for this list: [EMAIL PROTECTED] [EMAIL PROTECTED] Similar addresses exist for the digest list: [EMAIL PROTECTED] [EMAIL PROTECTED] To get messages 123 through 145 (a maximum of 100 per request), mail: [EMAIL PROTECTED] To get an index with subject and author for messages 123-456 , mail: [EMAIL PROTECTED] They are always returned as sets of 100, max 2000 per request, so you'll actually get 100-499. To receive all messages with the same subject as message 12345, send an empty message to: [EMAIL PROTECTED] The messages do not really need to be empty, but I will ignore their content. Only the ADDRESS you send to is important. You can start a subscription for an alternate address, for example [EMAIL PROTECTED], just add a hyphen and your address (with '=' instead of '@') after the command word: [EMAIL PROTECTED] To stop subscription for this address, mail: [EMAIL PROTECTED] In both cases, I'll send a confirmation message to that address. When you receive it, simply reply to it to complete your subscription. If despite following these instructions, you do not get the desired results, please contact my owner at [EMAIL PROTECTED] Please be patient, my owner is a lot slower than I am ;-) --- Enclosed is a copy of the request I received. Return-Path: [EMAIL PROTECTED] Received: (qmail 5210 invoked by uid 99); 16 Jun 2004 14:04:43 - Received: from [217.196.165.116] (HELO marlboro.softsky.com.ua) (217.196.165.116) by apache.org (qpsmtpd/0.27.1) with ESMTP; Wed, 16 Jun 2004 07:04:43 -0700 Received: from trussardi.softsky.com.ua (trussardi.softsky.com.ua [192.168.0.3]) by marlboro.softsky.com.ua (Postfix) with ESMTP id C325B48E8 for tomcat-user-sc.1087394577.kncghobmmenifedhklpn- [EMAIL PROTECTED] a.apache.org; Wed, 16 Jun 2004 16:42:23 +0300 (EEST) From: Arsen A. Gutsal [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Organization: SOFTSKY To: tomcat-user-sc.1087394577.kncghobmmenifedhklpn- [EMAIL PROTECTED] .apache.org Subject: SUBSCRIBE Date: Wed, 16 Jun 2004 17:04:27 +0300 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: [EMAIL PROTECTED] X-Virus-Checked: Checked -- Sincerely, Arsen A. Gutsal SOFTSKY Cost Effective Software Development http://www.softsky.com.ua - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a
Re: Multiple requests sharing the same Servlet instance
Yes, they're true objects. But if you instantiate more than one of them, each will have identical state. While it's possible to have different state to be set depending on different instances based upon the computing environment at the time that the Servlet object is created, I don't see how this type of different state is useful since the developer does not have any control over when Servlets are instantiated. - Original Message - From: QM [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 8:04 PM Subject: Re: Multiple requests sharing the same Servlet instance On Wed, Jun 16, 2004 at 07:53:07PM +0530, Keith Hankin wrote: : Maybe I'm being dumb, but it seems to me that based upon what I'm hearing, : there is no benefit of doing Servlet instance pooling since the Servlets : aren't true objects; they are merely places to put code, since no local : state is useful. Depends on how you look at it: they are true objects in that they are self-referential, and hold some (shareable) state. Check out the javadoc for the HttpServlet class: by default, the ServletConfig and some other vars are shared, and you're more than welcome to share thread-safe objects (such as a logger). I'd certainly call those local objects useful. =) -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: DBCP pooling error
I believe you need to move the Oracle classes12.jar and nls_charset12.jar files into your Tomcat\common\lib directory. -Original Message- From: Bliesner, Christopher P [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 8:34 AM To: Tomcat Users List Subject: re: DBCP pooling error Importance: High I'm running Tomcat 4.12 and trying to setup the DBCP. I followed everything outlined on the Jakarta/Tomcat site for setting up a DBCP for Oracle 8.1.7 but I'm still receiving the following message: Cannot load JDBC driver class 'null' Any help would be appreciated, thanks! Chris Bliesner Lead Oracle DBA/Unix admin Wk Phone 915-834-1757 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DBCP pooling error
Hi David--I have the classes12.jar file there already but never heard of the nls_charset12.jar. What does that help with and where can I get a copy of that. Thx. Chris Bliesner Lead Oracle DBA/Unix admin Wk Phone 915-834-1757 -Original Message- From: David Short [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 9:42 AM To: 'Tomcat Users List' Subject: RE: DBCP pooling error I believe you need to move the Oracle classes12.jar and nls_charset12.jar files into your Tomcat\common\lib directory. -Original Message- From: Bliesner, Christopher P [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 8:34 AM To: Tomcat Users List Subject: re: DBCP pooling error Importance: High I'm running Tomcat 4.12 and trying to setup the DBCP. I followed everything outlined on the Jakarta/Tomcat site for setting up a DBCP for Oracle 8.1.7 but I'm still receiving the following message: Cannot load JDBC driver class 'null' Any help would be appreciated, thanks! Chris Bliesner Lead Oracle DBA/Unix admin Wk Phone 915-834-1757 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using Tomcat's HTTP processor and SSL
I am considering using Tomcat alone as my HTTP server as well as my servlet container with SSL configured. I know a lot of people use Apache HTTP Server instead of Tomcat for this and Tomcat is just the servlet container only. Is there any reason why I should not use just Tomcat alone for this. I'm actually using JBOSS with Tomcat, but Tomcat still handles the HTTP and servlet requests. I have no static pages at all on my site. Seems like a hassle to configure a separate server (Apache HTTP) when I don't have to. Unless there is a good reason (i.e. performance) to do so. I am using v4.1.28 Thanks for any help or suggestions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to (Unique value)?
Unique keys are generated by using the AUTO_INCREMENT attribute on an integer column. http://dev.mysql.com/doc/mysql/en/example-AUTO_INCREMENT.html Andy -Original Message- From: A Z [mailto:[EMAIL PROTECTED] Sent: 16 June 2004 12:28 To: [EMAIL PROTECTED] Subject: How to (Unique value)? 4.0.14 Its rather a general SQL question, I'll ask it as I'm using MySQL. An converted table has field of type VarChar(6), containing alphanumeric chars. Is it possible to run a query to generate a unique key so this can be used for new record? regards ___ALL-NEW Yahoo! Messenger - so many all-new ways to express yourself http://uk.messenger.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Caused by: java.lang.IllegalStateException: Context path is already in use
Getting subj during deploying into root () context. Who may help me? -- Sincerely, Arsen A. Gutsal SOFTSKY Cost Effective Software Development http://www.softsky.com.ua - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using Tomcat's HTTP processor and SSL
In what I've read people use Apache+Tomcat because better performance in apache serving static content, and the potential to use PHP served by apache for example. In the case that you only use dinamic java code, it's better because it's easier to mantain one service that two!!! But I'ver read too that performance for SSL is far better in apache so people make the ssl in apache and serve dinamic content with tomcat, but I've no experience (until now) so I'm talking only what I've read... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RE: Please introduce a good Tomcat debug tool
Deepak, and All, I have JBuilder 9 developer edition. But the version of the embeded Tomcat is 4.1. We want to use Tomcat 5.1.9. Do you have some detail instruction for adding Tomcat 5 to the server configuration in Jbuilder 9 (I am preparing doing it)? Thanks a lot. Also thanks for all the other replies. -Original Message- From: deepak shripat mane [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 15, 2004 9:26 PM To: Tomcat Users List Subject: Re: RE: Please introduce a good Tomcat debug tool Hii.. You can use Eclipse or JBuilder with tomcat server for debugging and Tracing servlet and JSP Page or u can use third party tool for program Deepak On Wed, 16 Jun 2004 Michael Cardon wrote : I use eclipse with the 'myeclipse' plug-in. see www.eclipse.org and www.myeclipseide.com -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 15, 2004 12:13 PM To: Tomcat Users List Subject: Please introduce a good Tomcat debug tool I currently run Tomcat 4.1.9 (without apache) to run JSP and ervlet. How to debug JSP and Servelt in TOMCAT? 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Classloading in Tomcat
I have rewritten my earlier question... Hrm if I start tomcat with: c:\java\jdk\bin\java -Djava.endorsed.dirs=c:\java\tomcat\common\endorsed -classpath c:\java\jdk\lib\tools.jar;c:\java\tomcat\bin\bootstrap.jar -Dcatalina.base=c:\java\tomcat -Dcatalina.home=c:\java\tomcat -Djava.io.tmpdir=c:\java\tomcat\temp org.apache.catalina.startup.Bootstrap start It works!!! But if I do it from Eclipse: Main class: org.apache.catalina.startup.Bootstrap Program arguments: start VM arguments: -Djava.endorsed.dirs=c:\java\tomcat\common\endorsed -Dcatalina.base=c:\java\tomcat -Dcatalina.home=c:\java\tomcat -Djava.io.tmpdir=c:\java\tomcat\temp Local directory: C:\Java\tomcat\bin Classpath bootstrap entries: c:\Java\jdk\jre\lib\rt.jar User entries: bootstrap.jar (TOMCAT) and tools.jar (JDK) It starts but it does not find any default jars (like from WEB-INF/lib) unless I put them to class path. What's different in first and second way to start Tomcat? Why the second method doesn't work well? My regards, Vladas