tomcat jndi

2013-04-29 Thread Jakub 1983
I have read http://tomcat.apache.org/tomcat-7.0-doc/jndi-datasource-examples-howto.html http://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html 1)I would like to ask about essence of jndi a) jndi as a whole and b) jndi in tomcat In all known to me cases jndi in tomcat and in jboss is

Re: getting the request that created the session

2013-04-29 Thread André Warnier
Leo Donahue - RDSA IT wrote: ___ From: Leon Rosenberg [rosenberg.l...@gmail.com] Subject: Re: getting the request that created the session would ServletRequestListener being notified prior to any Filter execution? According to the docs, yes. A

Re: tomcat jndi

2013-04-29 Thread Jakub 1983
3) and 4) are answered here http://stackoverflow.com/questions/1350816/what-is-the-purpose-of-jndi http://stackoverflow.com/questions/5143499/understanding-jndi http://www.javaworld.com/javaworld/jw-04-2002/jw-0419-jndi.html

Re: getting the request that created the session

2013-04-29 Thread Leon Rosenberg
Hello Andre, On Mon, Apr 29, 2013 at 10:13 AM, André Warnier a...@ice-sa.com wrote: Leon, I apologise for insisting, but your initial post said : Background, I want to count sessions by top level domains... Yes, but @Runtime. Means that I want to know how many sessions from each tld are

Re: AsyncListener.onError and disconnected client

