RE: UTF-8 problems
Hi In Java 1.3, the default encoding is set to ISO-8859-1 which includes all the Country(German) special characters In Java 1.4, the default encoding is set to ASCII which converts all German special characters to '?' The fix for this problem was just setting an environment variable CATALINA_OPTS=-Dfile.encoding=ISO-8859-1 -Original Message- From: Tang Guangyu [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 5:30 AM To: Tomcat Users List Subject: Re: UTF-8 problems This problem was caused by your browser. The browser will use its own encoding to encode form values post back. You need set proper encoding to request - request.setEncoding(BROWSER_ENCODING). Or you can write a filter to simplify your work. - Original Message - From: Nathan Coast [EMAIL PROTECTED] To: tomcat user [EMAIL PROTECTED] Sent: Sunday, August 03, 2003 9:11 PM Subject: UTF-8 problems Hi, I have an text fields in a form that will contain UTF-8 characters e.g. ''. I can retrieve utf-8 chars from the db and display them correctly in jsps via tomcat. The only problem comes with submiting forms to tomcat. request.getParameter() returns the incorrect value for the char e.g. '' instead of ''. AFAIK the default encoding of java is UTF-8 so I'm not to sure where to look. Anyone have any suggestions as to what I have to do? thanks Nathan - 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]
Configuration Error?
I am really having a bad time using Apache Tomcat for the first time... But I won't give up... Just need help... I have a JSP page that works with a javabean (a simple test page), just look at the code: %@ page contentType=text/html; charset=iso-8859-1 language=java import=java.sql.* errorPage= % html head jsp:useBean class=mybeans.lineBean id=bean= scope=page / titleUsing JavaBeans/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body %= bean0.stars(20) % Welcome to JavaBeans! %= bean0.doubleLine(30) % /body /html When I try this page I get the following error: type Exception report message Internal Server Error description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unsupported encoding: at org.apache.jasper.compiler.ParserController.getReader(ParserController.j ava:440) at org.apache.jasper.compiler.ParserController.parse(ParserController.java: 209) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(J spServlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.java:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja va:246) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:234 7) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :180) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa lve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.j ava:1027) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java: 1125) at java.lang.Thread.run(Thread.java:536) I have this page on Tomcat/ROOT/ directory and the class at Tomcat/ROOT/WEB-INF/mybeans. Do I have anything misconfigured? I'm busting my head off since yesterday over this... Can anyone help me? Thankx! Pedro Honório Silva [EMAIL PROTECTED]
Re: Configuration Error?
Pedro, unjar-ed classes go under WEB-INF/classes/{SOME PACKAGENAME}, jar files go under WEB-INF/lib Your java beans will never be found if they just reside under WEB-INF . Pedro Silva wrote: I am really having a bad time using Apache Tomcat for the first time... But I won't give up... Just need help... I have a JSP page that works with a javabean (a simple test page), just look at the code: %@ page contentType=text/html; charset=iso-8859-1 language=java import=java.sql.* errorPage= % html head jsp:useBean class=mybeans.lineBean id=bean= scope=page / titleUsing JavaBeans/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body %= bean0.stars(20) % Welcome to JavaBeans! %= bean0.doubleLine(30) % /body /html When I try this page I get the following error: type Exception report message Internal Server Error description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unsupported encoding: at org.apache.jasper.compiler.ParserController.getReader(ParserController.j ava:440) at org.apache.jasper.compiler.ParserController.parse(ParserController.java: 209) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(J spServlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.java:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja va:246) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:234 7) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :180) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa lve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.j ava:1027) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java: 1125) at java.lang.Thread.run(Thread.java:536) I have this page on Tomcat/ROOT/ directory and the class at Tomcat/ROOT/WEB-INF/mybeans. Do I have anything misconfigured? I'm busting my head off since yesterday over this... Can anyone help me? Thankx! Pedro Honório Silva [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Configuration Error?
Yes, but they are in WEB-INF/classes/mybeans (MYBEANS is the package name) and I still get the same error... Pedro Honório Silva [EMAIL PROTECTED] -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: segunda-feira, 4 de Agosto de 2003 8:15 To: Tomcat Users List Subject: Re: Configuration Error? Pedro, unjar-ed classes go under WEB-INF/classes/{SOME PACKAGENAME}, jar files go under WEB-INF/lib Your java beans will never be found if they just reside under WEB-INF . Pedro Silva wrote: I am really having a bad time using Apache Tomcat for the first time... But I won't give up... Just need help... I have a JSP page that works with a javabean (a simple test page), just look at the code: %@ page contentType=text/html; charset=iso-8859-1 language=java import=java.sql.* errorPage= % html head jsp:useBean class=mybeans.lineBean id=bean= scope=page / titleUsing JavaBeans/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body %= bean0.stars(20) % Welcome to JavaBeans! %= bean0.doubleLine(30) % /body /html When I try this page I get the following error: type Exception report message Internal Server Error description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unsupported encoding: at org.apache.jasper.compiler.ParserController.getReader(ParserController. j ava:440) at org.apache.jasper.compiler.ParserController.parse(ParserController.java : 209) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary( J spServlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServl e t.java:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381 ) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic a tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil t erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal v e.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j a va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal v e.java:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j a va:566) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.j a va:246) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j a va:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:23 4 7) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a :180) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j a va:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV a lve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j a va:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a :170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j a va:564) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:46 8 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j a va:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve . java:174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j a va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor. j ava:1027) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java : 1125) at java.lang.Thread.run(Thread.java:536) I have this page on Tomcat/ROOT/
Re: Configuration Error?
Also did you import your classes in the @page import directive ? I only see a java.lang, could be the source of the problem. Sekhmet wrote: Yes, but they are in WEB-INF/classes/mybeans (MYBEANS is the package name) and I still get the same error... Pedro Honório Silva [EMAIL PROTECTED] -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: segunda-feira, 4 de Agosto de 2003 8:15 To: Tomcat Users List Subject: Re: Configuration Error? Pedro, unjar-ed classes go under WEB-INF/classes/{SOME PACKAGENAME}, jar files go under WEB-INF/lib Your java beans will never be found if they just reside under WEB-INF . Pedro Silva wrote: I am really having a bad time using Apache Tomcat for the first time... But I won't give up... Just need help... I have a JSP page that works with a javabean (a simple test page), just look at the code: %@ page contentType=text/html; charset=iso-8859-1 language=java import=java.sql.* errorPage= % html head jsp:useBean class=mybeans.lineBean id=bean= scope=page / titleUsing JavaBeans/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body %= bean0.stars(20) % Welcome to JavaBeans! %= bean0.doubleLine(30) % /body /html When I try this page I get the following error: type Exception report message Internal Server Error description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unsupported encoding: at org.apache.jasper.compiler.ParserController.getReader(ParserController. j ava:440) at org.apache.jasper.compiler.ParserController.parse(ParserController.java : 209) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary( J spServlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServl e t.java:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381 ) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic a tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil t erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal v e.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j a va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal v e.java:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j a va:566) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.j a va:246) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j a va:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:23 4 7) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a :180) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j a va:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV a lve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j a va:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a :170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j a va:564) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:46 8 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j a va:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve . java:174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j a va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor. j ava:1027) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java : 1125) at java.lang.Thread.run(Thread.java:536) I have this page on Tomcat/ROOT/ directory and the class at
RE: Configuration Error?
??? Maybe... But do I have to import my own classes? If so what is the purpose of having the Bean code separated from the JSP code? Pedro Honório Silva [EMAIL PROTECTED] -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: segunda-feira, 4 de Agosto de 2003 8:25 To: Tomcat Users List Subject: Re: Configuration Error? Also did you import your classes in the @page import directive ? I only see a java.lang, could be the source of the problem. Sekhmet wrote: Yes, but they are in WEB-INF/classes/mybeans (MYBEANS is the package name) and I still get the same error... Pedro Honório Silva [EMAIL PROTECTED] -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: segunda-feira, 4 de Agosto de 2003 8:15 To: Tomcat Users List Subject: Re: Configuration Error? Pedro, unjar-ed classes go under WEB-INF/classes/{SOME PACKAGENAME}, jar files go under WEB-INF/lib Your java beans will never be found if they just reside under WEB-INF . Pedro Silva wrote: I am really having a bad time using Apache Tomcat for the first time... But I won't give up... Just need help... I have a JSP page that works with a javabean (a simple test page), just look at the code: %@ page contentType=text/html; charset=iso-8859-1 language=java import=java.sql.* errorPage= % html head jsp:useBean class=mybeans.lineBean id=bean= scope=page / titleUsing JavaBeans/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body %= bean0.stars(20) % Welcome to JavaBeans! %= bean0.doubleLine(30) % /body /html When I try this page I get the following error: type Exception report message Internal Server Error description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unsupported encoding: at org.apache.jasper.compiler.ParserController.getReader(ParserController . j ava:440) at org.apache.jasper.compiler.ParserController.parse(ParserController.jav a : 209) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary ( J spServlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServ l e t.java:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:38 1 ) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli c a tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi l t erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa l v e.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline. j a va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java : 4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa l v e.java:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline. j a va:566) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve. j a va:246) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline. j a va:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java : 4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2 3 4 7) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja v a :180) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline. j a va:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcher V a lve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline. j a va:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja v a :170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline. j a va:564) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:4 6 8 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline. j a va:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java : 4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv e . java:174) at
Re: Configuration Error?
The bean should be in the Tomcat/ROOT/WEB-INF/classes/mybeans directory not Tomcat/ROOT/WEB-INF/mybeans. Classes underneath web-inf is the directory for classes. Also, perhaps try removing the contentType directive at the top of the page as it is unnecessary. Oh and also you have put id=bean= - remove the = from the bean=, then change that to 0 as referenced later on. cheers Pete Kiss Technologies http://www.kisstechnologies.co.uk/ 4, Percy Street London W1T 1DF Phone numbers: Phone 020 7692 9922 Fax 020 7692 9923 Pedro Silva [EMAIL PROTECTED] 03/08/2003 20:11 Please respond to Tomcat Users List To: [EMAIL PROTECTED] cc: Subject:Configuration Error? I am really having a bad time using Apache Tomcat for the first time... But I won't give up... Just need help... I have a JSP page that works with a javabean (a simple test page), just look at the code: %@ page contentType=text/html; charset=iso-8859-1 language=java import=java.sql.* errorPage= % html head jsp:useBean class=mybeans.lineBean id=bean= scope=page / titleUsing JavaBeans/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body %= bean0.stars(20) % Welcome to JavaBeans! %= bean0.doubleLine(30) % /body /html When I try this page I get the following error: type Exception report message Internal Server Error description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unsupported encoding: at org.apache.jasper.compiler.ParserController.getReader(ParserController.j ava:440) at org.apache.jasper.compiler.ParserController.parse(ParserController.java: 209) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(J spServlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.java:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja va:246) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:234 7) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :180) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa lve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:174) at
Sorry in resending (Possible configuration error...)
My email-client (M$-OE) is currently breaked down, and repeat the last message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sorry in resending (Possible configuration error...)
My email-client (M$-OE) is currently breaked down, and repeat the last message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Is this an OpenSSL or httpd problem ???
Hi All. Problem : Netscape 6.2 would not redirectfrom http://my.first.com to https://my.secure.dom I have two vhost entries, first one listens on port 80 and secure one on 443. My bjective : from the first web-site, creae a link to a secure one in index.html using an anchor e.g. A HRED=http://my secure.domClickMe/A In tmy http.conf, I have this setup : ... (http.conf) Listen 192.168.100.1:80 Listen 443 NameVirtualHost 192.168.100.1 VirtualHost 192.168.100.1:80 ServerName my.first.dom ... /VirtualHost # I added the following 4 lines just for Netscape6.2 VirtualHost 192.168.10.1:80 ServerName my.secure.dom Redirect /index.html https://my.secure.dom/index.html /VirtualHost # as far as MSIE5 or Linux/Mozilla are concerned, following lines are all that's needed to make it work... VirtualHost ServerName my.secure.com ... IfModule mod_ssl.c ...blabla/IfModule ... /VirtualHost Works fine with MSIE5 and Lnux/Mozilla, just not Netscape6.2 In netscape, the unsecure site presents itself again when I click on the link the my.secure.dom, as if it culdn't reslve the URL and defaults to my.first.dom. Error log tells me that SSLSessonCache is not configured. Doesn't seem related. What do need to do to get Netscape6.2 working ??? TIA :-( - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JNDI + oracle + Tomcat
Hello, I try to connect to Oracle 8.1.7 using a DataSource (Tomcat 4.1.24). In the code, my datasource object is not null (Oracle driver have been founded) but on getConnection method I have the following error message : java.sql.SQLException: Cannot create JDBC driver of class 'oracle.jdbc.driver.OracleDriver' for connect URL 'null' Following is server.xml part : -- ResourceParams name=jdbc/app/geode parameter nameuser/name valueuser/value /parameter parameter namepassword/name valuepassword/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namedriverName/name valuejdbc:oracle:thin:@:1521:xx/value /parameter /ResourceParams Following is web.xml part : --- resource-ref descriptiongfds/description res-ref-namejdbc/app/geode/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Following is my code to obtain a connection : Context envGlobal = new InitialContext(); Context envApp = (Context)envGlobal.lookup(java:comp/env); DataSource m_oJdbcDataSource = ( DataSource )envApp.lookup(jdbc/app/geode); Connection l_connect = m_oJdbcDataSource.getConnection(); I don't understand why connect URL is null, somebody can help me ? Thank you. -- Faites un voeu et puis Voila ! www.voila.fr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Docs
Good day, We are moving over from IIS to Jakarta, but my knowledge of the product is null. I googled around for help, but can not seem to find anything starting from scratch. Does anybody know of a good place to start teaching yourself the product? Need to define three separate sites from the main site. E.g. www.ourdomain.com/site1-site3 Many thanks Regards Werner vd Merwe SAICOM Cpt Linux user #322423 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat and encoded spaces(%20) in URL
Hi folks, we encountered that Tomcat (or, Coyote) omits encoded space characters (%20-chars) when parsing a request (tested on 4.0.4, 4.1.7 and 4.1.24). So a request containing a param like ...PARAM=this%20is%20a%20test... ends up in PARAM=thisisatest. A config issue? A bug ? -- COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test -- 1. GMX TopMail - Platz 1 und Testsieger! 2. GMX ProMail - Platz 2 und Preis-Qualitätssieger! 3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP seems to be executing twice and we are getting duplicate records in our database
Hi folks, We have a weird problem where a JSP seems to be executing twice and we are getting duplicate records in our database. The data is coming from a HTML form and upon submit a subsequent JSP page is called that performs the SQL insert, etc. We are also getting duplicate log messages so our initial conclusion is that it's a Tomcat related issue. We have tested this with Tomcat 3.3.1, J2SE 1.3.1 and from the client side using both IE 5.5 and 6.0 and it happens intermittently. At this stage we have absolutely no idea of what is going on. Alas I didn't write the code so I'm not up to speed with its structure, flow or functionality. I've searched the list archive and there appears to be several references to similar problems. However I am unable to find any real answer to what might be causing this problem. Hoping someone out yonder can help. AB - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat and encoded spaces(%20) in URL
n Java 1.3, the default encoding is set to ISO-8859-1 which includes all the German special characters In Java 1.4, the default encoding is set to ASCII which converts all German special characters to '?' set CATALINA_OPTS=-Dfile.encoding=ISO-8859-1 in tomcat -Original Message- From: Dirk Griesbach [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 11:32 AM To: [EMAIL PROTECTED] Subject: Tomcat and encoded spaces(%20) in URL Hi folks, we encountered that Tomcat (or, Coyote) omits encoded space characters (%20-chars) when parsing a request (tested on 4.0.4, 4.1.7 and 4.1.24). So a request containing a param like ...PARAM=this%20is%20a%20test... ends up in PARAM=thisisatest. A config issue? A bug ? -- COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test -- 1. GMX TopMail - Platz 1 und Testsieger! 2. GMX ProMail - Platz 2 und Preis-Qualitätssieger! 3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post - 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: JSP seems to be executing twice and we are getting duplicate records in our database
Adrian, If you do not want anothe rows created every time the page is submitted, then you are going to have to implement something to stop this. TOMCAT will not do this for you. Without knowing the requirements for the form, stopping multiple rows being generated could be as simple as: - Assign a session to the user (clients browser). - When the form is submitted, capture the sessionId in the database with the record. - If there is no row with the sessionId in the database, create a new record with an insert. If there is a existing session, use an update to modify the record. Hope this helps Bill -Original Message- From: Adrian Beech [mailto:[EMAIL PROTECTED] Sent: Monday, 4 August 2003 8:45 PM To: [EMAIL PROTECTED] Subject: JSP seems to be executing twice and we are getting duplicate records in our database Hi folks, We have a weird problem where a JSP seems to be executing twice and we are getting duplicate records in our database. The data is coming from a HTML form and upon submit a subsequent JSP page is called that performs the SQL insert, etc. We are also getting duplicate log messages so our initial conclusion is that it's a Tomcat related issue. We have tested this with Tomcat 3.3.1, J2SE 1.3.1 and from the client side using both IE 5.5 and 6.0 and it happens intermittently. At this stage we have absolutely no idea of what is going on. Alas I didn't write the code so I'm not up to speed with its structure, flow or functionality. I've searched the list archive and there appears to be several references to similar problems. However I am unable to find any real answer to what might be causing this problem. Hoping someone out yonder can help. AB - 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]
Many java-processes left after shutdown.sh
Hello, when I stop tomcat using shutdown.sh there are still many tomcat-processes running in linux. Is this normal or do I have a configuration problem (contexts are not closed properly)? I use a connection pool to a Mysql-database in my application (BasicDatasourceFactory). Do I have to close these connections somehow manually? Thanks, Philipp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Many java-processes left after shutdown.sh
Dear Philipp Since your question is regarding tomcat on linux, so I thought it best to put my question to you as well. I have downloaded the rpm file for the SDK or jdk 1.4. When I see the file on linux machine, I see ___.rpm.bin How do I install it ? Any suggestions ? Zille Hassan [EMAIL PROTECTED] United Matbouli Group 1st Floor, Matbouli Plaza PO Box556 Jeddah 21421 Kingdom of Saudi Arabia tel: +966 2 6512111 Ext:1901 fax: +966 2 6571171 -Original Message- From: Philipp Leusmann [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 2:23 PM To: [EMAIL PROTECTED] Subject: Many java-processes left after shutdown.sh Hello, when I stop tomcat using shutdown.sh there are still many tomcat-processes running in linux. Is this normal or do I have a configuration problem (contexts are not closed properly)? I use a connection pool to a Mysql-database in my application (BasicDatasourceFactory). Do I have to close these connections somehow manually? Thanks, Philipp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat and encoded spaces(%20) in URL
Hi folks, we encountered that Tomcat (or, Coyote) omits encoded space characters (%20-chars) when parsing a request (tested on 4.0.4, 4.1.7 and 4.1.24). So a request containing a param like ...PARAM=this%20is%20a%20test... ends up in PARAM=thisisatest. A config issue? A bug ? -- COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test -- 1. GMX TopMail - Platz 1 und Testsieger! 2. GMX ProMail - Platz 2 und Preis-Qualitätssieger! 3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 4.1.27 reload webapp
Hi, When i reload a webapp in tomcat 4.1.27 (win2000/jdk1.4.1) and load a jsp from that webapp I get the message: Compiling 1 source file [javac] C:\Apache-tomcat\temp\check_jsp.java:7: package com.blablabla.. it can't find the jars included in the webapp lib directory. When i start/stop the webapp it doesn't give any problems. Some bug in tomcat 4.1.27 Regards, Edwin Eversdijk __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Many java-processes left after shutdown.sh
I?d try sh ./__.rpm.bin -Ursprungliche Nachricht- Von: Zille Hassan [mailto:[EMAIL PROTECTED] Gesendet: Montag, 4. August 2003 13:33 An: Tomcat Users List Betreff: RE: Many java-processes left after shutdown.sh Dear Philipp Since your question is regarding tomcat on linux, so I thought it best to put my question to you as well. I have downloaded the rpm file for the SDK or jdk 1.4. When I see the file on linux machine, I see ___.rpm.bin How do I install it ? Any suggestions ? Zille Hassan [EMAIL PROTECTED] United Matbouli Group 1st Floor, Matbouli Plaza PO Box556 Jeddah 21421 Kingdom of Saudi Arabia tel: +966 2 6512111 Ext:1901 fax: +966 2 6571171 -Original Message- From: Philipp Leusmann [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 2:23 PM To: [EMAIL PROTECTED] Subject: Many java-processes left after shutdown.sh Hello, when I stop tomcat using shutdown.sh there are still many tomcat-processes running in linux. Is this normal or do I have a configuration problem (contexts are not closed properly)? I use a connection pool to a Mysql-database in my application (BasicDatasourceFactory). Do I have to close these connections somehow manually? Thanks, Philipp - 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]
Servere performance reduction upon upgrade
Hi, this being my first post I regret if any formalities are offended. I have just upgraded from Tomcat 4.0.3 and jdk1.4.0 to Tomcat 4.1.27 (tried 5.0.5 as well) and jdk1.4.2 on a Windows NT machine. Previously I used the isapi_redirect.dll to redirect request from IIS but has now installed the JK2 (isapi_redirector2.dll). The requests are still succesfully being redirected by IIS but are a factor 10+ slower than before the upgrade. When requesting Tomcat directly through port 8080 things are as blazing as always. As both installations are out-of-the-box following the guidelines and How-To documents I have no clue of what might be wrong? Regards Thomas FONT SIZE=1 FACE=Arial___ Vi goer opmaerksom paa, at denne e-mail kan indeholde fortrolig information. Hvis du ved en fejltagelse modtager e-mailen, beder vi dig venligst informere afsender om fejlen ved at bruge svar-funktionen. Samtidig beder vi dig slette e-mailen i dit system uden at videresende eller kopiere den. Selv om e-mailen og ethvert vedhaeftet bilag efter vores overbevisning er fri for virus og andre fejl, som kan paavirke computeren eller it-systemet, hvori den modtages og laeses, aabnes den paa modtagerens eget ansvar. Vi paatager os ikke noget ansvar for tab og skade, som er opstaaet i forbindelse med at modtage og bruge e-mailen. ___ Please note that this message may contain confidential information. If you have received this message by mistake, please inform the sender of the mistake by sending a reply, then delete the message from your system without making, distributing or retaining any copies of it. Although we believe that the message and any attachments are free from viruses and other errors that might affect the computer or IT system where it is received and read, the recipient opens the message at his or her own risk. We assume no responsibility for any loss or damage arising from the receipt or use of this message. /FONT
Re: What is that maximum file size tomcat can serve?
I think this is due to the content-length (in the HTTP header) generated by Tomcat. Since my file is larger than 2G, and I believe Tomcat is using int32 to generate the content-length, therefore, I get negative value. am i right? - Original Message - From: Robert Wray [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, August 01, 2003 5:56 AM Subject: RE: What is that maximum file size tomcat can serve? Are you getting a java.lang.OutOfMemoryError ? If so, could you post the entire error? If not, in what manner is tomcat failing? At 09:34 AM 31/07/2003 -0400, you wrote: Howdy, This would almost definitely be an OS/JDK limit somewhere along the line. Tomcat will just stream the file, so its size is not really an issue AFAIK. Yoav Shapira Millennium ChemInformatics -Original Message- From: Lee Peik Feng [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 30, 2003 11:27 PM To: Tomcat Users List Subject: What is that maximum file size tomcat can serve? Hi, I have some mpeg file larger than 2GB and tomcat fail to serve these file. What is that maximum file size tomcat can serve? Is there any other limitation beside OS issue? Where can I find more info regarding this issue? Thanks. Regards, Peik Feng - 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: JNDI + oracle + Tomcat
Sorry... I haven't seen that 'driverName' attribute has chenged in 'url' Hello, I try to connect to Oracle 8.1.7 using a DataSource (Tomcat 4.1.24). In the code, my datasource object is not null (Oracle driver have been founded) but on getConnection method I have the following error message : java.sql.SQLException: Cannot create JDBC driver of class 'oracle.jdbc.driver.OracleDriver' for connect URL 'null' Following is server.xml part : -- ResourceParams name=jdbc/app/geode parameter nameuser/name valueuser/value /parameter parameter namepassword/name valuepassword/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namedriverName/name valuejdbc:oracle:thin:@:1521:xx/value /parameter /ResourceParams Following is web.xml part : --- resource-ref descriptiongfds/description res-ref-namejdbc/app/geode/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Following is my code to obtain a connection : Context envGlobal = new InitialContext(); Context envApp = (Context)envGlobal.lookup(java:comp/env); DataSource m_oJdbcDataSource = ( DataSource )envApp.lookup(jdbc/app/geode); Connection l_connect = m_oJdbcDataSource.getConnection(); I don't understand why connect URL is null, somebody can help me ? Thank you. -- Faites un voeu et puis Voila ! www.voila.fr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Faites un voeu et puis Voila ! www.voila.fr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSP seems to be executing twice and we are getting duplicaterecords in our database
Hi Bill, Would I be right in assuming that you're inferring a user is submitting the form multiple times by clicking the submit button/link more than once? Or are you perhaps suggesting the browser is sending multiple requests without user intervention to the server hence the reason why the responding JSP is processing duplicate requests to insert the data twice? I understand your suggestions and points. I don't however understand why the problem is occuring as in our case the additional execution of the JSP doesn't appear to be initiated by the user -- i.e. multiple clicks on a submit button, etc. I've triggered the submit using keyboard control which should initiate only one instance of the form data being sent to the server and the problem still occurs. It also seems a bit kludgy to first determine if a session ID associated with a specific record already exists prior to inserting a new row. AB -Original Message- From: Bill Lunnon [mailto:[EMAIL PROTECTED] Sent: Monday, 4 August 2003 9:27 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: JSP seems to be executing twice and we are getting duplicate records in our database Adrian, If you do not want anothe rows created every time the page is submitted, then you are going to have to implement something to stop this. TOMCAT will not do this for you. Without knowing the requirements for the form, stopping multiple rows being generated could be as simple as: - Assign a session to the user (clients browser). - When the form is submitted, capture the sessionId in the database with the record. - If there is no row with the sessionId in the database, create a new record with an insert. If there is a existing session, use an update to modify the record. Hope this helps Bill -Original Message- From: Adrian Beech [mailto:[EMAIL PROTECTED] Sent: Monday, 4 August 2003 8:45 PM To: [EMAIL PROTECTED] Subject: JSP seems to be executing twice and we are getting duplicate records in our database Hi folks, We have a weird problem where a JSP seems to be executing twice and we are getting duplicate records in our database. The data is coming from a HTML form and upon submit a subsequent JSP page is called that performs the SQL insert, etc. We are also getting duplicate log messages so our initial conclusion is that it's a Tomcat related issue. We have tested this with Tomcat 3.3.1, J2SE 1.3.1 and from the client side using both IE 5.5 and 6.0 and it happens intermittently. At this stage we have absolutely no idea of what is going on. Alas I didn't write the code so I'm not up to speed with its structure, flow or functionality. I've searched the list archive and there appears to be several references to similar problems. However I am unable to find any real answer to what might be causing this problem. Hoping someone out yonder can help. AB - 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]
Tomcat 4.0. LE
Dear Philipp Thanks for the help regarding the installation of JDK. Now one more thing, I am sure you would be able to help me out there as well I have got this installer for Tomcat 4.0. How do I install it, the file is called __tar.gz, I can view whats inside the compressed folder but don't know how to install it. Don't see any instal file. So any help would be appreciated. Regards Zille Hassan [EMAIL PROTECTED] United Matbouli Group 1st Floor, Matbouli Plaza PO Box556 Jeddah 21421 Kingdom of Saudi Arabia tel: +966 2 6512111 Ext:1901 fax: +966 2 6571171 -Original Message- From: Philipp Leusmann [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 2:37 PM To: Tomcat Users List Subject: AW: Many java-processes left after shutdown.sh I?d try sh ./__.rpm.bin -Ursprungliche Nachricht- Von: Zille Hassan [mailto:[EMAIL PROTECTED] Gesendet: Montag, 4. August 2003 13:33 An: Tomcat Users List Betreff: RE: Many java-processes left after shutdown.sh Dear Philipp Since your question is regarding tomcat on linux, so I thought it best to put my question to you as well. I have downloaded the rpm file for the SDK or jdk 1.4. When I see the file on linux machine, I see ___.rpm.bin How do I install it ? Any suggestions ? Zille Hassan [EMAIL PROTECTED] United Matbouli Group 1st Floor, Matbouli Plaza PO Box556 Jeddah 21421 Kingdom of Saudi Arabia tel: +966 2 6512111 Ext:1901 fax: +966 2 6571171 -Original Message- From: Philipp Leusmann [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 2:23 PM To: [EMAIL PROTECTED] Subject: Many java-processes left after shutdown.sh Hello, when I stop tomcat using shutdown.sh there are still many tomcat-processes running in linux. Is this normal or do I have a configuration problem (contexts are not closed properly)? I use a connection pool to a Mysql-database in my application (BasicDatasourceFactory). Do I have to close these connections somehow manually? Thanks, Philipp - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4.0. LE
Zillie, What I have done, is extract the file in the /var directory to /var/Jakarta-tomcat4.0, then just edit the Catalina.sh file to fit your environment. You can extract it by right clicking on the file in X and say extract. Regards Werner vd Merwe SAICOM Cpt Linux user #322423 -Original Message- From: Zille Hassan [mailto:[EMAIL PROTECTED] Sent: 04 August 2003 02:23 PM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Tomcat 4.0. LE Dear Philipp Thanks for the help regarding the installation of JDK. Now one more thing, I am sure you would be able to help me out there as well I have got this installer for Tomcat 4.0. How do I install it, the file is called __tar.gz, I can view whats inside the compressed folder but don't know how to install it. Don't see any instal file. So any help would be appreciated. Regards Zille Hassan [EMAIL PROTECTED] United Matbouli Group 1st Floor, Matbouli Plaza PO Box556 Jeddah 21421 Kingdom of Saudi Arabia tel: +966 2 6512111 Ext:1901 fax: +966 2 6571171 -Original Message- From: Philipp Leusmann [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 2:37 PM To: Tomcat Users List Subject: AW: Many java-processes left after shutdown.sh I?d try sh ./__.rpm.bin -Ursprungliche Nachricht- Von: Zille Hassan [mailto:[EMAIL PROTECTED] Gesendet: Montag, 4. August 2003 13:33 An: Tomcat Users List Betreff: RE: Many java-processes left after shutdown.sh Dear Philipp Since your question is regarding tomcat on linux, so I thought it best to put my question to you as well. I have downloaded the rpm file for the SDK or jdk 1.4. When I see the file on linux machine, I see ___.rpm.bin How do I install it ? Any suggestions ? Zille Hassan [EMAIL PROTECTED] United Matbouli Group 1st Floor, Matbouli Plaza PO Box556 Jeddah 21421 Kingdom of Saudi Arabia tel: +966 2 6512111 Ext:1901 fax: +966 2 6571171 -Original Message- From: Philipp Leusmann [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 2:23 PM To: [EMAIL PROTECTED] Subject: Many java-processes left after shutdown.sh Hello, when I stop tomcat using shutdown.sh there are still many tomcat-processes running in linux. Is this normal or do I have a configuration problem (contexts are not closed properly)? I use a connection pool to a Mysql-database in my application (BasicDatasourceFactory). Do I have to close these connections somehow manually? Thanks, Philipp - 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] - 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]
DataSource + Oracle + Tomcat
Hello, I try to connect to Oracle 8.1.7 using a DataSource (Tomcat 4.1.24). In the code, my datasource object is not null (Oracle driver have been founded) but on getConnection method I have the following error message : org.apache.commons.dbcp.DbcpException: java.sql.SQLException: invalid arguments in call (the exception is generated in French, maybe my translation is not exact) Following is server.xml part : -- ResourceParams name=jdbc/app/geode parameter nameuser/name valueuser/value /parameter parameter namepassword/name valuepassword/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namedriverName/name valuejdbc:oracle:thin:@:1521:xx/value /parameter /ResourceParams Following is web.xml part : --- resource-ref descriptiongfds/description res-ref-namejdbc/app/geode/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Following is my code to obtain a connection : Context envGlobal = new InitialContext(); Context envApp = (Context)envGlobal.lookup(java:comp/env); DataSource m_oJdbcDataSource = ( DataSource )envApp.lookup(jdbc/app/geode); Connection l_connect = m_oJdbcDataSource.getConnection(); I don't understand what are these invalid arguments, somebody can help me ? Thank you. -- Faites un voeu et puis Voila ! www.voila.fr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Configuration Error?
Howdy, But do I have to import my own classes? If so what is the purpose of having the Bean code separated from the JSP code? Yes, you have to import your classes so the JVM knows what classes you're using. The point of separation is two-fold (probably more): - Other components can use the Bean separately without knowing anything about your JSP page - The bean and the JSP can be developed (and packaged/deployed) independently, as long as the interfaces are well-defined. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Docs
Howdy, I googled around for help, but can not seem to find anything starting from scratch. Does anybody know of a good place to start teaching yourself the product? Need to define three separate sites from the main site. E.g. www.ourdomain.com/site1-site3 Each site would likely be a web application, or a context in tomcat-speak. A good document for you would be the App Developer's guide at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html Especially the deployment organization section. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JVM tuning
Howdy, Has anyone got any clues on JVM tuning for Tomcat on Windows 2000, Sun 141 I would venture at least a few people on this list have clues. But it's impossible to help you without a clue about your webapp. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Many java-processes left after shutdown.sh
Howdy, Since your question is regarding tomcat on linux, so I thought it best to put my question to you as well. I have downloaded the rpm file for the SDK or jdk 1.4. When I see the file on linux machine, I see ___.rpm.bin How do I install it ? Any suggestions ? Bad idea: start another thread for your question, don't hijack someone else's. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Many java-processes left after shutdown.sh
Howdy, when I stop tomcat using shutdown.sh there are still many tomcat-processes running in linux. Is this normal or do I have a configuration problem (contexts are not closed properly)? I use a connection pool to a Mysql-database in my application (BasicDatasourceFactory). Do I have to close these connections somehow manually? There are non-daemon background threads for MySQL. Ensure proper shutdown of the connection pool/driver. Use CTRL-Break to see what threads are doing in the JVM. Search the archives for this list as this question has come up and been answered a few times, including two weeks ago. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re[2]: Servlets JSPs log to different files
Howdy, I would point out a couple of things, since you posted this code as an example, but they are subjective. I have a servlet that is loaded at the time tomcat starts. The container is free to destroy and reload this servlet as it deems necessary. Accordingly, use a ServletContextListener instead. DOMConfigurator domConfig; Should be private? And inside the method rather than a servlet instance variable? then in the class (bean) that has no idea about the context i have the following: protected org.apache.log4j.Logger logWriter = org.apache.log4j.Logger.getLogger(nameoffiletoappearinlog); Why is this protected? You almost always want loggers to be private (static, and final). Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JVM tuning
Hmm well only a profiler could tell me that; I was more looking for some (subsequently discovered) things such as you should reseize the young generation to be much larger than the default 25% and so on; there are some rules of thumb such as this which I was looking for! cheers Pete Shapira, Yoav [EMAIL PROTECTED] 04/08/2003 14:16 Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: JVM tuning Howdy, Has anyone got any clues on JVM tuning for Tomcat on Windows 2000, Sun 141 I would venture at least a few people on this list have clues. But it's impossible to help you without a clue about your webapp. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlets JSPs log to different files
Howdy, Can anyone expand on this further and explain how to use a Log4j logger reference in beans that do not have a notion of what the underlying servlet context is? The only way I can see how to get this to work is to pass the logger reference as an argument in the bean's constructor. You initialize the log4j system somewhere, e.g. a servlet context listener's contextInitialized() method. Then in your classes you just have a Logger member variable: private static final Logger LOGGER = Logger.getLogger(MyClass.class.getName()); And you use this logger as you want. It's typical to name the logger the same as the class, but not required. All of this is in the log4j docs. The classes don't need to know how log4j is configured, and they definitely don't get a Logger passed to them (unless you're doing some very strange things). Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Pb with tomcat examples
Hi, I've got a little problem with tomcat examples. When I go to Tomcat Administration and look at Tomcat Server/Service/Host/Context(/examples)/Resources/Data Sources I can see: JNDI NameJDBC Driver Class jdbc/EmployeeAppDb org.hsql.jdbcDriver But when I click on jdbc/EmployeeAppDb link I've got: Etat HTTP 500 - Error retrieving attribute url And in the admin logs I've: 2003-08-04 14:48:53 action: Error retrieving attribute url javax.management.AttributeNotFoundException: Cannot find attribute urlResourceParams[name=jdbc/EmployeeAppDb, parameters={user=sa, driverName=jdbc:HypersonicSQL:database, password=, driverClassName=org.hsql.jdbcDriver}] at org.apache.catalina.mbeans.ContextResourceMBean.getAttribute(ContextReso urceMBean.java:175) at mx4j.server.interceptor.InvokerMBeanServerInterceptor.getAttribute(Invok erMBeanServerInterceptor.java:242) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.getAttribute(Defau ltMBeanServerInterceptor.java:138) at mx4j.server.interceptor.SecurityMBeanServerInterceptor.getAttribute(Secu rityMBeanServerInterceptor.java:101) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.getAttribute(Defau ltMBeanServerInterceptor.java:138) [...] Can anybody help ? I use: Tomcat 4.1.27 JDK 1.3.1_05 Windows 2000 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JVM tuning
Howdy, -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 9:27 AM To: Tomcat Users List Subject: RE: JVM tuning Hmm well only a profiler could tell me that; I was more looking for some (subsequently discovered) things such as you should reseize the young generation to be much larger than the default 25% and so on; there are some rules of thumb such as this which I was looking for! I would argue any such rule of thumb is as likely to hurt performance as improve it for your specific app. Yoav Shapira Millennium ChemInformatics This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: What is that maximum file size tomcat can serve?
Howdy, -Original Message- From: Lee Peik Feng [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 8:02 AM To: Tomcat Users List Subject: Re: What is that maximum file size tomcat can serve? I think this is due to the content-length (in the HTTP header) generated by Tomcat. Since my file is larger than 2G, and I believe Tomcat is using int32 to generate the content-length, therefore, I get negative value. am i right? Do you have the actual headers generated by tomcat showing a negative content length, e.g from a netscan tool? Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JVM tuning
Well not really; we know that we are running Tomcat, a web container which has its own (fixed) characteristics. It is a server side app which is processing non state based transactions which are thus highly like to involve a lot of objects being created and destroyed without too many hanging around for long; the details of the webapp, unless it is highly unusual, are likely not to matter particularly. This is a rule of thumb not an exact science and the vast majority of people who run Tomcat would benefit from running in such a configuration (or playing with it to see what the effects were) - read Sun's own tuning documentation and you will see the default settings are not said to be suitable for the majority of server apps. cheers Pete Shapira, Yoav [EMAIL PROTECTED] 04/08/2003 14:29 Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: JVM tuning Howdy, -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 9:27 AM To: Tomcat Users List Subject: RE: JVM tuning Hmm well only a profiler could tell me that; I was more looking for some (subsequently discovered) things such as you should reseize the young generation to be much larger than the default 25% and so on; there are some rules of thumb such as this which I was looking for! I would argue any such rule of thumb is as likely to hurt performance as improve it for your specific app. Yoav Shapira Millennium ChemInformatics This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JVM tuning
Howdy, Well not really; we know that we are running Tomcat, a web container which has its own (fixed) characteristics. It is a server side app which is processing non state based transactions which are thus highly like to involve a lot of objects being created and destroyed without too many hanging around for long; the details of the webapp, unless it is highly unusual, are likely not to matter particularly. This is a rule of thumb not an exact science and the vast majority of people who run Tomcat would benefit from running in such a configuration (or playing with it to see what the effects were) I disagree ;) Every time I've tuned a webapp for pay, both transactional and not, both full J2EE and just servlets/JSPs, the above has been false. The webapp's specific implementation matters far more (typically 3-4 orders of magnitude) than the container implementation, especially for a mature container which has been tuned repetitively and carefully over time. It's precisely because of this, and because as you say performance tuning is not a science, that a rule of thumb is as likely to hurt as it is to help if blindly applied. read Sun's own tuning documentation and you will see the default settings are not said to be suitable for the majority of server apps. I appreciate the pointer - I used to help write them ;) Good luck, however, as it's always YMMV with these things. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is that maximum file size tomcat can serve?
Can you post the stack trace, versions used, and your config? Standalone vs jk ... I tried tomcat5 with its standalone http connector with a 2,349,092,191 byte file and all was ok for me. I would expect the same result from tomcat 4.1 -Tim Lee Peik Feng wrote: I think this is due to the content-length (in the HTTP header) generated by Tomcat. Since my file is larger than 2G, and I believe Tomcat is using int32 to generate the content-length, therefore, I get negative value. am i right? - Original Message - From: Robert Wray [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, August 01, 2003 5:56 AM Subject: RE: What is that maximum file size tomcat can serve? Are you getting a java.lang.OutOfMemoryError ? If so, could you post the entire error? If not, in what manner is tomcat failing? At 09:34 AM 31/07/2003 -0400, you wrote: Howdy, This would almost definitely be an OS/JDK limit somewhere along the line. Tomcat will just stream the file, so its size is not really an issue AFAIK. Yoav Shapira Millennium ChemInformatics -Original Message- From: Lee Peik Feng [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 30, 2003 11:27 PM To: Tomcat Users List Subject: What is that maximum file size tomcat can serve? Hi, I have some mpeg file larger than 2GB and tomcat fail to serve these file. What is that maximum file size tomcat can serve? Is there any other limitation beside OS issue? Where can I find more info regarding this issue? Thanks. Regards, Peik Feng - 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: Docs
I recommend a server admin book. There was a recent flame war about this. Check the user archives. http://jakarta.apache.org/tomcat/faq/ -Tim Werner vd Merwe wrote: Good day, We are moving over from IIS to Jakarta, but my knowledge of the product is null. I googled around for help, but can not seem to find anything starting from scratch. Does anybody know of a good place to start teaching yourself the product? Need to define three separate sites from the main site. E.g. www.ourdomain.com/site1-site3 Many thanks Regards Werner vd Merwe SAICOM Cpt Linux user #322423 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 4.1.27 reload webapp
Yup a bug. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22096 -Tim Edwin Eversdijk wrote: Hi, When i reload a webapp in tomcat 4.1.27 (win2000/jdk1.4.1) and load a jsp from that webapp I get the message: Compiling 1 source file [javac] C:\Apache-tomcat\temp\check_jsp.java:7: package com.blablabla.. it can't find the jars included in the webapp lib directory. When i start/stop the webapp it doesn't give any problems. Some bug in tomcat 4.1.27 Regards, Edwin Eversdijk __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JVM tuning
Ah sorry I should really have said that I was focusing specifically on memory managment; general performance tuning is a completely different matter in which I do agree with you! On the memory front however I would stand by the fact that most tomcat webapps (big or small) would benefit from a change in the default JVM config. Anyway, have sorted out my problem now (by doing just that as well as a GC change) and performance is 10x better! cheers Pete Shapira, Yoav [EMAIL PROTECTED] 04/08/2003 14:45 Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: JVM tuning Howdy, Well not really; we know that we are running Tomcat, a web container which has its own (fixed) characteristics. It is a server side app which is processing non state based transactions which are thus highly like to involve a lot of objects being created and destroyed without too many hanging around for long; the details of the webapp, unless it is highly unusual, are likely not to matter particularly. This is a rule of thumb not an exact science and the vast majority of people who run Tomcat would benefit from running in such a configuration (or playing with it to see what the effects were) I disagree ;) Every time I've tuned a webapp for pay, both transactional and not, both full J2EE and just servlets/JSPs, the above has been false. The webapp's specific implementation matters far more (typically 3-4 orders of magnitude) than the container implementation, especially for a mature container which has been tuned repetitively and carefully over time. It's precisely because of this, and because as you say performance tuning is not a science, that a rule of thumb is as likely to hurt as it is to help if blindly applied. read Sun's own tuning documentation and you will see the default settings are not said to be suitable for the majority of server apps. I appreciate the pointer - I used to help write them ;) Good luck, however, as it's always YMMV with these things. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Jasper, JSPC, Ant and Precompiling JSP's
Hello, I've done my best to review the archives to resolve my problem, but I've not found a solution there so I'm posting it. I'm stuck back on Tomcat 4.1.24 (LE) and I'm encountering some issues with JSP Precompilation using Ant and JSPC. First let me outline my problem. Most messages I've read to date focus on using JSP recompiling to turn the JSP into Servlets stored in a WAR file and require generating a fragment web.xml file and including it into your web.xml, I AM NOT trying to do this. I want my JSP's to get precompiled into the work directory of Tomcat and used from there, the exact same way that Tomcat does it. This way afterward, if the jsp is modified, tomcat can still recompile it. I have the following jspc and javac tasks coded in my build.xml: mkdir dir=/var/tomcat4/work/Standalone/localhost/Foo/ jspc srcdir=${deploy.home} destdir=/var/tomcat4/work/Standalone/localhost/Foo failonerror=false compiler=jasper41 classpath !-- snip -- /classpath exclude name=**/WEB-INF/**/ /jspc javac destdir=/var/tomcat4/work/Standalone/localhost/Foo optimize=off debug=on failonerror=false srcdir=/var/tomcat4/work/Standalone/localhost/Foo excludes=**/*.smap classpath !-- snip -- /classpath /javac Both tasks get completed successfully. I observe problems in the package names of the JSPC generated java files where the following is the case. /var/tomcat/webapps/Foo/Bar/Bam.jsp results in the package name package Bar; ... which becomes a problem when I try to access this JSP included into another, I get the following error java.lang.NoClassDefFoundError: org/apache/jsp/Bam_jsp (wrong name: Bar/Bam_jsp) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.lang.ClassLoader.defineClass(ClassLoader.java:431) at org.apache.jasper.servlet.JasperLoader.loadClass(Unknown Source) at org.apache.jasper.servlet.JasperLoader.loadClass(Unknown Source) at org.apache.jasper.JspCompilationContext.load(Unknown Source) at org.apache.jasper.servlet.JspServletWrapper.getServlet(Unknown Source) at org.apache.jasper.compiler.Compiler.isOutDated(Unknown Source) at org.apache.jasper.compiler.Compiler.isOutDated(Unknown Source) ... I read somewhere that work had been done on my version (4.1.24) to eliminate a naming conflict problem. I assume this is why there are now package names on my _jsp.java files. I find that when I let Tomcat/Jasper compile all my jsp's the java files *all* have the package name org.apache.jsp no matter what their directory. I assume that my compilation is conflicting with Tomcats because of the package naming differences. So, I've tried adding the following attribute package=org.apache.jsp to the jspc task, but this results in even more problems because all the package names now look like: package org.apache.jsp.Bar; and when they are compiled, they end up in a separate directory /var/tomcat4/work/Foo/org/apache/jsp/Bar/Bam_jsp.java Any ideas or solutions out there would be really helpful for me. I just want to have Tomcat start out using my precompiled jsp's instead of initially compiling them itself. thanks Mark Diggory HMDC - 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: HELP!! TOMCAT and MYSQL
Hi Replace for amp; to get a valifd XML Bye El Dom 03 Ago 2003 06:39, engp0510 escribió: Thanks very much! Y, I have tried. But always throw org.xml.sax.SAXParseException said a ; is needed to end the quote of password. Any advice? - Original Message - From: Emmanuel G. Dialynas [EMAIL PROTECTED] To: engp0510 [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, August 03, 2003 6:07 PM Subject: Re: HELP!! TOMCAT and MYSQL Try: connectionURL=jdbc:mysql://localhost/authority?user=leesonpassword= At 04:32 ìì 03/08/03 +0800, engp0510 wrote: Hi, I am using Tomcat 4.0 and MySQL 4.0.14 on WIn2K Professional. In Server.XML of Tomcat, I use: Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://localhost/authority?user=leeson;password= userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name / In MySQL, I set all user must access database with password and grant user 'leeson' with all privileges @ localhost. I can use leeson and password to log into MySQL. All setting of MySQL will work well when I login MySQL using CMD on Win2K But when I start tomcat-standalone, there is always : Catalina.start: LifecycleException: Exception opening database connection: java.sql.SQLException: Invalid authorizatio n specification: Access denied for user: 'leeson;[EMAIL PROTECTED]' (Using password: NO) LifecycleException: Exception opening database connection: java.sql.SQLException: Invalid authorization specification: Access denied for user: 'leeson;[EMAIL PROTECTED]' (Using password: NO) ... So, it seem Parser regard user as leeson;password, not leeson. But if I grant leeson all privileges but without password, the tomcat could work. - 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]
RES: Cookie problem max age problem - Best practice to solve it
Sorry Steve, one information isnt right! First, using Sniffer to monitor all http traffic, i found out one important news: the authentication app's plugin works with Session object instead of Cookie object. What kind of information would you like to receive about it? Does Session object work different between OC4J and TomCat? Euclides. -Mensagem original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 1 de agosto de 2003 12:22 Para: 'Tomcat Users List' Assunto: RES: Cookie problem max age problem - Best practice to solve it Assunto: Re: RES: Cookie problem max age problem - Best practice to solve it the authentication app's plugin wasnt created by me, its only stored on TomCat to be used by my Java app. This plugin runs together with another app server, which completes the authentication process. After this process is completed ok, a cookie is created. So, when the user asks for logout, the plugin tries to delete the cookie, probably setting 0 to max age. If i work with OC4J, this steps runs fine and the user becomes abled to make another login request on the same browser instance, without needing to close it. But, if i work with TomCat, i need to close the browser instance and open another one to be sucessful. Needing help still. Regards, Euclides. This does not change any of the previous discussion. The problem hinges on the answers to two questions: What are the values used for domain, path, and name when the cookie is set? What are the values used for domain, path, and name when the cookie is deleted? If you can demonstrate that the same set of values are used in both cases, then this sounds like it would be a tomcat problem. You can examine the Set-Cookie headers sent by the server to see whether this is the case. Otherwise, this is an issue that should be raised with the vendor who provided the authentication plugin. -- Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to run web application in different modes like test, production
Hi all, I have a web application that runs -depending on the content of a property file - in different modes. But the application can only run in either one of these modes at a time. I want to be able to run the web application in serveral modes at the same time (e.g to test different DBs, email flows etc). What is the best way to accomplish that ? Thanks for you ideas. Astrid - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to run web application in different modes like test, production
Howdy, You could have different tomcat instances, each with a copy of the app that has different property file settings. Or you could deploy the app multiple times with different names to one tomcat instance (e.g. webapps/MyApp-Test, webapp/MyApp-Dev) etc. Yoav Shapira Millennium ChemInformatics -Original Message- From: Astrid Wagner [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 10:33 AM To: [EMAIL PROTECTED] Subject: how to run web application in different modes like test, production Hi all, I have a web application that runs -depending on the content of a property file - in different modes. But the application can only run in either one of these modes at a time. I want to be able to run the web application in serveral modes at the same time (e.g to test different DBs, email flows etc). What is the best way to accomplish that ? Thanks for you ideas. Astrid - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RES: Cookie problem max age problem - Best practice to solve it
one information isnt right! First, using Sniffer to monitor all http traffic, i found out one important news: the authentication app's plugin works with Session object instead of Cookie object. What kind of information would you like to receive about it? Does Session object work different between OC4J and TomCat? Then you're in trouble. Session objects live within the memory of the JVM process where the servlet container is running. You aren't going to be able to share them between two different processes. Even within a single container, there are still limitations on sharing Session data; you can't share from one context to another. (See 7.3 Session Scope in the servlet specification). -- Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 4.1x running as NT Service Issue
I told you wrong about how to set the memory limits when running as a service. You can set the memory options in the Windows registry using regedit. In regedit, open HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Apache Tomcat 4.1\Parameters Add a string value named: JVM Option Number 3 and set it's value to -Xms100m Add a string value named: JVM Option Number 4 and set it's value to -Xmx100m Change the JVM Option Count to 5 (was 3 at least on my machine. The value of this field must match the number of JVM Option Number x values). You can also write log statements to check allocated and available memory. Following is an example thread that we used. I've cut out a few parts that are specific to our application and the formatting is screwed up from cutting and pasting it, but should be close enough to get you going. public class MemoryMonitor implements Runnable { private boolean done = false; private Runtime rt = Runtime.getRuntime(); public MemoryMonitor() { Thread theThread = new Thread(this); theThread.setDaemon(true); theThread.setPriority(Thread.MIN_PRIORITY); theThread.start(); } public void run() { while (!done) { try { long freeMemory = rt.freeMemory()/1024; long totalMemory = rt.totalMemory()/1024; long memoryUsed = (totalMemory-freeMemory)/1024; long allocatedMemory = (totalMemory/1024); AppLog.info([Memory Monitor] -- +new Timestamp(System.currentTimeMillis()).toString()+ --- Memory Allocated: +(int)allocatedMemory+k); AppLog.info([Memory Monitor] -- +new Timestamp(System.currentTimeMillis()).toString()+ --- Memory Used: +(int)memoryUsed+k); rt.gc(); if(allocatedMemorytotalMemory){ } Thread.sleep( MemoryMonitorProperties.getInstance().getCheckMemoryInterval()); } catch (Exception ie) { AppLog.error(AppError.getStackTraceAsString(ie)); } } AppLog.info(MemoryMonitor terminated.); } } - Original Message - From: Robert Porter [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Saturday, August 02, 2003 11:34 PM Subject: RE: Tomcat 4.1x running as NT Service Issue I am not sure why we are not running 1.4, but the image from corporate has 1.3.1 and we have been told to live with it. We are running pretty much the same configuration from what you describe but with drastically different results. I am checking on JVM settings, and I will try what you suggest. The laptops are Dell and IBM late models with 256 MB of memory and large fast drives so I don't think it's the hardware. All running W2K Pro with SQL Server 2000 Std Ed. We are using an older JDBC driver, what JDBC driver are you using? -Original Message- From: Nathan Ward [mailto:[EMAIL PROTECTED] Sent: Saturday, August 02, 2003 10:27 PM To: Tomcat Users List Subject: Re: Tomcat 4.1x running as NT Service Issue I'm not sure that this is it, but you might try setting the JVM min and max memory limits when starting Tomcat by adding the following to $CATALINA_HOME\bin\catalina.bat: set JAVA_OPS = -Xms100m -Xmx100m Default for the JVM I believe should be 64mb, but who knows. Why are you using jdk 1.3.1? Do you have existing code that is not compatible with jdk 1.4? We are running Tomcat 4.1.24 as a service under Windows 2000 Server accessing an SQL Server database on the same machine with JDK 1.4.1_01 and it is working. Nathan - Original Message - From: Robert Porter [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, August 02, 2003 6:57 PM Subject: Tomcat 4.1x running as NT Service Issue I have scanned all the archives, and have seen some issues that are similar but not quite the same so I am posting this request. We are running Tomcat 4.1.24 Binary release, as a Service on Windows 2000 SP3 and SP4 Pro version. No JSP just servlets. The Tomcat instance is hosting 2 servlets that talk to a local SQL Server 2000 database on the same machine. A VB 6 client is talking to the servlets via http post etc, and exchanging XML documents for requests and replies. Running as a Service, with JDK 1.3.1 as the JVM the service will crash after about 10 minutes of activity. Just prior to the crash, available memory will decrease to 0 and the system will slow to a crawl with a lot of disk activity, paging I imagine. Running Tomcat in a window alleviates the problem entirely, so I am assuming there are some parameters that are being passed via the Startup.bat file that are not happening with the service. Or perhaps to the JVM, I am very new to Tomcat so I am not sure how to accomplish this. However we really want to have Tomcat running as a service since this is a laptop app being deployed to hundreds of our users, and we don't want them mucking about with the Window created by running Tomcat as a windowed service. Plus, having it run as a service means it is one less thing to worry about in our application
Some questions
Hello, In our company, we are using Tomcat Version 4.0.1 and Java 2 SDK, Standard Edition Version 1.4.0 a. I read that if one uses 'catalina nonaming start' instead of 'startup', it would help disable the use of JNDI within Tomcat. (1) Is this feature available with Tomcat 4.0.1 ? (2) Does it mean that JNDI is enabled by default ? (3) Can it be disabled thro' say server.xml ? b. I also read that one can set up CATALINA_OPTS=-Xmx44M (1) Will this set the max memory size of 44 MB ? (2) Again, is this feature available with Tomcat 4.0.1 c. I read on the net that one can set the -server option in JDK 1.4... (1) Where does one setup this option? Is it in catalina.bat and how? Awaiting your reply. Regards, Satish Talim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Why integrate Tomcat with a web server?
I have a question for John Turner about a statement in the book Apache Tomcat Security. Page 12 says: As discussed earlier, running publicly available web services as root or superuser is typically a bad idea, so the solution is to avoid using Tomcat as a stand-alone web server on port 80 by integrating it with a standard HTTP web server such as Apache, Microsoft's IIS, or Sun Microsystem's iPlanet. Question: Does this apply when running under Windows? The reference to as discussed earlier talks about running Tomcat as a service with more permissions than necessary. Windows defaults to running services as SYSTEM which has administrator privileges. Fine, but as also mentioned earlier, you can create a user account with less permissions and setup the service to run Tomcat under that account. So, how does the statement on page 12 relate to running Tomcat under windows, i.e. why run Tomcat with IIS rather than just run Tomcat? There may be performance reasons, but from a security point of view, is there increased security risks in running Tomcat without IIS when running as a service under Windows? Nathan
RE: Some questions
Howdy, In our company, we are using Tomcat Version 4.0.1 and Java 2 SDK, Standard Edition Version 1.4.0 If possible, update to 4.1.27 and JDK 1.4.2. a. I read that if one uses 'catalina nonaming start' instead of 'startup', it would help disable the use of JNDI within Tomcat. (1) Is this feature available with Tomcat 4.0.1 ? (2) Does it mean that JNDI is enabled by default ? (3) Can it be disabled thro' say server.xml ? Where did you read this? Looking at $CATALINA_HOME/bin/catalina.sh would tell you this option is not available. Reading the servlet spec will tell you that a container is required to support naming. So yes, JNDI is available and enabled by default. You can't disable JNDI support per se, but you can make sure no JNDI resources are defined in server.xml, so that any JNDI lookups return null. b. I also read that one can set up CATALINA_OPTS=-Xmx44M (1) Will this set the max memory size of 44 MB ? (2) Again, is this feature available with Tomcat 4.0.1 Yes, this indicates to the JVM to allow up to 44MB on the heap. This option is available with tomcat 4.0.1, as once again simply looking at $CATALINA_HOME/bin/catalina.sh would show. c. I read on the net that one can set the -server option in JDK 1.4... (1) Where does one setup this option? Is it in catalina.bat and how? It's a JVM option just like the others, e.g. -Xmx above. It's available even before JDK 1.4. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Securing Apache/Tomcat Communication
Hi, Does anyone know if it's possible to secure the connection (AJP or otherwise) between Apache and Tomcat? I'm currently using mod_jk. I'm most interested in SSL (or other encryption) between the two rather than the JServ-style secret key mechanism. Thanks, Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tutorial question
Hi, does anybody here know about a good tutorial on JSP, specially working with sessions? thanks. Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re-routing messages from the console on Win NT/2000
Tomcatters, I am running Tomcat 4.1.24 on Windows NT 4.0. When I get a runtime error in my servlet, I'm getting stack traces on the console instead of in the log. Is there a way to force all output to the log. I have a log specified that it writes to while the container loads, but for some reason, runtime errors. Should I be doing something other than exception.printStackTrace();. If I could get a copy of the stack trace, I could use getServletContext().log(). Suggestions please. Thanks Chuck - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tutorial question
Martin, Check this out, it should help... http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets11.html#63281 Raffi -Original Message- From: Martin Mauri [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 11:23 AM To: Tomcat Users List Subject: tutorial question Hi, does anybody here know about a good tutorial on JSP, specially working with sessions? thanks. Martin - 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: Re-routing messages from the console on Win NT/2000
Howdy, I am running Tomcat 4.1.24 on Windows NT 4.0. When I get a runtime error in my servlet, I'm getting stack traces on the console instead of in the log. Is there a way to force all output to the log. I have a log specified that it writes to while the container loads, but for some reason, runtime errors. Should I be doing something other than exception.printStackTrace();. If I could get a copy of the stack trace, I could use getServletContext().log(). Several options: -Add swallowOutput=true to your context definition, and the console output will be redirected to your servlet context log, as if you had used ServletContext#log(...). - Use a StringWriter to get the stack trace, e.g. for Exception e, StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); pw.flush(); getServletContext().log(sw.toString()); - Use a logging system like log4j and just do try { ... } catch(Exception e) { LOGGER.error(Messed up: , e); } Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jasper, JSPC, Ant and Precompiling JSP's
Thanks Ian, We actually already have a shell script that does this too. I was hoping to get some details on how to make the jspc and tomcat behaviors more consistent with each other so that I could move away from this strategy and use the compiler directly. Unfortunately, its often the case that our jsp's are behind security realms and cannot be gotten at without logging into the webapplication first which means we need to maintain session information while 'grazing' the jsp's. Since this was starting to get more complex than I wanted, I was hoping to step back and see why JspC wasn't just providing jsp compilation features that were not consistent with Tomcats behavior when compiling intothe work directory. From what I understand, Jasper loads each JSP into its own classloader, this means that it can get away with having the same exact package name in each JSP even though they are in different directories in 'work' the classloaders load each individual _jsp.java/_jsp.class file relative to to the directory it is within. JspC on the other had, treats the directory as a package hierarchy (which is great if your going to dump them into the classes directory and map them in your web.xml). It is apparent that JspC cannot be used to compile the JSP's into Tomcats work directory because of this package naming issue. -Mark Zabel, Ian wrote: Mark, I want my JSP's to get precompiled into the work directory of Tomcat and used from there, the exact same way that Tomcat does it. This way afterward, if the jsp is modified, tomcat can still recompile it. I have a class that you can use as part of a build or manually that will trigger tomcat to compile all the jsps, given a directory and a URL. It can easily be converted into an Ant task. I'll send you the source if you want. Basically, it reads in a directory, filters to find all the jsp names in it, and then iterates through them, and calls http://tomcatserver/path/jspname.jsp?jsp_precompile=true The jsp_precompile=true is understood by tomcat to mean: just compile the jsp, don't do anything else. This process effectively compiles every single jsp in your webapp, but must be done on a live tomcat server, not offline. You could then copy all of the generated jsp java classes from the work directory into a production tomcat server, and hopefully it would use them instead of recompiling. Let me know if you want it. Ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.0.2 Service
Hey there, I have windows XP, tomcat 5.0 and jdk1.4.1_01. when I log out from the system, tomcat stops itself. Do you have any idea how I can configure tomcat or some other services so that it can run after logging off windows. Thanks, Vikas _ Latest movie trailers. On your mobile. http://server1.msn.co.in/sp03/gprs/howcani_movie.asp With GPRS. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Persistent Sessions
I am trying to clean-up ( invalidate ) all the session when Tomcat is restarted for any reason. I have the following Tag in my server.xml. The session created for my web application still seem to persist, is there another place or way the session is being store or persisted? Please help, thanks in advance. Kal Manager className=org.apache.catalina.session.PersistentManager debug=0 saveOnRestart=false maxActiveSessions=-1 minIdleSwap=-1 maxIdleSwap=-1 maxIdleBackup=-1 Store className=org.apache.catalina.session.FileStore/ /Manager - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.0.2 Service
Howdy, How do you have it configured now? Also, if you could use 5.0.6 for your testing instead that'd be great! Yoav Shapira Millennium ChemInformatics -Original Message- From: vikas jain [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 12:06 PM To: [EMAIL PROTECTED] Subject: Tomcat 5.0.2 Service Hey there, I have windows XP, tomcat 5.0 and jdk1.4.1_01. when I log out from the system, tomcat stops itself. Do you have any idea how I can configure tomcat or some other services so that it can run after logging off windows. Thanks, Vikas _ Latest movie trailers. On your mobile. http://server1.msn.co.in/sp03/gprs/howcani_movie.asp With GPRS. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Persistent Sessions
Howdy, Consider a container-independent approach instead: write an HttpSessionListener that's also a ServletContextListener. Have it keep a static list of HttpSession objects, adding the session to the list on its creation and removing on its destruction. Then, have the contextDestroyed method go through the list and invalidate all the remaining sessions. Yoav Shapira Millennium ChemInformatics -Original Message- From: Kal Govindu [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 11:09 AM To: Tomcat Users List (E-mail) Subject: Persistent Sessions I am trying to clean-up ( invalidate ) all the session when Tomcat is restarted for any reason. I have the following Tag in my server.xml. The session created for my web application still seem to persist, is there another place or way the session is being store or persisted? Please help, thanks in advance. Kal Manager className=org.apache.catalina.session.PersistentManager debug=0 saveOnRestart=false maxActiveSessions=-1 minIdleSwap=-1 maxIdleSwap=-1 maxIdleBackup=-1 Store className=org.apache.catalina.session.FileStore/ /Manager - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jasper, JSPC, Ant and Precompiling JSP's
In fact, I'm curious to the status of this in 5.0 and the directions that this will take in the future, I may be willing to do a little work to add work directory compilation to the capabilities of JspC, if they do not already exist. -Mark Mark R. Diggory wrote: Thanks Ian, We actually already have a shell script that does this too. I was hoping to get some details on how to make the jspc and tomcat behaviors more consistent with each other so that I could move away from this strategy and use the compiler directly. Unfortunately, its often the case that our jsp's are behind security realms and cannot be gotten at without logging into the webapplication first which means we need to maintain session information while 'grazing' the jsp's. Since this was starting to get more complex than I wanted, I was hoping to step back and see why JspC wasn't just providing jsp compilation features that were not consistent with Tomcats behavior when compiling intothe work directory. From what I understand, Jasper loads each JSP into its own classloader, this means that it can get away with having the same exact package name in each JSP even though they are in different directories in 'work' the classloaders load each individual _jsp.java/_jsp.class file relative to to the directory it is within. JspC on the other had, treats the directory as a package hierarchy (which is great if your going to dump them into the classes directory and map them in your web.xml). It is apparent that JspC cannot be used to compile the JSP's into Tomcats work directory because of this package naming issue. -Mark Zabel, Ian wrote: Mark, I want my JSP's to get precompiled into the work directory of Tomcat and used from there, the exact same way that Tomcat does it. This way afterward, if the jsp is modified, tomcat can still recompile it. I have a class that you can use as part of a build or manually that will trigger tomcat to compile all the jsps, given a directory and a URL. It can easily be converted into an Ant task. I'll send you the source if you want. Basically, it reads in a directory, filters to find all the jsp names in it, and then iterates through them, and calls http://tomcatserver/path/jspname.jsp?jsp_precompile=true The jsp_precompile=true is understood by tomcat to mean: just compile the jsp, don't do anything else. This process effectively compiles every single jsp in your webapp, but must be done on a live tomcat server, not offline. You could then copy all of the generated jsp java classes from the work directory into a production tomcat server, and hopefully it would use them instead of recompiling. Let me know if you want it. Ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Is this possible to use Tomcat realms if...
Hi, ...If tomcat is running behind apache httpd? I just want to get rid of .htaccess files. Bests daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem: Tomcat server went down ...
Our Tomcat server just shut down by itself. It caused an application error( 0xc05 ) in Java.exe and shut down. Any ideas or directions about what could cause this ? Our platform is Apache 1.3.9, Tomcat 3.3, JDK 1.3, and FOP 0.20.4 running on NT servers. Well, I know this configuration is kinda old. Any info on how to dig out the problem is greatly appreciated. Bing - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem: Tomcat server went down ...
Howdy, Hmmm... Any information in the logs? Yoav Shapira Millennium ChemInformatics -Original Message- From: Bing Zhang [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 12:36 PM To: '[EMAIL PROTECTED]' Subject: Problem: Tomcat server went down ... Our Tomcat server just shut down by itself. It caused an application error( 0xc05 ) in Java.exe and shut down. Any ideas or directions about what could cause this ? Our platform is Apache 1.3.9, Tomcat 3.3, JDK 1.3, and FOP 0.20.4 running on NT servers. Well, I know this configuration is kinda old. Any info on how to dig out the problem is greatly appreciated. Bing - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Docs
The Apache Tomcat Bible from Wiley. -Original Message- From: Werner vd Merwe [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 5:27 AM To: Tomcat Users List Subject: Docs Good day, We are moving over from IIS to Jakarta, but my knowledge of the product is null. I googled around for help, but can not seem to find anything starting from scratch. Does anybody know of a good place to start teaching yourself the product? Need to define three separate sites from the main site. E.g. www.ourdomain.com/site1-site3 Many thanks Regards Werner vd Merwe SAICOM Cpt Linux user #322423 - 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: JVM tuning
Wouldn't AdaptiveSizePolicy help? (saves you the work of Java Heap usage analyzing :-) : I use this on my 2x proc machine. -XX:UseParallelGC -XX:+UseAdaptiveSizePolicy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 9:55 AM To: Tomcat Users List Subject: RE: JVM tuning Ah sorry I should really have said that I was focusing specifically on memory managment; general performance tuning is a completely different matter in which I do agree with you! On the memory front however I would stand by the fact that most tomcat webapps (big or small) would benefit from a change in the default JVM config. Anyway, have sorted out my problem now (by doing just that as well as a GC change) and performance is 10x better! cheers Pete Shapira, Yoav [EMAIL PROTECTED] 04/08/2003 14:45 Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: JVM tuning Howdy, Well not really; we know that we are running Tomcat, a web container which has its own (fixed) characteristics. It is a server side app which is processing non state based transactions which are thus highly like to involve a lot of objects being created and destroyed without too many hanging around for long; the details of the webapp, unless it is highly unusual, are likely not to matter particularly. This is a rule of thumb not an exact science and the vast majority of people who run Tomcat would benefit from running in such a configuration (or playing with it to see what the effects were) I disagree ;) Every time I've tuned a webapp for pay, both transactional and not, both full J2EE and just servlets/JSPs, the above has been false. The webapp's specific implementation matters far more (typically 3-4 orders of magnitude) than the container implementation, especially for a mature container which has been tuned repetitively and carefully over time. It's precisely because of this, and because as you say performance tuning is not a science, that a rule of thumb is as likely to hurt as it is to help if blindly applied. read Sun's own tuning documentation and you will see the default settings are not said to be suitable for the majority of server apps. I appreciate the pointer - I used to help write them ;) Good luck, however, as it's always YMMV with these things. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Securing Apache/Tomcat Communication
The way to do this is using stunnel. (From what I heard) I have never tried to do this but google might be helpful. -Tim Carl Walker wrote: Hi, Does anyone know if it's possible to secure the connection (AJP or otherwise) between Apache and Tomcat? I'm currently using mod_jk. I'm most interested in SSL (or other encryption) between the two rather than the JServ-style secret key mechanism. Thanks, Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Some questions
One thing: UPGRADE TOMCAT FAST! 44M isn't much memory, how much do you have available? -Original Message- From: Satish Talim [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 11:04 AM To: Tomcat Users List Subject: Some questions Hello, In our company, we are using Tomcat Version 4.0.1 and Java 2 SDK, Standard Edition Version 1.4.0 a. I read that if one uses 'catalina nonaming start' instead of 'startup', it would help disable the use of JNDI within Tomcat. (1) Is this feature available with Tomcat 4.0.1 ? (2) Does it mean that JNDI is enabled by default ? (3) Can it be disabled thro' say server.xml ? b. I also read that one can set up CATALINA_OPTS=-Xmx44M (1) Will this set the max memory size of 44 MB ? (2) Again, is this feature available with Tomcat 4.0.1 c. I read on the net that one can set the -server option in JDK 1.4... (1) Where does one setup this option? Is it in catalina.bat and how? Awaiting your reply. Regards, Satish Talim - 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]
connection pooling - user vs. username
A question regarding Tomcat connection pooling - according to the JNDI Datasource HOW-TO, the parameter for username should be placed in the ResourceParams section thusly: parameter nameusername/name value/value /parameter But I've also seen this parameter also called just user. According to the docs, Resource parameters are defined by name, and the precise set of parameter names supported depend upon the resource manager (or object factory) you are using - they must match the names of settable JavaBeans properties on the corresponding factory class. This would seem to say that it makes a difference whether user or username is used, but I've seen working examples where either user or username is used, and the same object factory is used. Which is it? I tried looking at the API and didn't find an answer - anyone? Thanks! -- Lynn Hollerman. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Debugging and Running as NT Service
Can someone explain how to configure a Tomcat server that is running as a Windows service to be debugable via dt_socket? Thank you John
RE: JVM tuning
Isnt the adaptive sizing only relevant to much larger memory configurations (Im running this JVM with a max heap of 1-1.5Gb? Pete Angus Mezick [EMAIL PROTECTED] 04/08/2003 17:51 Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: JVM tuning Wouldn't AdaptiveSizePolicy help? (saves you the work of Java Heap usage analyzing :-) : I use this on my 2x proc machine. -XX:UseParallelGC -XX:+UseAdaptiveSizePolicy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 9:55 AM To: Tomcat Users List Subject: RE: JVM tuning Ah sorry I should really have said that I was focusing specifically on memory managment; general performance tuning is a completely different matter in which I do agree with you! On the memory front however I would stand by the fact that most tomcat webapps (big or small) would benefit from a change in the default JVM config. Anyway, have sorted out my problem now (by doing just that as well as a GC change) and performance is 10x better! cheers Pete Shapira, Yoav [EMAIL PROTECTED] 04/08/2003 14:45 Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: JVM tuning Howdy, Well not really; we know that we are running Tomcat, a web container which has its own (fixed) characteristics. It is a server side app which is processing non state based transactions which are thus highly like to involve a lot of objects being created and destroyed without too many hanging around for long; the details of the webapp, unless it is highly unusual, are likely not to matter particularly. This is a rule of thumb not an exact science and the vast majority of people who run Tomcat would benefit from running in such a configuration (or playing with it to see what the effects were) I disagree ;) Every time I've tuned a webapp for pay, both transactional and not, both full J2EE and just servlets/JSPs, the above has been false. The webapp's specific implementation matters far more (typically 3-4 orders of magnitude) than the container implementation, especially for a mature container which has been tuned repetitively and carefully over time. It's precisely because of this, and because as you say performance tuning is not a science, that a rule of thumb is as likely to hurt as it is to help if blindly applied. read Sun's own tuning documentation and you will see the default settings are not said to be suitable for the majority of server apps. I appreciate the pointer - I used to help write them ;) Good luck, however, as it's always YMMV with these things. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Jvmroute and worker2.properties worker name
Does the name of the JvmRoute in server.xml have to equal the name of the host in worker2.properties when linking apache and tomcat to get proper session affinity? Angus Mezick GuideStar - Philanthropic Research Inc. 427 Scotland St. Williamsburg, Virginia 23185 PHONE: (757)299-4631 x35 FAX:(757)229-8912 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www.guidestar.org http://www.guidestar.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Connection Pooling HELP
I am trying to get connection pooling working with Tomcat 4.1.24-LE. Below is some relevant code. Tomcat starts up just fine. I have all my JAR files I need in the right place. If I create my own connection using JDBC it all works just fine. But using a connection pool is failing. The error message is after all the code. Thanks for any help Gregg Server.xml Context path=/DBTest docBase=DBTest debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_DBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. -- parameter namemaxActive/name value100/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. -- parameter namemaxIdle/name value30/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- MySQL dB username and password for dB connections -- parameter nameuser/name valuegdboling/value /parameter parameter namepassword/name valuebolinger/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter !-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default closes idle connections after 8 hours. -- parameter nameurl/name valuejdbc:mysql://localhost:3306/holocron?autoReconnect=true/value /parameter /ResourceParams /Context web.xml - only the important part resource-ref descriptionDB Connection/description res-ref-namejdbc/TestDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref AddReference.java try { Context ctx = new InitialContext(); if(ctx == null ) throw new Exception(Boom - No Context); DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/TestDB); if (ds != null) { Connection connection = ds.getConnection(); if(connection != null) { try { PreparedStatement stmt = connection.prepareStatement(INSERT INTO reference_table (Type, Title, Authors, Dates, Periodical, Volume, Issue, Pages, URL) VALUES (?,?,?,?,?,?,?,?,?)); stmt.setString(1, request.getParameter(TypeSelect)); stmt.setString(2, request.getParameter(TitleField)); stmt.setString(3, authorList); stmt.setString(4, request.getParameter(DateField)); stmt.setString(5, request.getParameter(PeriodicalField)); stmt.setString(6, request.getParameter(VolumeField)); stmt.setString(7, request.getParameter(IssueField)); stmt.setString(8, request.getParameter(PageField)); stmt.setString(9, request.getParameter(URLField)); stmt.executeUpdate(); stmt.close(); connection.close(); } catch(SQLException e) { e.printStackTrace(); } } } } catch(Exception e) { e.printStackTrace(); } And I get this
RE: JVM tuning
Ok, so if I set to 512M it isn't that effective? Would this be better in a 2xproc 512M heap environment: ConcurrentGC with ParNewGC (ParNewGC on Multi-CPU machines): -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 1:03 PM To: Tomcat Users List Subject: RE: JVM tuning Isnt the adaptive sizing only relevant to much larger memory configurations (Im running this JVM with a max heap of 1-1.5Gb? Pete Angus Mezick [EMAIL PROTECTED] 04/08/2003 17:51 Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: JVM tuning Wouldn't AdaptiveSizePolicy help? (saves you the work of Java Heap usage analyzing :-) : I use this on my 2x proc machine. -XX:UseParallelGC -XX:+UseAdaptiveSizePolicy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 9:55 AM To: Tomcat Users List Subject: RE: JVM tuning Ah sorry I should really have said that I was focusing specifically on memory managment; general performance tuning is a completely different matter in which I do agree with you! On the memory front however I would stand by the fact that most tomcat webapps (big or small) would benefit from a change in the default JVM config. Anyway, have sorted out my problem now (by doing just that as well as a GC change) and performance is 10x better! cheers Pete Shapira, Yoav [EMAIL PROTECTED] 04/08/2003 14:45 Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: JVM tuning Howdy, Well not really; we know that we are running Tomcat, a web container which has its own (fixed) characteristics. It is a server side app which is processing non state based transactions which are thus highly like to involve a lot of objects being created and destroyed without too many hanging around for long; the details of the webapp, unless it is highly unusual, are likely not to matter particularly. This is a rule of thumb not an exact science and the vast majority of people who run Tomcat would benefit from running in such a configuration (or playing with it to see what the effects were) I disagree ;) Every time I've tuned a webapp for pay, both transactional and not, both full J2EE and just servlets/JSPs, the above has been false. The webapp's specific implementation matters far more (typically 3-4 orders of magnitude) than the container implementation, especially for a mature container which has been tuned repetitively and carefully over time. It's precisely because of this, and because as you say performance tuning is not a science, that a rule of thumb is as likely to hurt as it is to help if blindly applied. read Sun's own tuning documentation and you will see the default settings are not said to be suitable for the majority of server apps. I appreciate the pointer - I used to help write them ;) Good luck, however, as it's always YMMV with these things. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
custom taglib problem
Hi I wrote some custom taglibs, but I get the following error: org.apache.jasper.JasperException: File /dodo not found I have the following configuration in my web.xml taglib taglib-uri/dodo/taglib-uri taglib-location/WEB-INF/jsp/csajsp.tld/taglib-location /taglib and I call it in my jsp file in the following way: %@ taglib uri=/dodo prefix=c % And still doesn't work I'm using jdk 1.4.2 and tomcat 4.1.24. Any clues, thanks. __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Causing a dump with a signal?
I remember reading where oen can send a kill signal with Unix that will cause the JVM to do a thread dump before exiting. Does this sound familiar to anyone? Ben Ricker Wellinx.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
custom taglib problem
Hi I wrote some custom taglibs, but I get the following error: org.apache.jasper.JasperException: File /dodo not found I have the following configuration in my web.xml taglib taglib-uri/dodo/taglib-uri taglib-location/WEB-INF/jsp/csajsp.tld/taglib-location /taglib and I call it in my jsp file in the following way: %@ taglib uri=/dodo prefix=c % And still doesn't work I'm using jdk 1.4.2 and tomcat 4.1.24. Any clues, thanks. __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Connection Pooling HELP
Gregg Bolinger wrote: I am trying to get connection pooling working with Tomcat 4.1.24-LE. Below is some relevant code. Tomcat starts up just fine. I have all my JAR files I need in the right place. If I create my own connection using JDBC it all works just fine. But using a connection pool is failing. The error message is after all the code. [...] And I get this error message javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceF actory.java:189) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3 01) at org.apache.naming.NamingContext.lookup(NamingContext.java:834) at org.apache.naming.NamingContext.lookup(NamingContext.java:181) at org.apache.naming.NamingContext.lookup(NamingContext.java:822) at org.apache.naming.NamingContext.lookup(NamingContext.java:181) at org.apache.naming.NamingContext.lookup(NamingContext.java:822) at org.apache.naming.NamingContext.lookup(NamingContext.java:181) at org.apache.naming.NamingContext.lookup(NamingContext.java:822) at org.apache.naming.NamingContext.lookup(NamingContext.java:194) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183) at javax.naming.InitialContext.lookup(InitialContext.java:347) at AddReference.processRequest(AddReference.java:65) at AddReference.doPost(AddReference.java:115) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) This may not help, but I have heard of this happening when some needed .jars were missing from CATALINA_HOME/common/lib - in particular, commons-dbcp.jar and commons-pool.jar. -- Lynn Hollerman. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Causing a dump with a signal?
Howdy, I remember reading where oen can send a kill signal with Unix that will cause the JVM to do a thread dump before exiting. Does this sound familiar to anyone? Send a CTRL-BREAK (SIGQUIT) to the JVM and it'll show you what it's doing ;) I've tried it on Solaris 8, Win 2000, without a problem. It's documented somewhere on the Java VM Options page. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Causing a dump with a signal?
kill -s 3 PID (Or very similar) -Tim Ben Ricker wrote: I remember reading where oen can send a kill signal with Unix that will cause the JVM to do a thread dump before exiting. Does this sound familiar to anyone? Ben Ricker Wellinx.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: RES: Cookie problem max age problem - Best practice to solve it
thanks, Steve. -Mensagem original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 4 de agosto de 2003 11:52 Para: 'Tomcat Users List' Assunto: Re: RES: Cookie problem max age problem - Best practice to solve it one information isnt right! First, using Sniffer to monitor all http traffic, i found out one important news: the authentication app's plugin works with Session object instead of Cookie object. What kind of information would you like to receive about it? Does Session object work different between OC4J and TomCat? Then you're in trouble. Session objects live within the memory of the JVM process where the servlet container is running. You aren't going to be able to share them between two different processes. Even within a single container, there are still limitations on sharing Session data; you can't share from one context to another. (See 7.3 Session Scope in the servlet specification). -- Steve - 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: Connection Pooling HELP
You might be right. I don't have the commons-dbpc.jar file. Why isn't this included with the Binary release of Tomcat and where can I get it? I can't find it with all the other Commons downloads. Thanks Gregg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 12:40 PM To: Tomcat Users List Subject: Re: Connection Pooling HELP Gregg Bolinger wrote: I am trying to get connection pooling working with Tomcat 4.1.24-LE. Below is some relevant code. Tomcat starts up just fine. I have all my JAR files I need in the right place. If I create my own connection using JDBC it all works just fine. But using a connection pool is failing. The error message is after all the code. [...] And I get this error message javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceF actory.java:189) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3 01) at org.apache.naming.NamingContext.lookup(NamingContext.java:834) at org.apache.naming.NamingContext.lookup(NamingContext.java:181) at org.apache.naming.NamingContext.lookup(NamingContext.java:822) at org.apache.naming.NamingContext.lookup(NamingContext.java:181) at org.apache.naming.NamingContext.lookup(NamingContext.java:822) at org.apache.naming.NamingContext.lookup(NamingContext.java:181) at org.apache.naming.NamingContext.lookup(NamingContext.java:822) at org.apache.naming.NamingContext.lookup(NamingContext.java:194) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183) at javax.naming.InitialContext.lookup(InitialContext.java:347) at AddReference.processRequest(AddReference.java:65) at AddReference.doPost(AddReference.java:115) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) This may not help, but I have heard of this happening when some needed .jars were missing from CATALINA_HOME/common/lib - in particular, commons-dbcp.jar and commons-pool.jar. -- Lynn Hollerman. - 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: custom taglib problem
I thought I saw a bug report similar to this that had to do something with jdk1.4.2. Try using 1.4.1 or lower and see what happens. -Tim Jesús Antonio Sánchez A. wrote: Hi I wrote some custom taglibs, but I get the following error: org.apache.jasper.JasperException: File /dodo not found I have the following configuration in my web.xml taglib taglib-uri/dodo/taglib-uri taglib-location/WEB-INF/jsp/csajsp.tld/taglib-location /taglib and I call it in my jsp file in the following way: %@ taglib uri=/dodo prefix=c % And still doesn't work I'm using jdk 1.4.2 and tomcat 4.1.24. Any clues, thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: custom taglib problem
I'll do that, thanks --- Tim Funk [EMAIL PROTECTED] wrote: I thought I saw a bug report similar to this that had to do something with jdk1.4.2. Try using 1.4.1 or lower and see what happens. -Tim Jesús Antonio Sánchez A. wrote: Hi I wrote some custom taglibs, but I get the following error: org.apache.jasper.JasperException: File /dodo not found I have the following configuration in my web.xml taglib taglib-uri/dodo/taglib-uri taglib-location/WEB-INF/jsp/csajsp.tld/taglib-location /taglib and I call it in my jsp file in the following way: %@ taglib uri=/dodo prefix=c % And still doesn't work I'm using jdk 1.4.2 and tomcat 4.1.24. Any clues, thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Connection Pooling HELP
I found out you also need the commom-pool.jar file also. Why does Tomcat provide Connection Pooling but doesn't distribute all necessary files to do so with the Binary release? These 2 jar files are not specific to the database, so you would think Tomcat would come with them. Not to mention Tomcats docs don't mention the fact that you need to download them. G! Gregg -Original Message- From: Gregg Bolinger [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 12:45 PM To: 'Tomcat Users List'; 'Tomcat Users List' Subject: RE: Connection Pooling HELP You might be right. I don't have the commons-dbpc.jar file. Why isn't this included with the Binary release of Tomcat and where can I get it? I can't find it with all the other Commons downloads. Thanks Gregg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 12:40 PM To: Tomcat Users List Subject: Re: Connection Pooling HELP Gregg Bolinger wrote: I am trying to get connection pooling working with Tomcat 4.1.24-LE. Below is some relevant code. Tomcat starts up just fine. I have all my JAR files I need in the right place. If I create my own connection using JDBC it all works just fine. But using a connection pool is failing. The error message is after all the code. [...] And I get this error message javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceF actory.java:189) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3 01) at org.apache.naming.NamingContext.lookup(NamingContext.java:834) at org.apache.naming.NamingContext.lookup(NamingContext.java:181) at org.apache.naming.NamingContext.lookup(NamingContext.java:822) at org.apache.naming.NamingContext.lookup(NamingContext.java:181) at org.apache.naming.NamingContext.lookup(NamingContext.java:822) at org.apache.naming.NamingContext.lookup(NamingContext.java:181) at org.apache.naming.NamingContext.lookup(NamingContext.java:822) at org.apache.naming.NamingContext.lookup(NamingContext.java:194) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183) at javax.naming.InitialContext.lookup(InitialContext.java:347) at AddReference.processRequest(AddReference.java:65) at AddReference.doPost(AddReference.java:115) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) This may not help, but I have heard of this happening when some needed .jars were missing from CATALINA_HOME/common/lib - in particular, commons-dbcp.jar and commons-pool.jar. -- Lynn Hollerman. - 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]
Singleton and Reloadable Contexts.
Hello All! Our team here has written a simple Connection Pool class that is a singleton. I've noticed that whenever Tomcat reloads my webapps context (when I add a new class or something like that), that it the next call to the Connection Pool get instance method doesn't see the previous singleton, and hence, it allocates a bunch of new connections. This would be fine, except that the old connections are never closed (it seems that the Garbage Collector doesn't eat them up) so I think that the old instance of the singleton is still floating around in the JVM somewhere. This causes all the free sessions on the Database to be eaten up, forcing a restart of tomcat. Once tomcat is restarted, all the connections are closed out (since the JVM terminated, I guess) and things are fine again. What do I need to do so that the old connections are removed? This is on Tomcat 3.3.1a. Here is the relevent code of the Singleton getInstance method: public static synchronized ConnectionPool getInstance(ConnectionPoolConstants c) throws SQLException { constants = c; if (instance == null) { // Determine which database url to connect db_url = constants.getTestDBURL(); String line = ; try { Vector return_vec = DelphiRuntime.execCommandWithOut(hostname); Enumeration return_enum = return_vec.elements(); while (return_enum.hasMoreElements()) { line = (String) return_enum.nextElement(); } } catch (InterruptedException ire) { } catch (IOException ioe) { } if (line.equals(constants.getProductionServerHostname())) { db_url = constants.getProductionDBURL(); } instance = new ConnectionPool(); } return instance; } Thanks for any insights! Cheers! __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Connection Pooling HELP
Simple solution, don't use the LE version. Use the full version. Your problems will disappear. -Original Message- From: Gregg Bolinger [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 2:07 PM To: 'Tomcat Users List' Subject: RE: Connection Pooling HELP I found out you also need the commom-pool.jar file also. Why does Tomcat provide Connection Pooling but doesn't distribute all necessary files to do so with the Binary release? These 2 jar files are not specific to the database, so you would think Tomcat would come with them. Not to mention Tomcats docs don't mention the fact that you need to download them. G! Gregg -Original Message- From: Gregg Bolinger [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 12:45 PM To: 'Tomcat Users List'; 'Tomcat Users List' Subject: RE: Connection Pooling HELP You might be right. I don't have the commons-dbpc.jar file. Why isn't this included with the Binary release of Tomcat and where can I get it? I can't find it with all the other Commons downloads. Thanks Gregg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 12:40 PM To: Tomcat Users List Subject: Re: Connection Pooling HELP Gregg Bolinger wrote: I am trying to get connection pooling working with Tomcat 4.1.24-LE. Below is some relevant code. Tomcat starts up just fine. I have all my JAR files I need in the right place. If I create my own connection using JDBC it all works just fine. But using a connection pool is failing. The error message is after all the code. [...] And I get this error message javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceF actory.java:189) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3 01) at org.apache.naming.NamingContext.lookup(NamingContext.java:834) at org.apache.naming.NamingContext.lookup(NamingContext.java:181) at org.apache.naming.NamingContext.lookup(NamingContext.java:822) at org.apache.naming.NamingContext.lookup(NamingContext.java:181) at org.apache.naming.NamingContext.lookup(NamingContext.java:822) at org.apache.naming.NamingContext.lookup(NamingContext.java:181) at org.apache.naming.NamingContext.lookup(NamingContext.java:822) at org.apache.naming.NamingContext.lookup(NamingContext.java:194) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183) at javax.naming.InitialContext.lookup(InitialContext.java:347) at AddReference.processRequest(AddReference.java:65) at AddReference.doPost(AddReference.java:115) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) This may not help, but I have heard of this happening when some needed .jars were missing from CATALINA_HOME/common/lib - in particular, commons-dbcp.jar and commons-pool.jar. -- Lynn Hollerman. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Connection Pooling HELP
Thanks. But if this is the case, the download documentation might need some updating. The documentation used to specify that if you have JDK 1.4.x you only needed the LE version. It said nothing about commons jar files. And now, I can't find anything anywhere that specifies which one you should get. But thanks for the heads-up. ;) Gregg -Original Message- From: Angus Mezick [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 1:18 PM To: Tomcat Users List Subject: RE: Connection Pooling HELP Simple solution, don't use the LE version. Use the full version. Your problems will disappear. -Original Message- From: Gregg Bolinger [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 2:07 PM To: 'Tomcat Users List' Subject: RE: Connection Pooling HELP I found out you also need the commom-pool.jar file also. Why does Tomcat provide Connection Pooling but doesn't distribute all necessary files to do so with the Binary release? These 2 jar files are not specific to the database, so you would think Tomcat would come with them. Not to mention Tomcats docs don't mention the fact that you need to download them. G! Gregg -Original Message- From: Gregg Bolinger [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 12:45 PM To: 'Tomcat Users List'; 'Tomcat Users List' Subject: RE: Connection Pooling HELP You might be right. I don't have the commons-dbpc.jar file. Why isn't this included with the Binary release of Tomcat and where can I get it? I can't find it with all the other Commons downloads. Thanks Gregg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 12:40 PM To: Tomcat Users List Subject: Re: Connection Pooling HELP Gregg Bolinger wrote: I am trying to get connection pooling working with Tomcat 4.1.24-LE. Below is some relevant code. Tomcat starts up just fine. I have all my JAR files I need in the right place. If I create my own connection using JDBC it all works just fine. But using a connection pool is failing. The error message is after all the code. [...] And I get this error message javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceF actory.java:189) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3 01) at org.apache.naming.NamingContext.lookup(NamingContext.java:834) at org.apache.naming.NamingContext.lookup(NamingContext.java:181) at org.apache.naming.NamingContext.lookup(NamingContext.java:822) at org.apache.naming.NamingContext.lookup(NamingContext.java:181) at org.apache.naming.NamingContext.lookup(NamingContext.java:822) at org.apache.naming.NamingContext.lookup(NamingContext.java:181) at org.apache.naming.NamingContext.lookup(NamingContext.java:822) at org.apache.naming.NamingContext.lookup(NamingContext.java:194) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183) at javax.naming.InitialContext.lookup(InitialContext.java:347) at AddReference.processRequest(AddReference.java:65) at AddReference.doPost(AddReference.java:115) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) This may not help, but I have heard of this happening when some needed .jars were missing from CATALINA_HOME/common/lib - in particular, commons-dbcp.jar and commons-pool.jar. -- Lynn Hollerman. - 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] - 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: Singleton and Reloadable Contexts.
A singleton is only a singleton to the classloader it lives in. A webapp is loaded in its own classloader, so when it is start/stopped or reloaded - a new classloader is made. And so is a brand new set of singletons. The easy workaround is to create a ServletContextListener which listens for the webapp to be stopped. At that time - your can free the pool. But I don't recall if ServletContextListener is available in the 2.2 servletapi. -Tim Matt E wrote: Hello All! Our team here has written a simple Connection Pool class that is a singleton. I've noticed that whenever Tomcat reloads my webapps context (when I add a new class or something like that), that it the next call to the Connection Pool get instance method doesn't see the previous singleton, and hence, it allocates a bunch of new connections. This would be fine, except that the old connections are never closed (it seems that the Garbage Collector doesn't eat them up) so I think that the old instance of the singleton is still floating around in the JVM somewhere. This causes all the free sessions on the Database to be eaten up, forcing a restart of tomcat. Once tomcat is restarted, all the connections are closed out (since the JVM terminated, I guess) and things are fine again. What do I need to do so that the old connections are removed? This is on Tomcat 3.3.1a. Here is the relevent code of the Singleton getInstance method: public static synchronized ConnectionPool getInstance(ConnectionPoolConstants c) throws SQLException { constants = c; if (instance == null) { // Determine which database url to connect db_url = constants.getTestDBURL(); String line = ; try { Vector return_vec = DelphiRuntime.execCommandWithOut(hostname); Enumeration return_enum = return_vec.elements(); while (return_enum.hasMoreElements()) { line = (String) return_enum.nextElement(); } } catch (InterruptedException ire) { } catch (IOException ioe) { } if (line.equals(constants.getProductionServerHostname())) { db_url = constants.getProductionDBURL(); } instance = new ConnectionPool(); } return instance; } Thanks for any insights! Cheers! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Faking ServletContextListener with Tomcat 3.3.1a? [Was: Singleton and Reloadable Contexts.]
After looking through the archives more (why is it that you always find something after you've asked.) I found this message: http://mikal.org/interests/java/tomcat/archive/view?mesg=51529 That's exactly what I want to do. However the server is running Tomcat 3.3.1a. Short of updating the server, is there anyway to fake the contextInitialized() and contextDestoryed() methods in the Older Tomcat? Cheers, Matt G. Ellis --- Matt E [EMAIL PROTECTED] wrote: Hello All! Our team here has written a simple Connection Pool class that is a singleton. I've noticed that whenever Tomcat reloads my webapps context (when I add a new class or something like that), that it the next call to the Connection Pool get instance method doesn't see the previous singleton, and hence, it allocates a bunch of new connections. This would be fine, except that the old connections are never closed (it seems that the Garbage Collector doesn't eat them up) so I think that the old instance of the singleton is still floating around in the JVM somewhere. This causes all the free sessions on the Database to be eaten up, forcing a restart of tomcat. Once tomcat is restarted, all the connections are closed out (since the JVM terminated, I guess) and things are fine again. What do I need to do so that the old connections are removed? This is on Tomcat 3.3.1a. Here is the relevent code of the Singleton getInstance method: public static synchronized ConnectionPool getInstance(ConnectionPoolConstants c) throws SQLException { constants = c; if (instance == null) { // Determine which database url to connect db_url = constants.getTestDBURL(); String line = ; try { Vector return_vec = DelphiRuntime.execCommandWithOut(hostname); Enumeration return_enum = return_vec.elements(); while (return_enum.hasMoreElements()) { line = (String) return_enum.nextElement(); } } catch (InterruptedException ire) { } catch (IOException ioe) { } if (line.equals(constants.getProductionServerHostname())) { db_url = constants.getProductionDBURL(); } instance = new ConnectionPool(); } return instance; } Thanks for any insights! Cheers! __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
request/session handling
Hi, can anyone tell me what happens if a user requests a servlet which might take 5 seconds to complete the request, and the user starts hitting reload a number of times? (I know the typical programming answer is 'why?! why would the user do such a thing?' but I am afraid I'm gonna have to give a better answer than that). Will the already running requests be aborted, will they complete, which output from which completed request will make it back to the user? I am asking because it appears the servlet can handle two requests 'simultanously' from the same user, which means I have to synchronize on objects in this users session, even if there is only one user using the application. Hope anyone can help. greetz Hans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: request/session handling
All requests will keep executing. The user should get the last result. Hitting reload forces the browser to drop its connection and open another one to the server I think. The server doesn't know the connection has gone AWOL until it tries to send data to the client. --Angus -Original Message- From: Hans Wichman [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 2:42 PM To: [EMAIL PROTECTED] Subject: request/session handling Hi, can anyone tell me what happens if a user requests a servlet which might take 5 seconds to complete the request, and the user starts hitting reload a number of times? (I know the typical programming answer is 'why?! why would the user do such a thing?' but I am afraid I'm gonna have to give a better answer than that). Will the already running requests be aborted, will they complete, which output from which completed request will make it back to the user? I am asking because it appears the servlet can handle two requests 'simultanously' from the same user, which means I have to synchronize on objects in this users session, even if there is only one user using the application. Hope anyone can help. greetz Hans - 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]
Nimda attack on Tomcat
Hello, Thanks everyone for help on the Tomcat with Virtual Hosting thread. After analyzing the log files it seems that there was a Nimda worm attack on the Tomcat webserver. Does any one have a fix for this? Any help would be highly appreciated. Thanks. -abhinav - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Persistent Sessions
Hi Yoav, Thank you for you suggestion, I have it implemented and seem to be having some problem with it. Below is the code I have in my listener. I have collection of Session Objects and I am adding an removing the Sessions from the collection as required but, when I get to my contextDestroyed method and try to invalidate all the remaining session , I get the message listed below in log. Thanks for all your help. Kal Log: SessionListener: --Invalidating all exisiting Session! SessionListener: Removing session : null Code for Listener: public void sessionCreated(HttpSessionEvent event) { sessions.add(event.getSession()); log(sessionCreated(' + event.getSession().getId() + ')); Iterator i = sessions.iterator(); log(---Collection Contains---); while ( i.hasNext() ){ log (((HttpSession)i.next()).getId()); } } public void sessionDestroyed(HttpSessionEvent event) { sessions.remove(event.getSession()); log(sessionDestroyed(' + event.getSession().getId() + ')); Iterator i = sessions.iterator(); log(---Collection Contains---); while ( i.hasNext() ){ log (((HttpSession)i.next()).getId()); } } public void contextInitialized(ServletContextEvent event) { this.context = event.getServletContext(); log(contextInitialized()); } public void contextDestroyed(ServletContextEvent event) { log(--Invalidating all exisiting Session!); Iterator i = this.sessions.iterator(); while (i.hasNext()){ HttpSession s = (HttpSession)i.next(); log(Removing session : + s.getId()); s.invalidate(); } log(contextDestroyed()); this.context = null; } -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 11:13 AM To: Tomcat Users List Subject: RE: Persistent Sessions Howdy, Consider a container-independent approach instead: write an HttpSessionListener that's also a ServletContextListener. Have it keep a static list of HttpSession objects, adding the session to the list on its creation and removing on its destruction. Then, have the contextDestroyed method go through the list and invalidate all the remaining sessions. Yoav Shapira Millennium ChemInformatics -Original Message- From: Kal Govindu [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 11:09 AM To: Tomcat Users List (E-mail) Subject: Persistent Sessions I am trying to clean-up ( invalidate ) all the session when Tomcat is restarted for any reason. I have the following Tag in my server.xml. The session created for my web application still seem to persist, is there another place or way the session is being store or persisted? Please help, thanks in advance. Kal Manager className=org.apache.catalina.session.PersistentManager debug=0 saveOnRestart=false maxActiveSessions=-1 minIdleSwap=-1 maxIdleSwap=-1 maxIdleBackup=-1 Store className=org.apache.catalina.session.FileStore/ /Manager - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Nimda attack on Tomcat
Howdy, How did you reach this conclusion? Do you have an IIS front-end or are you running tomcat stand-alone? Yoav Shapira Millennium ChemInformatics -Original Message- From: Abhinav Gautam [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 3:22 PM To: [EMAIL PROTECTED] Subject: Nimda attack on Tomcat Hello, Thanks everyone for help on the Tomcat with Virtual Hosting thread. After analyzing the log files it seems that there was a Nimda worm attack on the Tomcat webserver. Does any one have a fix for this? Any help would be highly appreciated. Thanks. -abhinav - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]