what does j_security_check do in clustering?
Dear Tomcat, I meet a problem when config a web project which using the form based security in clustering. When I set session affinity = true in my front http server, the security check was done in single node, there is no problem with that. But if I set affinity = false, the requests from the security check process are sent to 2 nodes, and it is really strange.. eg: 1. From index.html(NodeA), try to access protected resouce 2. Go to the logon.html(NodeB), I input the id/passwd, and then submit 3. The request looks like sent to NodeA, but did not do any check operation. Does that work as design? that is, if I wanna use form check security, my cluster must be session affinity? Thanks in advance! -Rex
Re: java.lang.UnsupportedClassVersionError
2009/9/17 Phani Raj Kumar bphanirajku...@gmail.com Exception in thread main java.lang.UnsupportedClassVersionError: org/apache/catalina/startup/Bootstrap (Unsupported major.minor version 49.0) JDK version: 1.6.0 For some reason, Tomcat isn't using that JDK - it's using some other one somewhere on the system. What does version.sh tell you? - Peter
Re: Tomcat Realm Auto-Relogin after Session-Timeout Problem
Christopher Schultz-2 wrote: This is a question that you will have to answer: what information is absolutely necessary for you to resume a user interaction in-progress? Whatever that is, you'll need to include that information in every single link that a user can click on (or in every form they can submit). The problem is that to resume a user interaction in-progress after a re-login I need informations binded as attributes in the expired session. After a re-login I would like to 'resume' old session instead of to use e new empty one. Is it possible? Alberto -- View this message in context: http://www.nabble.com/Re%3A-Tomcat-Realm-Auto-Relogin-after-Session-Timeout-Problem-tp25479941p25487080.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Realm Auto-Relogin after Session-Timeout Problem
atroiano wrote: Christopher Schultz-2 wrote: This is a question that you will have to answer: what information is absolutely necessary for you to resume a user interaction in-progress? Whatever that is, you'll need to include that information in every single link that a user can click on (or in every form they can submit). The problem is that to resume a user interaction in-progress after a re-login I need informations binded as attributes in the expired session. After a re-login I would like to 'resume' old session instead of to use e new empty one. Is it possible? The way you describe? No. If you want this then you have a couple of options: a) Do what Chris said and pass state back and forth in the request/repsonse b) Buy more memory and have longer session expiration times c) Look into using the persistent session manager Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Internal Server Error debug
aditya darbha wrote: HelloI am using an application which is using Tomcat. My application takes sometime to perform an operation ( more than a hour), in the mean time I just display a progress message in the browser. However after sometime ( after about 50-55 minutes), the server throws an error saying Internal Server Error. I am trying to figure out what is happening in the server by looking at the logs. I have checked Stdout and STDerr logs and they are clean and seem to indicate nothing that is wrong. Try the Tomcat logs. There will be a stack trace somewhere. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: what does j_security_check do in clustering?
Rex Wang wrote: Dear Tomcat, I meet a problem when config a web project which using the form based security in clustering. Clustering or load-balancing? Whether or not session replication is configured between your Tomcat instance's is key. When I set session affinity = true in my front http server, the security check was done in single node, there is no problem with that. But if I set affinity = false, the requests from the security check process are sent to 2 nodes, and it is really strange.. eg: 1. From index.html(NodeA), try to access protected resouce 2. Go to the logon.html(NodeB), I input the id/passwd, and then submit 3. The request looks like sent to NodeA, but did not do any check operation. Does that work as design? that is, if I wanna use form check security, my cluster must be session affinity? That depends on the answer to the question above. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Problem sending PDF from Tomcat thru IIS (mod_jk)
I have a java servlet the sends the PDF-file. Works fine when I browsing directly to Tomcat but not when trying to get the PDF thru IIS. IIS 6.0 Tomcat 6.0 isapi_redirect-1.2.28 MS Windows Server 2003 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: java.lang.UnsupportedClassVersionError
Thanks peter, Actually JDK was pointing to 1.4 so was not working. After it is changed to 1.6 it is now working fine. On Thu, Sep 17, 2009 at 12:35 PM, Peter Crowther peter.crowt...@melandra.com wrote: 2009/9/17 Phani Raj Kumar bphanirajku...@gmail.com Exception in thread main java.lang.UnsupportedClassVersionError: org/apache/catalina/startup/Bootstrap (Unsupported major.minor version 49.0) JDK version: 1.6.0 For some reason, Tomcat isn't using that JDK - it's using some other one somewhere on the system. What does version.sh tell you? - Peter
Re: Problem sending PDF from Tomcat thru IIS (mod_jk)
ronnie.furus...@knowit.se wrote: I have a java servlet the sends the PDF-file. Works fine when I browsing directly to Tomcat but not when trying to get the PDF thru IIS. IIS 6.0 Tomcat 6.0 isapi_redirect-1.2.28 MS Windows Server 2003 http://catb.org/~esr/faqs/smart-questions.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Number of threads
On apache side i assume we are talking about worker MPM. I usually do it with ps -eLf | grep apache ( or what ever user apache is running on ) or enable server-status in the apache config and hit https://yourserver/server-status. this will even give u the state of thread. On Wed, Sep 16, 2009 at 3:03 PM, Roger David Powers prog...@yahoo.comwrote: The 'manager' web app status page gives the number of threads in use by connector. Try hitting http://a.b.c.d/manager/status to bring up this page. I've also used JMX and jconsole to monitor such things. I used chapter 16 of Professional Apache Tomcat 6 as a reference of how to use JMX with Tomcat. Can't help w/ the Apache side. RDP --- On Mon, 9/7/09, keeplearning p_sodh...@yahoo.com wrote: From: keeplearning p_sodh...@yahoo.com Subject: Number of threads To: users@tomcat.apache.org Date: Monday, September 7, 2009, 5:50 PM How do I know how many threads are being used during a test run (both tomcat and apache)? We used to have some tools for that but not currently in the new environment. Thanks in advance -- View this message in context: http://www.nabble.com/Number-of-threads-tp25336823p25336823.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Create FileInputStream in servlet from remote file with accentuated character name
I have a problem with Tomcat 6.0 on Linux and I haven't been able to determine the cause or solution. I have a shared directory on a windows system named SHAREDDIR and containing one file named fichié.txt I mount this shared directory on my Linux system with the following command: mount -t cifs -o iocharset=utf8 //IpWindows/SHAREDDIR /home/me/mountDir/ In a standalone Java application running on my Linux system, I can create a FileInputStream from the file located in the remote directory like this: String mountPath = /home/me/mountDir; File[] list = new File(mountPath).listFiles(); File file = list[0]; try { FileInputStream fStream = new FileInputStream(file); } catch (FileNotFoundException e) { e.printStackTrace(); } When I execute the same code in a servlet running on the same machine, the call to FileInputStream constructor always throws a FileNotFountException because it doesn't recognize the é character in the path of the file. When I rename my file on my windows shared directory in fichie.txt, the servlet is executed without any errors. Since I don't know what the problem is I have had a hard time tracking down a solution online. I especialy take care to follow all steps described in the FAQ/CharacterEncoding parts of wiki. Here is my configuration: I set URIEncoding in my port 8080 connector to UTF-8 (I use this port to execute my servlet) Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 URIEncoding=UTF-8 useBodyEncodingForURI=true / I use a filter to set the default encoding to UTF-8 and my first line of my doFilter method is request.setCharacterEncoding(UTF-8); I add in my servlet the set of content-type for responses to UTF-8 and my first line of my doGet method is response.setContentType(text/html;charset=UTF-8); My tomcat is started with CATALINA_OPTS=-Dfile.encoding=UTF-8 My servlet displays some debug traces and I verify that Servlet response getCharacterEncoding = UTF-8 and Servlet request getCharacterEncoding = UTF-8 Any idea why FileInputStream doesn't work in a servlet? Thanks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: access log and Apache server
There is no way. But you can alter the format property to log the Via header which does have the ip address. (But it will also have more text in it too) The javadocs for AccessLogValve have all the variables you can use. -Tim Angelo Chen wrote: Hi, I run tomcat behind an Apache server, Apache will proxy to tomcat from port 80, this works quite well, but the access log in tomcat shows only 127.0.0.1, not the real IP: 127.0.0.1 - - [17/Sep/2009:08:51:21 -0400] POST /sendmsg HTTP/1.1 302 - any idea how to have real IP in the log? Thanks, - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Re : Connection Closed Issue
Could there be a firewall dropping inactive connections between the production app.server and database? (and, naturally, no such firewall between test env. app.server and database) -- ..Juha Sharath Babu S S S wrote: Yes i have validation query specified. In developement we are having the same environment and settings there it is working fine without any issues. But in testing environment we are having this issue. Cannot figure it out why throught log files. One more exception we can find in log file is that CONNECTION NEVER CLOSED. With Regards Sharat Babu Shravanam From: Gaurav Lohiya [mailto:gloh...@gmail.com] Sent: Wed 9/16/2009 8:21 AM To: Tomcat Users List Subject: Re: Re : Connection Closed Issue Do you have the validation query specified. I believe putting in the validation query should solve the problem. On Wed, Sep 16, 2009 at 11:17 AM, Chetouani kchet...@yahoo.fr wrote: Hi, I had a similar problem. I was using tomcat and mysql and configured a connection pool using dbcp. The problem was that after some hours the application starts to throw an exception. The exception was : communication link failure The reason is that mysql is destroying the connectionz after some time (8 hours by default) and the connection pool is not aware of that I replaced dbcp by c3p0 and defined the maxConnectionAge to 3600s and the problem was solved --- En date de : Mer 16.9.09, Sharath Babu S S S sharath.b...@solix.com a écrit : De: Sharath Babu S S S sharath.b...@solix.com Objet: Connection Closed Issue À: users@tomcat.apache.org Date: Mercredi 16 Septembre 2009, 11h52 Hi all, we are using Tomcat server 5.5.20. Database is 9.0.28. After starting tomcat and using our application after sometime we are getting the following error: Can anyone suggest me, its really very urgent Thread 78: SQLException While Purging the Selected Data From Source Table java.sql.SQLException: Connection oracle.jdbc.driver.t4cconnect...@1c9e95a is closed. for CONFIG 100019 For RUN_ID 100063 Debug: AJArchiveLogDetails.java Exception Occured While Inserting Data to AJArchiveLogDetails java.sql.SQLException: Connection oracle.jdbc.dr iver.t4cconnect...@1c9e95a is closed. Debug: insertToAJArchiveLogDetails() java.sql.SQLException: Connection oracle.jdbc.driver.t4cconnect...@1c9e95ais closed. at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.checkOpen(DelegatingConnection.java:354) at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:246) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:302) at beans.AJArchiveLogDetails.insertToAJArchiveLogDetails(AJArchiveLogDetails.java:177) at beans.PurgeProcess_T.run(PurgeProcess_T.java:281) Debug: PurgeProcess_T.java: run() Thread 78: Exception While Updating the AJ_JOBS Table java.lang.Exception: java.sql.SQLException: Connection oracle.jdbc.driver.t4cconnect...@1c9e95a is closed. for CONFIG 100019 For RUN_ID 100063 Debug: PurgeProcess_T.java: run() Thread 78: Exception Releasing Resources java.sql.SQLException: Connection oracle.jdbc.driver.T4CConnection@ 1c9e95a is closed. for CONFIG 100019 For RUN_ID 100063 With Regards Sharat Babu Shravanam Byte and Switch Names Solix Technologies One of the Top 10 Startups to Watch Read More at http://www.solix.com/top10startups - CAUTION - Disclaimer * This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Solix has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Solix reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Solix e-mail system. End of Disclaimer ** -- Regards Lohiya Gaurav - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail:
Re: access log and Apache server
On 17.09.2009 15:26, Tim Funk wrote: There is no way. But you can alter the format property to log the Via header which does have the ip address. (But it will also have more text in it too) The X-Forwarded-For request header should do it. mod_proxy sets it. If you use mod_proxy_ajp, then everything is automatic, because ajp patches the request data according to the original client: http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html The javadocs for AccessLogValve have all the variables you can use. Or: http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Access%20Log%20Valve Regards, Rainer Angelo Chen wrote: Hi, I run tomcat behind an Apache server, Apache will proxy to tomcat from port 80, this works quite well, but the access log in tomcat shows only 127.0.0.1, not the real IP: 127.0.0.1 - - [17/Sep/2009:08:51:21 -0400] POST /sendmsg HTTP/1.1 302 - any idea how to have real IP in the log? Thanks, - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Configuring second tomcat instance on same box
I am trying to create second Tomcat instance on same machine. Installed Tomcat into separate folder say c:\tomcat2 and changed the conf/server.xml port numbers to different values. Basically I bumped the Server port from 8005 to 8006, connector port to 8081 from 8080 and redirectPort to 8444 (from 8443). Changes are like below. Still, when I start this second instance, I get the error saying: Several ports (8005,8009) required by Tomcat at localhost are already in use. True, they are in use as my original Tomcat instance is running on them. But I changed those port numbers for this instance in server.xml file. Do I have to change else where? Thanks much for insights and pointers. Best Srini ==Snippets from TOMCAT2_HOME\conf\server.xml ?xml version='1.0' encoding='utf-8'? Server port=8006 shutdown=SHUTDOWN !-- was 8005 originally -- . !-- was originally at 8080, 8443 -- Connector port=8081 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8444 / !-- Define an AJP 1.3 Connector on port 8010(was 8009!) -- Connector port=8010 protocol=AJP/1.3 redirectPort=8444 / !-- In above ports were 8009 and 8443 respectively, originally! -- . /Host /Engine /Service /Server This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged. The information is intended only for the use of the individual(s) or entity named above. If you are not the intended recipient, be aware that any disclosure, copying or distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify the sender immediately by replying to the address listed in the From: field. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring second tomcat instance on same box
Please don't hijack threads. Mark Nagulapalli, Srinivas wrote: I am trying to create second Tomcat instance on same machine. Installed Tomcat into separate folder say c:\tomcat2 and changed the conf/server.xml port numbers to different values. Basically I bumped the Server port from 8005 to 8006, connector port to 8081 from 8080 and redirectPort to 8444 (from 8443). Changes are like below. Still, when I start this second instance, I get the error saying: Several ports (8005,8009) required by Tomcat at localhost are already in use. True, they are in use as my original Tomcat instance is running on them. But I changed those port numbers for this instance in server.xml file. Do I have to change else where? Thanks much for insights and pointers. Best Srini ==Snippets from TOMCAT2_HOME\conf\server.xml ?xml version='1.0' encoding='utf-8'? Server port=8006 shutdown=SHUTDOWN !-- was 8005 originally -- . !-- was originally at 8080, 8443 -- Connector port=8081 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8444 / !-- Define an AJP 1.3 Connector on port 8010(was 8009!) -- Connector port=8010 protocol=AJP/1.3 redirectPort=8444 / !-- In above ports were 8009 and 8443 respectively, originally! -- . /Host /Engine /Service /Server This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged. The information is intended only for the use of the individual(s) or entity named above. If you are not the intended recipient, be aware that any disclosure, copying or distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify the sender immediately by replying to the address listed in the From: field. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring second tomcat instance on same box
This is my first post after joining the list yesterday. Please clue me in as to what the error is. Best Srini -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Please don't hijack threads. Mark This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged. The information is intended only for the use of the individual(s) or entity named above. If you are not the intended recipient, be aware that any disclosure, copying or distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify the sender immediately by replying to the address listed in the From: field. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring second tomcat instance on same box
It looks like you may have missed the shutdown port. Nagulapalli, Srinivas wrote: I am trying to create second Tomcat instance on same machine. Installed Tomcat into separate folder say c:\tomcat2 and changed the conf/server.xml port numbers to different values. Basically I bumped the Server port from 8005 to 8006, connector port to 8081 from 8080 and redirectPort to 8444 (from 8443). Changes are like below. Still, when I start this second instance, I get the error saying: Several ports (8005,8009) required by Tomcat at localhost are already in use. True, they are in use as my original Tomcat instance is running on them. But I changed those port numbers for this instance in server.xml file. Do I have to change else where? Thanks much for insights and pointers. Best Srini ==Snippets from TOMCAT2_HOME\conf\server.xml ?xml version='1.0' encoding='utf-8'? Server port=8006 shutdown=SHUTDOWN !-- was 8005 originally -- . !-- was originally at 8080, 8443 -- Connector port=8081 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8444 / !-- Define an AJP 1.3 Connector on port 8010(was 8009!) -- Connector port=8010 protocol=AJP/1.3 redirectPort=8444 / !-- In above ports were 8009 and 8443 respectively, originally! -- . /Host /Engine /Service /Server - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring second tomcat instance on same box
Mark Thomas wrote: Please don't hijack threads. Mark I don't see a thread hijack here; it came through as a new post on my installation of Thunderbird. D Nagulapalli, Srinivas wrote: I am trying to create second Tomcat instance on same machine. Installed Tomcat into separate folder say c:\tomcat2 and changed the conf/server.xml port numbers to different values. Basically I bumped the Server port from 8005 to 8006, connector port to 8081 from 8080 and redirectPort to 8444 (from 8443). Changes are like below. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring second tomcat instance on same box
http://www.urbandictionary.com/define.php?term=thread+hijacking -Original Message- From: Nagulapalli, Srinivas [mailto:srinivas.nagulapa...@starwoodvo.com] Sent: Thursday, September 17, 2009 11:30 AM To: Tomcat Users List Subject: RE: Configuring second tomcat instance on same box This is my first post after joining the list yesterday. Please clue me in as to what the error is. Best Srini -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Please don't hijack threads. Mark This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged. The information is intended only for the use of the individual(s) or entity named above. If you are not the intended recipient, be aware that any disclosure, copying or distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify the sender immediately by replying to the address listed in the From: field. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring second tomcat instance on same box
David kerber wrote: Mark Thomas wrote: Please don't hijack threads. Mark I don't see a thread hijack here; it came through as a new post on my installation of Thunderbird. Look at the headers. Specifically: In-Reply-To: 4ab2421c.1070...@kippdata.de Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring second tomcat instance on same box
From: Mark Thomas [mailto:ma...@apache.org] Look at the headers. Specifically: In-Reply-To: 4ab2421c.1070...@kippdata.de Please - how to see that in MS outlook, and what to do to prevent it? I used MS Outlook to post, had specifically new subject line, not a word from any other post. No attempt to hijack any thing to my best knowledge. Even so, my apology for something I am more clueless about its how/why. Unwittingly and ironically, this seems to have hijacked my post in turn, shifting focus from my original question! Best Srini This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged. The information is intended only for the use of the individual(s) or entity named above. If you are not the intended recipient, be aware that any disclosure, copying or distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify the sender immediately by replying to the address listed in the From: field. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring second tomcat instance on same box
From: David kerber [mailto:dcker...@verizon.net] It looks like you may have missed the shutdown port. Thanks David. I changed this line from server.xml where initially port was 8005 and I bumped it to 8006. I hope I am looking at the right thing. _ Server port=8006 shutdown=SHUTDOWN !-- 8005 originally1 -- _ This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged. The information is intended only for the use of the individual(s) or entity named above. If you are not the intended recipient, be aware that any disclosure, copying or distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify the sender immediately by replying to the address listed in the From: field. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring second tomcat instance on same box
On Sep 17, 2009, at 11:53 AM, Nagulapalli, Srinivas wrote: From: Mark Thomas [mailto:ma...@apache.org] Look at the headers. Specifically: In-Reply-To: 4ab2421c.1070...@kippdata.de Please - how to see that in MS outlook, and what to do to prevent it? I used MS Outlook to post, had specifically new subject line, not a word from any other post. No attempt to hijack any thing to my best knowledge. It sounds like to took an existing message your received, changed the subject line, and sent it. That re-use of an existing message is hijacking. When you start a new subject, you must start a fresh email to users@tomcat.apache.org Even so, my apology for something I am more clueless about its how/ why. Unwittingly and ironically, this seems to have hijacked my post in turn, shifting focus from my original question! Best Srini This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged. The information is intended only for the use of the individual(s) or entity named above. If you are not the intended recipient, be aware that any disclosure, copying or distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify the sender immediately by replying to the address listed in the From: field. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring second tomcat instance on same box
From: Ken Bowen [mailto:kbo...@als.com] It sounds like to took an existing message your received, changed the subject line, and sent it. That re-use of an existing message is hijacking. When you start a new subject, you must start a fresh email to users@tomcat.apache.org Re-use was not of existing message, but only of target to avoid mistyping any of users@tomcat.apache.org ! Only visible aspect, subject was changed. And invisible (to me!) RequestHeader? part, if only can seen in MS Outlook, its big help. Even in web-mail-Yahoo Email, gmail etc. don't recall seeing RequestHeaders. What kind of email-clients are these that hide what hurts?! This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged. The information is intended only for the use of the individual(s) or entity named above. If you are not the intended recipient, be aware that any disclosure, copying or distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify the sender immediately by replying to the address listed in the From: field. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring second tomcat instance on same box
Nagulapalli, Srinivas wrote: From: Ken Bowen [mailto:kbo...@als.com] It sounds like to took an existing message your received, changed the subject line, and sent it. That re-use of an existing message is hijacking. When you start a new subject, you must start a fresh email to users@tomcat.apache.org Re-use was not of existing message, but only of target to avoid mistyping any of users@tomcat.apache.org ! Only visible aspect, subject was changed. http://markmail.org/message/rz3rii2w4bdtines And invisible (to me!) RequestHeader? part, if only can seen in MS Outlook, its big help. Even in web-mail-Yahoo Email, gmail etc. don't recall seeing RequestHeaders. What kind of email-clients are these that hide what hurts?! http://www.google.co.uk/#q=How+to+view+email+headers Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Realm Auto-Relogin after Session-Timeout Problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 9/17/2009 4:56 AM, Mark Thomas wrote: atroiano wrote: Is it possible? The way you describe? No. +1 If you want this then you have a couple of options: a) Do what Chris said and pass state back and forth in the request/response More specifically, architect your session such that a few pieces of information can re-create the session state, rather than having to encode /all/ session state in the URL (otherwise, you'd never need the session, now, would you?). Here is a concrete example: we deliver questionnaires on-line to respondents. If their session times out in the middle of taking a questionnaire, we want them to be able to resume right where they were. We put the id of the questionnaire they are taking right into the URLs of any links, and into any forms they can submit (answering a question submits a form, so usually we're talking about POST parameters here). If the session times out, the next request (after successful authentication, that is) will have nothing available but the questionnaire id. The code that manages the questionnaire will look for the session objects, and, not finding them, will take the id from the request, reconstruct everything in the session necessary to continue the questionnaire in-progress (because the state of the /questionnaire/, not the session itself, is stored in our database), and then resume the questionnaire. So, although we have a bunch of information stored in the session in order to deliver the questionnaire quickly, the disappearance of the data in the session is tolerable: we simply recover by re-building the session information given that one special request parameter. Of course, you have to architect your application to work this way. There is no special configuration option for Tomcat (nor any other app server for that matter) that can simple recover your session for you after it expires. b) Buy more memory and have longer session expiration times c) Look into using the persistent session manager There's another option if you want drop-in session recovery. It's a giant hack, won't work except under the best of circumstances, and probably counts as bad design (it IS a giant hack), but you could: 1. Make sure everything in your session is Serializable (always a good thing) 2. Make sure every URL you use is run through response.encodeURL() (including form actions!) 3. Write a filter that does the following: a. Wraps the response in a special subclass of HttpServletResponseWrapper (see below) b. Checks for the presence of a session, then checks the session for a magic attribute (say, SESSION_CONFIGURED or whatever) c. If the magic attribute does not exist, recovers the session (see below) d. Calls the next filter in the chain 4. Write an HttpServletResponseWrapper that overrides encodeURL and encodeRedirectURL to do the following: a. Serialize all session attributes to a GzipOutputStream, then encrypt them using some decent encryption algorithm (such as 3DES, Blowfish, etc.), then add this data to the URL in a unique parameter like SESSION or whatever. Session recovery is simple: just decrypt the SESSION request parameter, deserialize the data, and shove it into the session. Instant session recovery. Here are some potential problems: * See #1 and #2 above * If you have a lot of session data, you may exceed the URL length limit * Performance will suffer due to all that encryption being done for every URL you generate But, if you have small session data, this might work. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqyZVcACgkQ9CaO5/Lv0PB8QgCfVfRlAYQfmq/OTwXrF5JNdCOA Rv0AnRHcv6bA6B+A+bGl8/Dpb2RDmepr =xUe9 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring second tomcat instance on same box
From: Mark Thomas [mailto:ma...@apache.org] http://markmail.org/message/rz3rii2w4bdtines http://www.google.co.uk/#q=How+to+view+email+headers Thanks for the links. Beats me why changing subject is linked to original mail, when user intent is so clear! Clicking Reply is to same target, and changing the darn subject makes/looks it entirely different. How reasonable, and how wrong! Those who makes such decisions about user experience must be put on polls for getting raises:-) This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged. The information is intended only for the use of the individual(s) or entity named above. If you are not the intended recipient, be aware that any disclosure, copying or distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify the sender immediately by replying to the address listed in the From: field. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Horizontal Cluster Session Persistence during Failover
serverB is not receiving multicast packets from serverA solutions: 1. fix multicasting 2. use static memberships Filip On 09/14/2009 09:06 AM, Alexander Bacon wrote: Even though my servers are configured identically (except for jvmRoutes), they're behaving differently. If the session begins on ServerA and then ServerA crashes, it will switch to ServerB and the session will not be lost. If the session begins on ServerB and crashes, it will begin a new session on ServerA. They both have the distributable tag. (From my understanding, this seems to be a potential cause.) In ServerB's log files: INFO: Manager [/test-app]: skipping state transfer. No members active in cluster group. The message: INFO: Replication member added:org.apache.catalina.tribes.membership.MemberImpl[...] is only appearing in ServerA's log files. I've found several tutorials on the web that have some similar goals and success in their implementations, but in trying to piece together their processes to have it work for me, I've had some issues resolving the discrepancies in their suggestions. The environment I'm using: Windows Server 2003 Tomcat 6.0.20 Apache HTTP Server 2.2.11 JK 1.2.28 Connector Thanks for your time. -Alexander - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Create FileInputStream in servlet from remote file with accentuated character name
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sylvie, On 9/17/2009 9:12 AM, Sylvie Perrin wrote: I have a shared directory on a windows system named SHAREDDIR and containing one file named fichié.txt I mount this shared directory on my Linux system with the following command: mount -t cifs -o iocharset=utf8 //IpWindows/SHAREDDIR /home/me/mountDir/ In a standalone Java application running on my Linux system, I can create a FileInputStream from the file located in the remote directory like this: String mountPath = /home/me/mountDir; File[] list = new File(mountPath).listFiles(); File file = list[0]; try { FileInputStream fStream = new FileInputStream(file); } catch (FileNotFoundException e) { e.printStackTrace(); } Can you have your standalone Java program print the following information: 1. The full path of the file 2. The values for these system properties: a. file.encoding b. sun.jnu.encoding When I execute the same code in a servlet running on the same machine, the call to FileInputStream constructor always throws a FileNotFountException because it doesn't recognize the é character in the path of the file. Please post the above values within your servlet environment, too. Are you sure that it's because of the é, or is it because the user that Tomcat is running under does not have permission to read that file? Under what user /is/ Tomcat running? Since I don't know what the problem is I have had a hard time tracking down a solution online. I especialy take care to follow all steps described in the FAQ/CharacterEncoding parts of wiki. Here is my configuration: I set URIEncoding in my port 8080 connector to UTF-8 (I use this port to execute my servlet) Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 URIEncoding=UTF-8 useBodyEncodingForURI=true / None of these settings matter. These are only relevant for HTTP communication, and your code is not reading anything from the request. I use a filter to set the default encoding to UTF-8 and my first line of my doFilter method is request.setCharacterEncoding(UTF-8); Your filter sets /what/ default encoding? What does it set it to? Setting the encoding of the request will not affect your code above. I add in my servlet the set of content-type for responses to UTF-8 and my first line of my doGet method is response.setContentType(text/html;charset=UTF-8); This will also have no effect. My tomcat is started with CATALINA_OPTS=-Dfile.encoding=UTF-8 Okay. Let's see what your command-line program reports for file.encoding, etc. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqyZxQACgkQ9CaO5/Lv0PArBACdGM53y+0/2L1lkf3gvngXpnAz 8D8An3pjgMT4jBOk6jg+zRNEXGORzJ1G =v9Bf -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring second tomcat instance on same box
before yo go lambasting about the inner workings of email, read the RFC. Now we've all made the mistake of changing subject lines. So can we please move on now Thanx Sent via BlackBerry from T-Mobile - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How do I get hold of Tomcat JDBC pool lib
http://people.apache.org/~fhanik/jdbc-pool/ On 09/16/2009 09:18 AM, Gaurav Lohiya wrote: Hi, I recently heard about the new Tomcat JDBC library, an alternative for the DBCP lib. We see concurrency issues with the DBCP lib and are desperately looking for a lib which can work in a highly concurrent application. Had some questions about this lib... 1. Can this library be used with Tomcat 5.0.25. (ya I know this version was used in the stone age :)) ) 2. Is there a general release available 3. Where can I get binaries / src for the latest build (GA or beta) Thanks in advance for your help. - Gaurav - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat url rewrite
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 William, On 9/16/2009 10:04 PM, WILLIAMer wrote: Let me say sorry for i didnt description the error. The error like the path is mapping incorrectly. So, what error message do you get? So the image or css are not display because of the path not find. Hmm... A part of my application structure like under /tomcat/webapps/myApp/images /css /Admin/index.jsp /index.jsp I set my application to be ROOT. The url http://myDomain/ will go my application instead of http://myDomain/myApp. Why i say http://myDomain/item_pd12/34.html let me confuse? Because i didnt have the directory named item_pd12. Oh, that will certainly be a problem. This is one of the hazards of playing games with your URLs: if you use relative URLs for static content, things break when you change the base URL of the web page. The solution? Always use fully-qualified URLs (see HttpServletResponse.encodeURL and request.getContextPath). In my jsp code, i really write some code for image or css path. Something like %String sImagePath = /myApp/images;%. For this case http://myDomain/item_pd12/34.html. I guess tomcat will to find the directory named item_pd12 under /myApp dir and didnt find my images though the sImagePath. If you always start your URLs with a '/', then you shouldn't have a problem. Another question, after i touch http://myDomain/item_pd12/34.html, link other page would stuck with http://myDomain/item_pd12/otherPage. But the really url i want would like http://myDomain/otherPage. Then write your URLs properly, starting with a '/'. Maybe i need to improve my code though something like relative path instead of absolute path. No, you need an absolute path instead of a relative path. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqyaNwACgkQ9CaO5/Lv0PBf3gCdHS61t5JZg2ZSjDXBQ5HxKI3N 5WAAni4/4yAaydwW41EOZ149jmFp6+XG =5jHd -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: decouple authentication and authorization of TOMCAT
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John, On 9/16/2009 5:33 PM, John Chen wrote: I think we will add the roles to AD and use AD to do the authorization as well. Because of the naming convention applied in the agency, we need to map the role defined in AD to the security-role defined in the web application. What is the best approach? I am thinking about using security-role-ref, but I have to go to each web.xml and add the information over there. security-role-ref ought to do the trick. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqyaaQACgkQ9CaO5/Lv0PASGwCghm8OwK2z7emhAFqiISoOVNLE 7VQAniFDsd013gV2NswfuzLQnDMdAG9H =1Q+a -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring second tomcat instance on same box
li...@up-south.com schrieb: before yo go lambasting about the inner workings of email, read the RFC. Now we've all made the mistake of changing subject lines. So can we please move on now Thanx Sent via BlackBerry from T-Mobile Incidentally, *your* mailer doesn't set the In-Reply-To header; so while others are merrily hijacking threads, you're even tearing them apart. Time for some serious mail crime legislation! -- Michael Ludwig - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with Tomcat 6 cluster
Sumedh: We don't see any attachments on your emails. You might want to try attaching it again, but if it didn't come through on the first or second try then the size of the attachment might have been too large. Thanks. -- Jason Brittain On Wed, Sep 16, 2009 at 10:40 AM, Sumedh Sakdeo sumedhsak...@gmail.comwrote: Hi Filip, Did log files attached help? Thanks, Sumedh On Mon, Sep 14, 2009 at 2:38 PM, Sumedh Sakdeo sumedhsak...@gmail.com wrote: Hi Filip, Please find the logs in attached file. Thanks in advance, Sumedh On Wed, Sep 9, 2009 at 9:22 AM, Filip Hanik - Dev Lists devli...@hanik.com wrote: what do your logs tell you? Filip On 09/08/2009 02:33 AM, Sumedh Sakdeo wrote: Hello All, I have a setup with two tomcat instances(AB). I have configured an apache web server 2.2 for load balancing and fail over. Setup looks fine as per the configurations suggested. Let tomcat A be handling some request at sometime. When tomcat instance(A) goes down, the session is replicated to another tomcat instance(B) successfully. Now tomcat instance B is handling those requests. Till this point everything goes fine, but when I bring up tomcat instance(A) and after that tomcat instance(B) goes down, the session is no longer replicated. What might be the issue? In status page of apache server I see even if node status is OK session is not replicated to fail over node for second time. Thanks in advance, Sumedh
Object.Wait() in thread dumps...
I am running a test and after 500 users or so, I start to see performance degradation. I have Apache as webserver and Tomcat to serve dynamic content. I took the thread dumps and I see most threads are waiting on Object.Wait as follows: at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:474) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:661) - locked [0x2aaac91012b0] (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable) at java.lang.Thread.run(Thread.java:595) It looks to me they are waiting for threads. Currently thread limit on each of 2 tomcat servers is set to 250 each. Also, I am looking at server.xml and I see multiple sections and not sure where to increase thread number. Should it be for both of the below sections? !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- !-- Define an AJP 1.3 Connector on port 8009 -- Thanks -- View this message in context: http://www.nabble.com/Object.Wait%28%29-in-thread-dumps...-tp25492105p25492105.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Object.Wait() in thread dumps...
From: keeplearning [mailto:p_sodh...@yahoo.com] Subject: Object.Wait() in thread dumps... I took the thread dumps and I see most threads are waiting on Object.Wait as follows: at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:474) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo l.java:661) - locked [0x2aaac91012b0] (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable) at java.lang.Thread.run(Thread.java:595) It looks to me they are waiting for threads. They aren't waiting for threads; those *are* threads, waiting for something to work on. That's the normal state of a Tomcat thread when no requests are present. Also, I am looking at server.xml and I see multiple sections and not sure where to increase thread number. If you're not using httpd for anything other than serving static content, consider just eliminating it and letting Tomcat handle everything. If, on the other hand, you are using httpd for something useful, then the requests for Tomcat will arrive on the AJP Connector. You can tell from the thread dump which Connector the threads are associated with. Also, if you're using Tomcat 6.0.x (you didn't bother to tell us), you can configure an Executor as a shared thread pool for all Connectors. It's all in the doc. - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: access log and Apache server
Hi Angelo. I'm assuming you're using mod_proxy_http (you said port 80). If so, then there is indeed a way to make this work. In your Apache HTTPD config, where you're configuring proxying the request, make sure you add: ProxyVia On That will make HTTPD set the x-forwarded-for HTTP request header's value to the IP address of the client. This is passed to Tomcat when HTTPD proxies the request. Then, where you're configuring the AccessLogValve (usually in your conf/server.xml file), change the default logging pattern to log the x-forwarded-for header value, like this: Host ... Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=%{x-forwarded-for}i %l %u %t %r %s %b resolveHosts=false/ /Host With that configuration, AccessLogValve will log the x-forwarded-for header value that is set by Apache HTTPD's mod_proxy, and the remainder of the logging pattern will be the same as usual. Cheers. -- Jason Brittain On Thu, Sep 17, 2009 at 6:01 AM, Angelo Chen angelochen...@yahoo.com.hkwrote: Hi, I run tomcat behind an Apache server, Apache will proxy to tomcat from port 80, this works quite well, but the access log in tomcat shows only 127.0.0.1, not the real IP: 127.0.0.1 - - [17/Sep/2009:08:51:21 -0400] POST /sendmsg HTTP/1.1 302 - any idea how to have real IP in the log? Thanks, -- View this message in context: http://www.nabble.com/access-log-and-Apache-server-tp25490807p25490807.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring second tomcat instance on same box
On 17/09/2009 17:39, Nagulapalli, Srinivas wrote: From: Mark Thomas [mailto:ma...@apache.org] http://markmail.org/message/rz3rii2w4bdtines http://www.google.co.uk/#q=How+to+view+email+headers Thanks for the links. Beats me why changing subject is linked to original mail, when user intent is so clear! Clicking Reply is to same target, and changing the darn subject makes/looks it entirely different. How reasonable, and how wrong! Perhaps you weren't aware that some mail readers track additional headers in the email, (as previously mentioned), to determine which replies refer to which other emails in the thread. It is a tree structure so one needs to monitor the branching to see where new additions should fit. Simply changing the subject line doesn't erase the headers (which you don't usually see), so your message appears abruptly in the middle of the tree. p Those who makes such decisions about user experience must be put on polls for getting raises:-) This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged. The information is intended only for the use of the individual(s) or entity named above. If you are not the intended recipient, be aware that any disclosure, copying or distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify the sender immediately by replying to the address listed in the From: field. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Create FileInputStream in servlet from remote file with accentuated character name
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sylvie, On 9/17/2009 9:12 AM, Sylvie Perrin wrote: I have a shared directory on a windows system named SHAREDDIR and containing one file named fichié.txt Sylvie, why do you not name your file fichier.txt, like it should be written in French ? That would solve your problem immediately, save a lot of ink on this thread, and save you a lot of time in the end. Seriously. There are so many pieces that play their part between on the one side a browser that you do not control, on a workstation that you do not control, in the middle HTML and HTTP for which the default character set is iso-8859-1 and Java for which the internal character set is Unicode, a local Linux filesystem which is charset-agnostic, and on the other side a Windows system which stores its filenames in directories as Unicode, that you will never get a solution that is totally foolproof. If you have to play with a web application which involves files on different platforms, stick with filenames that are purely made of US-ASCII characters. André Seriously now, let's start at the beginning. You are, like many of us, the victim of these horrible English-speaking imperialists in the computer industry. They just don't understand alphabets with more than 27 letters, and get totally confused by our és and às and cédilles and sharfe s'eses. But since they got there first (mainly because of all the anti-competitive subsidies they gave to Boeing and GM), we are the ones who have to adapt. So, you have a file, which on your Unix/Linux system looks like /home/me/mountDir/fichié.txt. Or, does it really ? Try the following : - open a console window on your Linux system - enter the command locale -a, and find 2 result lines like : fr_FR.iso8859-1 fr_FR.utf8 (or something similar, the point being to have one looking like it contains 8859-1 and the other looking like it contains utf8). - now enter export LC_CTYPE=fr_FR.iso8859-1 (adapt this in function of what you found above with locale -a) - now enter ls -l /home/me/mountDir/ How does the filename look like ? - now enter export LC_CTYPE=fr_FR.utf8 (adapt this in function of what you found above with locale -a) - now enter ls -l /home/me/mountDir/ again How does the filename look like now ? I would bet the file name looks different. Now go to your Windows systems, open the Windows Explorer, and look at what this filename loks like. Then on your Windows system, open a command window, navigate to the same directory, do a dir, and look at what the filename loks like. A difference, also ? Why is that ? The filename itself did not change in the directory of your Windows system. But the name of that file is going to look different, depending on how many layers of software there are between that directory entry and the process that uses that filename, and on the settings of each of these layers. The above are simple cases, involving just a few layers : the original directory, the CIFS filesystem drivers on your Linux machine, the ls program itself, and the display interface between that program and your console. Now you add Java and Tomcat on top of that, and you add HTTP, and you add URI encoding/decoding, and you add the browser, and you add the encoding of your html pages. In other words, give it up. I mount this shared directory on my Linux system with the following command: mount -t cifs -o iocharset=utf8 //IpWindows/SHAREDDIR /home/me/mountDir/ In a standalone Java application running on my Linux system, I can create a FileInputStream from the file located in the remote directory like this: String mountPath = /home/me/mountDir; File[] list = new File(mountPath).listFiles(); File file = list[0]; try { FileInputStream fStream = new FileInputStream(file); } catch (FileNotFoundException e) { e.printStackTrace(); } Can you have your standalone Java program print the following information: 1. The full path of the file 2. The values for these system properties: a. file.encoding b. sun.jnu.encoding When I execute the same code in a servlet running on the same machine, the call to FileInputStream constructor always throws a FileNotFountException because it doesn't recognize the é character in the path of the file. Please post the above values within your servlet environment, too. Are you sure that it's because of the é, or is it because the user that Tomcat is running under does not have permission to read that file? Under what user /is/ Tomcat running? Since I don't know what the problem is I have had a hard time tracking down a solution online. I especialy take care to follow all steps described in the FAQ/CharacterEncoding parts of wiki. Here is my configuration: I set URIEncoding in my port 8080 connector to UTF-8 (I use this port to execute my servlet) Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 URIEncoding=UTF-8
RE: Configuring second tomcat instance on same box
From: Pid [mailto:p...@pidster.com] Perhaps you weren't aware that some mail readers track additional headers in the email, (as previously mentioned), to determine which replies refer to which other emails in the thread. It is a tree structure so one needs to monitor the branching to see where new additions should fit. Simply changing the subject line doesn't erase the headers (which you don't usually see), so your message appears abruptly in the middle of the tree. Thanks for patiently explaining. So much thought put in to figure branching using additional headers, but no thought for displaying in obvious manner same headers that make it possible! This is not lambasting inner workings of email or effort in RFC. Far from it. Tool is only as good as we made it to be. Hoping some compassion and thought to user experience! PS: Also, it turned out I had all along a successfully configured second tomcat instance (by changing port numbers in server.xml). I was starting Tomcat from Eclipse using Sysdeo plugin. And the problem seems Eclipse was somehow using previous settings inspite of changing and refreshing! Deleting server config, recreating and restarting worked. Thanks Srini This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged. The information is intended only for the use of the individual(s) or entity named above. If you are not the intended recipient, be aware that any disclosure, copying or distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify the sender immediately by replying to the address listed in the From: field. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Maximum Number of processes Exceeded
Hi, We are using Tomcat Server and oracle database. After running for a while we are getting this error in the log files. Its taking both inactive and active processess. how to remove the inactive processess so that we dont have this error. Debug: makeConnection(Database) java.sql.SQLException: ORA-00020: maximum number of processes (300) exceeded at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278) at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOsesskey(T4CTTIoauthenticate.java:294) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:357) at oracle.jdbc.driver.PhysicalConnection.init(PhysicalConnection.java:439) at oracle.jdbc.driver.T4CConnection.init(T4CConnection.java:165) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801) at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294) at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974) at org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) at utils.ConnectionBroker.makeConnection(ConnectionBroker.java:256) at utils.ConnectionBroker.makeConnection(ConnectionBroker.java:76) at beans.PurgeProcess_T.run(PurgeProcess_T.java:166) With Regards Sharat Babu Shravanam Byte and Switch Names Solix Technologies One of the Top 10 Startups to Watch Read More at http://www.solix.com/top10startups - CAUTION - Disclaimer * This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Solix has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Solix reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Solix e-mail system. End of Disclaimer ** - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat url rewrite
Hi, Christopher Schultz-2 If you always start your URLs with a '/', then you shouldn't have a problem. Could you explain this Sentence to me? In my jsp, i write a href=./item_s:property value=item /.html . Now, i need to change this link path to absolute path, right? Thanks for your help. -- View this message in context: http://www.nabble.com/tomcat---url-rewrite-tp25395691p25502211.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: what does j_security_check do in clustering?
2009/9/17 Mark Thomas ma...@apache.org Rex Wang wrote: Dear Tomcat, I meet a problem when config a web project which using the form based security in clustering. Clustering or load-balancing? Whether or not session replication is configured between your Tomcat instance's is key. I guess the j_security_check is not implemented by session. so the session replication does not work for security check, right? and I see the following in tomcat document: To run session replication in your Tomcat 6.0 container, the following steps should be completed: - All your session attributes must implement java.io.Serializable - Uncomment the Cluster element in server.xml - If you have defined custom cluster valves, make sure you have the ReplicationValve defined as well under the Cluster element in server.xml - If your Tomcat instances are running on the same machine, make sure the tcpListenPort attribute is unique for each instance, in most cases Tomcat is smart enough to resolve this on it's own by autodetecting available ports in the range 4000-4100 - Make sure your web.xml has the distributable/ element or set at your Context distributable=true / - If you are using mod_jk, make sure that jvmRoute attribute is set at your Engine Engine name=Catalina jvmRoute=node01 and that the jvmRoute attribute value matches your worker name in workers.properties - Make sure that all nodes have the same time and sync with NTP service! - *Make sure that your loadbalancer is configured for sticky session mode.* So the sticky session is the precondition of tomcat clustering? thanks a lot! -Rex When I set session affinity = true in my front http server, the security check was done in single node, there is no problem with that. But if I set affinity = false, the requests from the security check process are sent to 2 nodes, and it is really strange.. eg: 1. From index.html(NodeA), try to access protected resouce 2. Go to the logon.html(NodeB), I input the id/passwd, and then submit 3. The request looks like sent to NodeA, but did not do any check operation. Does that work as design? that is, if I wanna use form check security, my cluster must be session affinity? That depends on the answer to the question above. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Maximum Number of processes Exceeded
Hi Sharath. Can you tell us more about your environment? For example: - Your operating system brand and version. - Your Tomcat version, where you initially got it, how you installed it. - Your Java VM brand and version, and whether it is a JRE or JDK. - Your Oracle version. - Your Oracle JDBC driver version, where you got it, how you installed it. Please give us as much of the above information as you can. Thanks. -- Jason Brittain On Thu, Sep 17, 2009 at 7:22 PM, Sharath Babu S S S sharath.b...@solix.comwrote: Hi, We are using Tomcat Server and oracle database. After running for a while we are getting this error in the log files. Its taking both inactive and active processess. how to remove the inactive processess so that we dont have this error. Debug: makeConnection(Database) java.sql.SQLException: ORA-00020: maximum number of processes (300) exceeded at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278) at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOsesskey(T4CTTIoauthenticate.java:294) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:357) at oracle.jdbc.driver.PhysicalConnection.init(PhysicalConnection.java:439) at oracle.jdbc.driver.T4CConnection.init(T4CConnection.java:165) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801) at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294) at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974) at org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) at utils.ConnectionBroker.makeConnection(ConnectionBroker.java:256) at utils.ConnectionBroker.makeConnection(ConnectionBroker.java:76) at beans.PurgeProcess_T.run(PurgeProcess_T.java:166) With Regards Sharat Babu Shravanam