Re: SessionListener invoked sometimes and not others
My web app has two servlets. One JSF Faces servlet and another servlet for processing AJAX requests from javascript. I want to know when the app starts and when the app is done. Is the only way to do this is to have a ServletContextListener listening to both those servlets? On the first one, I get resources and on the last one being cleaned up, I destroy the resources. I guess this works. I just wish I had access to the app lifecycle. thanks, dean Mark Thomas wrote: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] So after a restart of tomcat, I login and it appears the session is still valid, so it does not go through my session listener. I need to be aware of the web application lifecycle and want to grab a resource when the webapp starts and release when the web app goes away. How do I do that? Use a ServletContextListener. Mark - 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: SessionListener invoked sometimes and not others
whoops, nevermind. stupid question I found out after poking around. dean Dean Hiller wrote: My web app has two servlets. One JSF Faces servlet and another servlet for processing AJAX requests from javascript. I want to know when the app starts and when the app is done. Is the only way to do this is to have a ServletContextListener listening to both those servlets? On the first one, I get resources and on the last one being cleaned up, I destroy the resources. I guess this works. I just wish I had access to the app lifecycle. thanks, dean Mark Thomas wrote: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] So after a restart of tomcat, I login and it appears the session is still valid, so it does not go through my session listener. I need to be aware of the web application lifecycle and want to grab a resource when the webapp starts and release when the web app goes away. How do I do that? Use a ServletContextListener. Mark - 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: bug in 4.1.30?? PageContextImpl hides exception cause
never mind. This is fixed in tomcat 5. thanks, dean - Original Message - From: Dean Hiller [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, October 09, 2004 11:07 PM Subject: bug in 4.1.30?? PageContextImpl hides exception cause In 4.1.30, In PageContextImpl, I see this code (should I post this on the dev list instead) 525 if (t instanceof IOException) throw (IOException)t; 526 if (t instanceof ServletException) throw (ServletException)t; 527if (t instanceof RuntimeException) throw (RuntimeException)t; 528if (t instanceof JspException) { 529Throwable rootCause = ((JspException)t).getRootCause(); 530if (rootCause != null) { 531throw new ServletException(t.getMessage(), rootCause); 532} else { 533throw new ServletException(t); 534} 535} 536 throw new ServletException(t); 537 } 538} Notice on line 533, the root cause is correctly chained. Unfortunately, when the exceptions print out, t is not printed and I don't know what really happened. This is quite annoying. It takes 27 steps to build tomcat 4.1.30 so I wasn't quite interested in investigating further. If it took 3, I would probably be posting a fix because I would know more by now. thanks for any help here, The full exception chain is shown below. It is obvious there is an exception missing from this stack trace from looking at the code of JspServletWrapper and PageContextImpl dean org.apache.jasper.JasperException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 54) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:534) root cause(well, tomcat claims it is, but there really is one more exception that caused this one)javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:533) at org.apache.jsp.index_jsp._jspService(index_jsp.java:95) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853
bug in 4.1.30?? PageContextImpl hides exception cause
In 4.1.30, In PageContextImpl, I see this code (should I post this on the dev list instead) 525 if (t instanceof IOException) throw (IOException)t; 526 if (t instanceof ServletException) throw (ServletException)t; 527if (t instanceof RuntimeException) throw (RuntimeException)t; 528if (t instanceof JspException) { 529Throwable rootCause = ((JspException)t).getRootCause(); 530if (rootCause != null) { 531throw new ServletException(t.getMessage(), rootCause); 532} else { 533throw new ServletException(t); 534} 535} 536 throw new ServletException(t); 537 } 538} Notice on line 533, the root cause is correctly chained. Unfortunately, when the exceptions print out, t is not printed and I don't know what really happened. This is quite annoying. It takes 27 steps to build tomcat 4.1.30 so I wasn't quite interested in investigating further. If it took 3, I would probably be posting a fix because I would know more by now. thanks for any help here, The full exception chain is shown below. It is obvious there is an exception missing from this stack trace from looking at the code of JspServletWrapper and PageContextImpl dean org.apache.jasper.JasperException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) root cause(well, tomcat claims it is, but there really is one more exception that caused this one)javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533) at org.apache.jsp.index_jsp._jspService(index_jsp.java:95) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at
many java processes
On linux did anybody ever get a linux patch for fixing the problem of one process per java thread. I read on the sun bug parade they were going to port to a new threading model but we needed to update the linux threading I have seen many e-mails complaining about how tomcat creates s many processes and this is due to a JVM thing not tomcat. Does anybody know or is everyone just sitting by with many many java processes on their linux? Any help, pointers you could give me would be great, thanks, Dean -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: many java processes
than why do they all have a different process id?? Also, how what would the option be to turn off viewing of threads and just view processes? thanks for your help Jay, Dean D. Jay Newman wrote: On linux did anybody ever get a linux patch for fixing the problem of one process per java thread. I read on the sun bug parade they were going to port to a new threading model but we needed to update the linux threading I have seen many e-mails complaining about how tomcat creates s many processes and this is due to a JVM thing not tomcat. Does anybody know or is everyone just sitting by with many many java processes on their linux? Any help, pointers you could give me would be great, As near as I can tell, Linux *doesn't* create multiple processes. If you look closely at the output of ps all the java processes exist in the same processes. Linux (at least RedHat) comes with a ps that reports threads as well as processes. -- D. Jay Newman ! All: There's nothing we can't face... [EMAIL PROTECTED]! Anya: Except for bunnies... http://www.sprucegrove.com/~jay/ !-- Buffy, the Musical -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: many java processes
thanks all for the help, I have a much better understanding of what is going on. Our customers were complaining about that. I will contact redhat as to see if they are going to fix that or not. thanks, Dean Furmaniak Christophe wrote: pstree -p might help to show what get's started by what and if you prefer to have a true ps output, just try ps -faux CF -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
maxProcessors
excuse me in my ignorance, but it has been a while and I have forgotten how webservers work. How does a typical webserver work as far as a few threads waiting on accept() for incoming connections? Is the socket created/teardown every time a user goes to a different page? Now that the basics are out of the way, what is maxProcessors for? If I set it to 10 let's say, am I only going to be allowed 10 simultaneous requests from browsers, that next request will be refused if the load is too high. thanks for any info you can provide, Dean -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
war file not expand on linux
When I put the war file in linux tomcat, it does not expand when I restart tomcat, but it does on windows tomcat. This must be a known issue??? What is wrong. I downloaded http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.1/rpms/ tomcat4-4.0.1-1.noarch.rpm Does anybody know what is going on? thanks, Dean -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: war file not expand on linux
thanks Jeff, is there any way to install it correctly then so that all files have permission tomcat4. I have half of my files as root and then the ones that are created are as tomcat4. I am trying to make the install easier for my customers. Also, you would think an error would be provided by tomcat? thanks, Dean -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: apache + mod_SSL + tomcat
I never saw an answer go by to the below question and was curious what it would be. Does no one now the answer Dean Cressatti, Dominique wrote: Hi, I've got apache + mod_SSL + tomcat working (I don't deserve that much credit as mod_ssl worked right out the box) but I wonder couldn't the security bypassed, like for example accessing the page on port 8080 instead of port 443 ? Dom -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: apache + mod_SSL + tomcat
I think there is a way to solve the problem without shutting down port 8080. Someone please verify this is true. If I use a servlet, my servlet can determine if the connection is from 8443 or 8080 and if it is from 8080 can deny the user access right away. Is this correct? I was kind of waiting on an answer like this. thanks, Dean -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: apache + mod_SSL + tomcat
In my app, we don't need everything to run over SSL and we are not using apache so we only have ports 80 and 8443. I changed the default 8080 to 80 and should have probably changed 8443 to 443. When SSL is not necessary, we don't use it as it slows down the downloading of the pages. Dean -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: apache + mod_SSL + tomcat
thanks for the xml Anton that is much better than putting the code in the servlet, and is easy to expand to a per servlet/html page basis. thanks, Dean -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Init method of servlet called twice?
I remember dealing with problems like that before but they are vague in my head. Your problem is better posted on the java forum I think. I am trying to recall what happened. It was something like I would hit back in my browser and then forward so IE would call init again. I remember having many problems with this and netscape and IE behaved differently. Search through some of the archives on the java forum and post there if you can't find it in the archives. Dean -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: apache + mod_SSL + tomcat
I thought tomcat was on 8443 by default. Are you sure you are pointing at tomcat, or do you have another webserver running on port 443, since that is the default that most webservers use when starting up. tomcat is the exception running on 8443 thanks, Dean -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Advanced Ques. w/SSL
I have done the HOW-TO on SSL and it works fine with stand-alone tomcat. I am preparing an installation of tomcat to be installed on many computers. I CANNOT create a separate certificate for each computer. Am I screwed Our installation program installs tomcat, and then changes server.xml to enable SSL, and how do I deal with the certificates(I mean not self-signed ones). What do I do in this circumstance? I need one certificate on every tomcat installation but this is not possible Any ideas on any of this. thanks Dean -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
applet works, https doesn't
I have an applet that connects back to the server on 8443 and it works fine even without a certificate. When I go to https://localhost:8443 web page, I get a prompt with an unknown certificate(certificate was created and self signed by me). Why don't I get this prompt with the applet, it is using port 8443? Something is questionable here. Can anybody explain this to me? thanks, Dean -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: PLEASE REMOVE THE VIRUS BEFORE MAILING THE LIST...
I say go to Norton, and ask for a free license. Try to get some free virus scanner software. Alot of companies are up for donating their product. just a thought, dean -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
tomcat/apache
Is it possible for apache and tomcat to BOTH work off port 80? From what I understand Apache can't do servlets so we need tomcat, but we need apache for file download or something that tomcat doesn't have. Can someone please send me a link to a document where I can help myself on setting up tomcat with apache? and maybe a link to a document explaining how and WHY they work together? thanks for any help, Dean -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
bug?? linux7.1 tomcat4.0.1
I have redhat linux 7.1 jdk1.3.1_02 tomcat 4.0.1 tomcat works, BUT all images come across corrupted on IE and netscape. Is there a bugfix/work around to fix this problem. Also, why does the jdk have to be installed? Why can't we just use the JRE? One more thing is the DOCS should mention that tomcat on linux is run on port 8180 NOT 8080 after installation. Of course, I am using the tomcat from the rpm directory not the bin directory on the website. thanks for any pointers/help you can give me, Dean -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: bug?? linux7.1 tomcat4.0.1
I figured out why the images are messed up. I viewed them directly and they are messed up to begin with for some reason. It appears that the post of the rpm on the website has bad images in it. Dean -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
help with installation
Hello, I installed apache_1.3.19-win32-no_src-r2.msi on Windows 2000. putting the ServerName as localhost, this worked fine and I could open http://localhost web page. I than installed jakarta-tomcat-3.2.1, and this seemed to go fine, and I could see http://localhost:8080 web page. Than I downloaded ApacheModuleJServ1b3_136.dll, and put this in the modules directory of Apache. I than made sure tomcat and apache were both stopped. I added this line to apache\conf\httpd.conf Include c:/Program files.tomcat/conf/tomcat-apache.conf I than started up tomcat first, as that file from what I understand is generated from server.xml, NOW when I start apache up, it gives me errors on 2 lines. ApJServDefaultProtocol ajpv12 ApJServLogLevel notice Why I am getting errors here?? If I comment them out, apache seems to run fine, but since this file is generated from server.xml, I can't just keep commenting them out every time after starting tomcat which will happen very often because I am doing some tutorials. Dean