2013-04-29 Thread Rossen Stoyanchev
- Original Message - From: Mark Thomas ma...@apache.org To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, April 25, 2013 8:42:55 AM Subject: Re: AsyncListener.onError and disconnected client It is. The issue is when is happens. The issue is that there is no event (I

validationQuery with Tomcat 7 JDBC Pool

2013-04-29 Thread Jose María Zaragoza
Hello: I was using validationQuery in Tomcat 6 for JNDI datasources, so to check connections before borrowing to the caller And, about documentacion, testOnBorrow parameter is true by default testOnBorrow - true or false: whether a connection should be validated using the validation query each

Re: getting the request that created the session

2013-04-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Leon, On 4/29/13 9:05 AM, Leon Rosenberg wrote: Hello Andre, On Mon, Apr 29, 2013 at 10:13 AM, André Warnier a...@ice-sa.com wrote: Leon, I apologise for insisting, but your initial post said : Background, I want to count sessions by

Re: getting the request that created the session

2013-04-29 Thread André Warnier
Leon Rosenberg wrote: Hello Andre, On Mon, Apr 29, 2013 at 10:13 AM, André Warnier a...@ice-sa.com wrote: Leon, I apologise for insisting, but your initial post said : Background, I want to count sessions by top level domains... Yes, but @Runtime. Means that I want to know how many

Java Applet can not communicate with Java Servlet

2013-04-29 Thread qingtao peng
  I have built the apache-tomcat-7.0.32 server on my computer.My operating system is Windows7.I have written  an Applet and compiled it .The  source code of the Applet is as follow : import java.awt.*; import java.applet.*; import java.awt.event.*; import java.io.*; import java.net.*; public

Re: Java Applet can not communicate with Java Servlet

2013-04-29 Thread André Warnier
qingtao peng wrote: I have built the apache-tomcat-7.0.32 server on my computer.My operating system is Windows7.I have written an Applet and compiled it .The source code of the Applet is as follow : ... This compiled Applet has been embedded in a HTML file named with DbApplet.htm. The

Re: getting the request that created the session

2013-04-29 Thread Leon Rosenberg
On Mon, Apr 29, 2013 at 3:49 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Leon, So your initial implementation was a Filter that marked each HttpSession with the origin IP address (so you could get the TLD of the user) and

Re: Java Applet can not communicate with Java Servlet

2013-04-29 Thread André Warnier
André Warnier wrote: qingtao peng wrote: I have built the apache-tomcat-7.0.32 server on my computer.My operating system is Windows7.I have written an Applet and compiled it .The source code of the Applet is as follow : ... This compiled Applet has been embedded in a HTML file named

Re: getting the request that created the session

2013-04-29 Thread Howard W. Smith, Jr.
On Mon, Apr 29, 2013 at 9:54 AM, André Warnier a...@ice-sa.com wrote: - under Unix/Linux, there is a command tail -f filename, which continuously watches for any lines added to a file and displays them. It doesn't seem to be very intensive in terms of resources used. - and on the other

Re: validationQuery with Tomcat 7 JDBC Pool

2013-04-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jose, On 4/29/13 9:30 AM, Jose María Zaragoza wrote: Now , I want to use JDBC Pool with a new web application deployed on that Tomcat 6. So, I consider it as an standalone application, and I use org.apache.tomcat.jdbc.pool.DataSource class ( I

Re: getting the request that created the session

2013-04-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Leon, On 4/29/13 10:36 AM, Leon Rosenberg wrote: On Mon, Apr 29, 2013 at 3:49 PM, Christopher Schultz ch...@christopherschultz.net wrote: Leon, So your initial implementation was a Filter that marked each HttpSession with the origin

Re: getting the request that created the session

2013-04-29 Thread Howard W. Smith, Jr.
On Mon, Apr 29, 2013 at 10:54 AM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Even, the requests are keepalived they look to me as if they were executed parallel. At least from the chrome timeline. But its hard to tell

Re: Java Applet can not communicate with Java Servlet

2013-04-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Peng, On 4/29/13 10:05 AM, qingtao peng wrote: uc.setRequestProperty(Content-type,application/xwww-form-urlencoded); I think you want: application/x-www-form-urlencoded res.setContentType(text/html;charset=GB2312); Why not use UTF-8 like

Re: getting the request that created the session

2013-04-29 Thread Leon Rosenberg
Hello Howard, the sniffer thing has nothing to do with original topic, I was just wandering that some requests were having session marked as new, which actually shouldn't be the case. Or in other word, the naive understanding of session.isNew method is that it should only return true once. But it

Re: getting the request that created the session

2013-04-29 Thread Leon Rosenberg
On Mon, Apr 29, 2013 at 4:54 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Leon, On 4/29/13 10:36 AM, Leon Rosenberg wrote: On Mon, Apr 29, 2013 at 3:49 PM, Christopher Schultz ch...@christopherschultz.net wrote: Leon,

RE: Java Applet can not communicate with Java Servlet

2013-04-29 Thread Caldarale, Charles R
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Java Applet can not communicate with Java Servlet The servlet spec says that all servlets need to be in a package. No, it doesn't - but it's still a good idea. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL

Re: getting the request that created the session

2013-04-29 Thread Howard W. Smith, Jr.
Leon, On Mon, Apr 29, 2013 at 11:02 AM, Leon Rosenberg rosenberg.l...@gmail.comwrote: Hello Howard, the sniffer thing has nothing to do with original topic, I was just wandering that some requests were having session marked as new, which actually shouldn't be the case. Or in other word, the

Re: getting the request that created the session

2013-04-29 Thread Leon Rosenberg
Hello Howard et al, On Mon, Apr 29, 2013 at 5:55 PM, Howard W. Smith, Jr. smithh032...@gmail.com wrote: Leon, On Mon, Apr 29, 2013 at 11:02 AM, Leon Rosenberg rosenberg.l...@gmail.comwrote: Back to your question, filter is ok, too many filters are making stack traces fuller than

Re: getting the request that created the session

2013-04-29 Thread Howard W. Smith, Jr.
On Mon, Apr 29, 2013 at 12:55 PM, Leon Rosenberg rosenberg.l...@gmail.comwrote: Whether you want to have multiple filters or not is a decision based on your coding guidelines, architectural principles and what not. Since you are the only user of your filters, it's free to you to use as many