I need tomcat version 5.5.x = 5.5.36
Since tomcap 5 is archived... how can I get a version to download? Thanks, - Uri
Re: I need tomcat version 5.5.x = 5.5.36
On 28/04/2013 11:40, Uri Shani wrote: Since tomcap 5 is archived... how can I get a version to download? From the archives. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: getting the request that created the session
Martin Gainty wrote: org.apache.catalina.valves.RemoteIPValve getRemoteIpHeader? Martin ... Date: Sat, 27 Apr 2013 23:08:31 +0200 Subject: getting the request that created the session From: rosenberg.l...@gmail.com To: users@tomcat.apache.org Hi, is there any possibility to get the first request from a session (or any request from a session) from the HttpSessionListener. Background, I want to count sessions by top level domains. I'm doing it now in a combination of filter and listener. Filter for new sessions, putting a mark for already counted sessions, and listener for destroyed session. However, I would like to get rid of the Filter, if its possible somehow. For that, I need to get user's ip adress somehow. For once, I find myself more or less in agreement with Marting here. I am not sure that I understand exactly what you are trying to do, but just in case : If your plan is to get rid of the filter : If you set up an access log, you will get an access log file, which you can configure to include the client's IP address. Than you can process that file off-line to extract whatever information you want, without using up additional Tomcat resources. There are even various programs available that will do this processing for you and generate nice tables and graphs etc. without further programming (webalizer, awstats and similar). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: I need tomcat version 5.5.x = 5.5.36
Il 28/04/13 12:40, Uri Shani ha scritto: Since tomcap 5 is archived... how can I get a version to download? Thanks, http://archive.apache.org/dist/tomcat/ The last one that I can see is 5.5.36 Edoardo - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: I need tomcat version 5.5.x = 5.5.36
2013/4/28 Edoardo Panfili edoa...@aspix.it: Il 28/04/13 12:40, Uri Shani ha scritto: Since tomcap 5 is archived... how can I get a version to download? Thanks, http://archive.apache.org/dist/tomcat/ The last one that I can see is 5.5.36 1. It satisfies your equation of = 5.5.36 2. There was no further development since releasing 5.5.36. It was moved to the archives immediately. http://svn.apache.org/viewvc/tomcat/archive/tc5.5.x/tags/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: I need tomcat version 5.5.x = 5.5.36
On 4/28/2013 9:24 AM, Edoardo Panfili wrote: Il 28/04/13 12:40, Uri Shani ha scritto: Since tomcap 5 is archived... how can I get a version to download? Thanks, http://archive.apache.org/dist/tomcat/ The last one that I can see is 5.5.36 That is the latest version, and probably always will be. D - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: getting the request that created the session
Hello Konstantin, thank you for your reply. Background, I want to count sessions by top level domains. I'm doing it now in a combination of filter and listener. Filter for new sessions, putting a mark for already counted sessions, and listener for destroyed session. However, I would like to get rid of the Filter, if its possible somehow. For that, I need to get user's ip adress somehow. Just two ideas: 1. You can use javax.servlet.ServletRequestListener instead of a filter. 2. There is HttpSession.isNew() method. So you mean that I can basically perform the same checks I do in a filter in a servletrequestlistener, checking if there is an attached session, if it's new, and where it comes from. I haven't found it in the spec (or didn't search hard enough, at least haven't found it in listener section), would ServletRequestListener being notified prior to any Filter execution? regards Leon Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: getting the request that created the session
2013/4/28 Martin Gainty mgai...@hotmail.com org.apache.catalina.valves.RemoteIPValve getRemoteIpHeader? Martin Thanks but I would like to stay container independent here. regards Leon
Re: getting the request that created the session
Answering my own email :-) On Sun, Apr 28, 2013 at 6:07 PM, Leon Rosenberg rosenberg.l...@gmail.comwrote: Hello Konstantin, thank you for your reply. Background, I want to count sessions by top level domains. I'm doing it now in a combination of filter and listener. Filter for new sessions, putting a mark for already counted sessions, and listener for destroyed session. However, I would like to get rid of the Filter, if its possible somehow. For that, I need to get user's ip adress somehow. Just two ideas: 1. You can use javax.servlet.ServletRequestListener instead of a filter. 2. There is HttpSession.isNew() method. So you mean that I can basically perform the same checks I do in a filter in a servletrequestlistener, checking if there is an attached session, if it's new, and where it comes from. I haven't found it in the spec (or didn't search hard enough, at least haven't found it in listener section), would ServletRequestListener being notified prior to any Filter execution? So i made a combined HttpSessionListener and ServletRequestListener. Advantages vs. Filter/Listener solution: only one class needed. Disadvantage: Only second request is seen, because first request is sessionless. HttpSession.isNew() doesn't do what I'd expect it to do, in fact multiple requests come in with same session and new status, so I will need to synchronize on session object. Here a small test listener: public class TestListener implements HttpSessionListener, ServletRequestListener{ private AtomicLong counter = new AtomicLong(0); @Override public void sessionCreated(HttpSessionEvent se) { System.out.println(Session created +se.getSession().getId()); } @Override public void requestDestroyed(ServletRequestEvent sre) { System.out.println(Request +((HttpServletRequest) sre.getServletRequest()).getAttribute(___requestId___)+ destroyed + ((HttpServletRequest) sre.getServletRequest()).getRequestURI()); } @Override public void requestInitialized(ServletRequestEvent sre) { long requestId = counter.incrementAndGet(); System.out.println(Request +requestId+ created +((HttpServletRequest)sre.getServletRequest()).getRequestURI()); ((HttpServletRequest)sre.getServletRequest()).setAttribute(___requestId___, requestId); HttpSession session = ((HttpServletRequest)sre.getServletRequest()).getSession(false); System.out.println(Session? + (session!=null)); if (session!=null){ System.out.println(Session +session.getId()+ new? +session.isNew()); } } Output for http://localhost:8080/moskitodemo/mui/mskShowAllProducers: Request 1 created /moskitodemo/mui/mskShowAllProducers Session created 4B842C774B30EE7886CC7243758C7D38 Request 2 created /moskitodemo/mui/mskCSS Session? true Session 4B842C774B30EE7886CC7243758C7D38 new? true Request 3 created /moskitodemo/img/moskito_webui_logo.gif Session? true Session 4B842C774B30EE7886CC7243758C7D38 new? true Request 4 created /moskitodemo/js/wz_tooltip.js Session? true Session 4B842C774B30EE7886CC7243758C7D38 new? true Request 5 created /moskitodemo/js/jquery-1.4.min.js Session? true Session 4B842C774B30EE7886CC7243758C7D38 new? true Request 6 created /moskitodemo/js/function.js Session? true Session 4B842C774B30EE7886CC7243758C7D38 new? true Request 6 destroyed /moskitodemo/js/function.js Request 5 destroyed /moskitodemo/js/jquery-1.4.min.js Request 4 destroyed /moskitodemo/js/wz_tooltip.js Request 3 destroyed /moskitodemo/img/moskito_webui_logo.gif Request 7 created /moskitodemo/img/ind_green.png Session? true Session 4B842C774B30EE7886CC7243758C7D38 new? false Request 2 destroyed /moskitodemo/mui/mskCSS Request 7 destroyed /moskitodemo/img/ind_green.png Request 8 created /moskitodemo/img/bgs.gif Session? true Session 4B842C774B30EE7886CC7243758C7D38 new? false Request 8 destroyed /moskitodemo/img/bgs.gif Request 9 created /moskitodemo/img/vline.png Session? true Session 4B842C774B30EE7886CC7243758C7D38 new? false Request 10 created /moskitodemo/img/ind_off_small.png Session? true Session 4B842C774B30EE7886CC7243758C7D38 new? false Request 9 destroyed /moskitodemo/img/vline.png Request 11 created /moskitodemo/img/icons.png Session? true Session 4B842C774B30EE7886CC7243758C7D38 new? false Request 11 destroyed /moskitodemo/img/icons.png Request 10 destroyed /moskitodemo/img/ind_off_small.png Request 1 destroyed /moskitodemo/mui/mskShowAllProducers As you see there are multiple requests with session.isNew = true. I am not sure if its proper behavior at least the docs aren't clear enough here, but it's definitely not good enough to ensure that each session is called only once. regards Leon P.S. The above sequence is only reproduceable in chrome, not firefox regards Leon Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: getting the request that created the session
___ 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 ServletRequest is defined as coming into scope of a web application when it is about to enter the first servlet or filter of the web application, and as going out of scope as it exits the last servlet or the first filter in the chain. http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequestListener.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org