newbei
Hello all, I am getting a error message as follows 2005-03-03 14:26:51 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:27:25 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:27:30 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:17 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:30 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:33 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:34 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:36 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:36 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:36 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:37 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:30:30 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:35:08 StandardWrapperValve[action]: Servlet action is currently unavailable I am trying to execute a small struts example given in Mastering tomcat developement by Perter Harrison. /ListDepartmentsAction**/ package action; import bean.Dept; import org.apache.struts.action.*; import javax.servlet.http.*; public class ListDepartmentsAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response) throws Exception{ request.setAttribute(departments,Dept.getDepartments()); return mapping.findForward(listing); } } My jsp %@ taglib uri=logic prefix=logic% %@ taglib uri=bean prefix=bean% html body bgcolor=yellow table logic:iterate id=dept name=departments trtdbean:write name=dept /Herro/td/tr /logic:iterate / body /html Any help in this regard will be greatly helpful.. thanks -- --- VTR Ravi Kumar, Sr.Engineer,ITX, BHEL, Hardwar - 249403, India Fax no. 0091-1334 - 223948, Ph. No. 0091-1334-285260 / 285405 --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: newbei
You put the struts.jar and related files in WEB-INF\lib directory of your application ?. Added mapping in web.xml for ActionServlet ?. Better you you use Struts blank application which is bundled with Struts download. rgds Antony Paul On Thu, 03 Mar 2005 14:43:46 +0530, VTR Ravi Kumar [EMAIL PROTECTED] wrote: Hello all, I am getting a error message as follows 2005-03-03 14:26:51 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:27:25 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:27:30 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:17 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:30 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:33 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:34 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:36 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:36 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:36 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:37 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:30:30 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:35:08 StandardWrapperValve[action]: Servlet action is currently unavailable I am trying to execute a small struts example given in Mastering tomcat developement by Perter Harrison. /ListDepartmentsAction**/ package action; import bean.Dept; import org.apache.struts.action.*; import javax.servlet.http.*; public class ListDepartmentsAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response) throws Exception{ request.setAttribute(departments,Dept.getDepartments()); return mapping.findForward(listing); } } My jsp %@ taglib uri=logic prefix=logic% %@ taglib uri=bean prefix=bean% html body bgcolor=yellow table logic:iterate id=dept name=departments trtdbean:write name=dept /Herro/td/tr /logic:iterate / body /html Any help in this regard will be greatly helpful.. thanks -- --- VTR Ravi Kumar, Sr.Engineer,ITX, BHEL, Hardwar - 249403, India Fax no. 0091-1334 - 223948, Ph. No. 0091-1334-285260 / 285405 --- - 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]
OutOfMemory / JMeter / Profiler questions
Hello Tomcat'oids! We've started performance testing one of our REMOTE web apps using JMeter. We're gathering benchmark data before doing further fine tuning. Details: Win2K only have ssh + cygwin access to this remote server JDK 1.4.1_03 Tomcat 4.1.26, running as a service: a.. Use security manager 1 b.. Security policy file D:\Tomcat4\conf\catalina.policy c.. Initial heap 256 d.. Max heap 512 e.. Stack size 256 f.. JVM server Issue: We are getting OutOfMemory errors with very few threads simulated (as low as 5). More problematic, we've seen the OOM just after a Tomcat service restart! From the stack trace below, you can see we get the OOM before any of our code is executed :( Questions: a.. Anyone has seen this behavior upon Tomcat start up? b.. Anything particular to watch for in our JMeter test plan? c.. Would a profiler help? Could it profile a remote Tomcat installation? Any +/- feedback on Eclipse Profiler plug in (http://eclipsecolorer.sourceforge.net/index_profiler.html)? We'll work on gathering more data (e.g. periodic free / allocated memory dumps). Untill then, thank you for sharing your experiences, suggestions, code,...! Cheers, Guillaume javax.servlet.ServletException: Servlet execution threw an exception at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:536) root cause java.lang.OutOfMemoryError
mod_jk2 Error
Hi, (B (BI got these following messages from mod_jk2. (BOf course I searched on the web to analyze the messages, (Bbut still have no idea (Bwhether we can ignore these messages. (BI would appreciate it if you could tell me the meaning of (Bthe cause of these messages. (B (Bthe Apache error_log file is as following; (B[Tue Mar 01 02:30:59 2005] [error] channelApr.open() (Battempt to connect to (B127.0.0.1:8009 (localhost) failed 111 (B[Tue Mar 01 02:30:59 2005] [error] ajp13.connect() failed (Bajp13:wtsap02:8009 (B[Tue Mar 01 02:30:59 2005] [error] ajp13.service() failed (Bto connect (Bendpoint errno=9 Bad file descriptor (B[Tue Mar 01 02:30:59 2005] [error] ajp13.service() Error (Bforwarding (Bajp13:wtsap02:8009 1 1 (B[Tue Mar 01 02:30:59 2005] [error] mod_jk2.handler() Error (Bconnecting to (Btomcat 12, status 0 (B (BServer construction is as following; (B Firewall: NetScreen (B (BDispatcher(software loadbalancer):RS6000+Dispatcher(IBM) (B (BWEB+App Server x2 (B RedHat Enterprise Linux ES Standard Plus ver3.0 (B JBoss 3.2.3 and Apache 2.0.50, mod_jk2 plug-in to use (Bjsp and servlet on JBoss. (B (BDatabase Server (B RedHat Enterprise Linux ES Standard Plus ver3.0 (B MySQL4.0.20 (B (BThanks, (BToshio (B (B (B__ (BLet's Celebrate Together! (BYahoo! JAPAN (Bhttp://pr.mail.yahoo.co.jp/so2005/ (B (B (B- (BTo unsubscribe, e-mail: [EMAIL PROTECTED] (BFor additional commands, e-mail: [EMAIL PROTECTED]
Tomcat and JRockit
Hi, Just wondering if there is some documentation w regards to what/which virtual machines tomcat (5.0.x) has been tested on (ie does it work with BEA Jrockit and if so what version) ? Failing this, does anyone know if tomcat 5.0.25 does work (or there are issues) with Jrockit SDK 1.4.2 (which appears to be the same as 7.0) as featured here http://dev2dev.bea.com/products/wljrockit70/index.jsp Thanks Michael -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.6.0 - Release Date: 02/03/2005
RE: Tomcat and JRockit
Hi, I've run Tomcat 5.0.x without any trouble on whichever JRockit runs Java 1.4 Cheers, Ali. -Original Message- From: Michael Cornell [mailto:[EMAIL PROTECTED] Sent: 03 March 2005 10:27 To: Tomcat Users List Subject: Tomcat and JRockit Hi, Just wondering if there is some documentation w regards to what/which virtual machines tomcat (5.0.x) has been tested on (ie does it work with BEA Jrockit and if so what version) ? Failing this, does anyone know if tomcat 5.0.25 does work (or there are issues) with Jrockit SDK 1.4.2 (which appears to be the same as 7.0) as featured here http://dev2dev.bea.com/products/wljrockit70/index.jsp Thanks Michael -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.6.0 - Release Date: 02/03/2005 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: newbei
Yes I have put struts.jar in the WEB-INF\lib and also added the mapping for action in web.xml I had downloaded the jakarta-struts-1.2.4-lib.tar.gz but it did not contain any blank application as you have mentioned. Please tell me where i can find the blank application vtr Antony Paul wrote: You put the struts.jar and related files in WEB-INF\lib directory of your application ?. Added mapping in web.xml for ActionServlet ?. Better you you use Struts blank application which is bundled with Struts download. rgds Antony Paul On Thu, 03 Mar 2005 14:43:46 +0530, VTR Ravi Kumar [EMAIL PROTECTED] wrote: Hello all, I am getting a error message as follows 2005-03-03 14:26:51 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:27:25 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:27:30 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:17 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:30 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:33 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:34 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:36 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:36 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:36 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:37 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:30:30 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:35:08 StandardWrapperValve[action]: Servlet action is currently unavailable I am trying to execute a small struts example given in Mastering tomcat developement by Perter Harrison. /ListDepartmentsAction**/ package action; import bean.Dept; import org.apache.struts.action.*; import javax.servlet.http.*; public class ListDepartmentsAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response) throws Exception{ request.setAttribute(departments,Dept.getDepartments()); return mapping.findForward(listing); } } My jsp %@ taglib uri=logic prefix=logic% %@ taglib uri=bean prefix=bean% html body bgcolor=yellow table logic:iterate id=dept name=departments trtdbean:write name=dept /Herro/td/tr /logic:iterate / body /html Any help in this regard will be greatly helpful.. thanks -- --- VTR Ravi Kumar, Sr.Engineer,ITX, BHEL, Hardwar - 249403, India Fax no. 0091-1334 - 223948, Ph. No. 0091-1334-285260 / 285405 --- - 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] -- --- VTR Ravi Kumar, Sr.Engineer,ITX, BHEL, Hardwar - 249403, India Fax no. 0091-1334 - 223948, Ph. No. 0091-1334-285260 / 285405 --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat and JRockit
I've run Tomcat 5.0.x and 5.5.x on the 1.5 version of JRockit however it is worth noting that it breaks anything using CGLIB e.g. Hibernate so use with care. Apart from that though, I have found it to run very nicely. PJ Allistair Crossley wrote: Hi, I've run Tomcat 5.0.x without any trouble on whichever JRockit runs Java 1.4 Cheers, Ali. -Original Message- From: Michael Cornell [mailto:[EMAIL PROTECTED] Sent: 03 March 2005 10:27 To: Tomcat Users List Subject: Tomcat and JRockit Hi, Just wondering if there is some documentation w regards to what/which virtual machines tomcat (5.0.x) has been tested on (ie does it work with BEA Jrockit and if so what version) ? Failing this, does anyone know if tomcat 5.0.25 does work (or there are issues) with Jrockit SDK 1.4.2 (which appears to be the same as 7.0) as featured here http://dev2dev.bea.com/products/wljrockit70/index.jsp Thanks Michael -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.6.0 - Release Date: 02/03/2005 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: OutOfMemory / JMeter / Profiler questions
We've started performance testing one of our REMOTE web apps using JMeter. We're gathering benchmark data before doing further fine tuning. Details: Win2K only have ssh + cygwin access to this remote server JDK 1.4.1_03 Tomcat 4.1.26, running as a service: a.. Use security manager 1 b.. Security policy file D:\Tomcat4\conf\catalina.policy c.. Initial heap 256 d.. Max heap 512 e.. Stack size 256 f.. JVM server I cannot help you with respect to your OOM problems, but I would recommend that you consider upgrading to JVM 1.4.2. You should also be able to migrate your app to TC 5.0.28 without too much grief. You should probably avoid TC 5.5.x for the meantime. JVM 1.4.2 and TC 5.0.28 play well together. Good luck in case! Harry Mantheakis London, UK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: newbei
You have to download the first file(jakarta-struts-1.2.4.zip) which contains docs and examples. rgds Antony Paul On Thu, 03 Mar 2005 16:08:06 +0530, VTR Ravi Kumar [EMAIL PROTECTED] wrote: Yes I have put struts.jar in the WEB-INF\lib and also added the mapping for action in web.xml I had downloaded the jakarta-struts-1.2.4-lib.tar.gz but it did not contain any blank application as you have mentioned. Please tell me where i can find the blank application vtr Antony Paul wrote: You put the struts.jar and related files in WEB-INF\lib directory of your application ?. Added mapping in web.xml for ActionServlet ?. Better you you use Struts blank application which is bundled with Struts download. rgds Antony Paul On Thu, 03 Mar 2005 14:43:46 +0530, VTR Ravi Kumar [EMAIL PROTECTED] wrote: Hello all, I am getting a error message as follows 2005-03-03 14:26:51 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:27:25 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:27:30 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:17 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:30 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:33 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:34 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:36 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:36 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:36 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:28:37 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:30:30 StandardWrapperValve[action]: Servlet action is currently unavailable 2005-03-03 14:35:08 StandardWrapperValve[action]: Servlet action is currently unavailable I am trying to execute a small struts example given in Mastering tomcat developement by Perter Harrison. /ListDepartmentsAction**/ package action; import bean.Dept; import org.apache.struts.action.*; import javax.servlet.http.*; public class ListDepartmentsAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response) throws Exception{ request.setAttribute(departments,Dept.getDepartments()); return mapping.findForward(listing); } } My jsp %@ taglib uri=logic prefix=logic% %@ taglib uri=bean prefix=bean% html body bgcolor=yellow table logic:iterate id=dept name=departments trtdbean:write name=dept /Herro/td/tr /logic:iterate / body /html Any help in this regard will be greatly helpful.. thanks -- --- VTR Ravi Kumar, Sr.Engineer,ITX, BHEL, Hardwar - 249403, India Fax no. 0091-1334 - 223948, Ph. No. 0091-1334-285260 / 285405 --- - 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] -- --- VTR Ravi Kumar, Sr.Engineer,ITX, BHEL, Hardwar - 249403, India Fax no. 0091-1334 - 223948, Ph. No. 0091-1334-285260 / 285405 --- - 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]
Equivalent of Resin run-at servlet configuration
Hello, I am developing a Java web application, and one of the requirements is to run a particular servlet periodically, or even at specified times. Resin provides this ability via its run-at configuration element for servlets in web.xml Example Resin configuration: servlet servlet-namedownload/servlet-name servlet-classDownloadNewsServlet/servlet-class run-at period='360m'/ /servlet However, I haven't found an equivalent configuration for Tomcat. I searched the web and was unsuccessful. So, any pointers as to how I could achieve this for Tomcat would be appreciated. Thanks, Subbu. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Equivalent of Resin run-at servlet configuration
AFAIK Tomcat dont provide a replacement for this. It is not in Servlet spec. Search in archives as it was asked a few weeks before. rgds Antony Paul On Thu, 3 Mar 2005 16:45:24 +0530 (IST), Subramanya Sastry [EMAIL PROTECTED] wrote: Hello, I am developing a Java web application, and one of the requirements is to run a particular servlet periodically, or even at specified times. Resin provides this ability via its run-at configuration element for servlets in web.xml Example Resin configuration: servlet servlet-namedownload/servlet-name servlet-classDownloadNewsServlet/servlet-class run-at period='360m'/ /servlet However, I haven't found an equivalent configuration for Tomcat. I searched the web and was unsuccessful. So, any pointers as to how I could achieve this for Tomcat would be appreciated. Thanks, Subbu. - 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: OutOfMemory / JMeter / Profiler questions
You probably have either very large or very many sessions which Tomcat is attempting to reload on startup. Tomcat serialises sessions into files called SESSIONS.ser (in the application directories under the work dir) and then when it is restarted it attempts to reload them all. I presume this behaviour can be turned off. In terms of testing your app, you want to figure out whether you have a memory leak issue with your app, or simply that your max heap size is set too low for the load you are running. To check for memory leaks, you could run jmeter reasonably (although not too hard) excercising as much of your app as you can, repetitively and for an extended period. If it eventually keels over then you may need to investigate memory leaks with a profiler. Another possibility is that you may not be invalidating sessions and they are just being left to expire naturally. This can use up a lot of memory if you aren't careful and I supect is a quite likely source of your problems. Cheers! -Original Message- From: Guillaume Lahitette [mailto:[EMAIL PROTECTED] Sent: 03 March 2005 09:51 To: tomcat-user@jakarta.apache.org Subject: OutOfMemory / JMeter / Profiler questions Hello Tomcat'oids! We've started performance testing one of our REMOTE web apps using JMeter. We're gathering benchmark data before doing further fine tuning. Details: Win2K only have ssh + cygwin access to this remote server JDK 1.4.1_03 Tomcat 4.1.26, running as a service: a.. Use security manager 1 b.. Security policy file D:\Tomcat4\conf\catalina.policy c.. Initial heap 256 d.. Max heap 512 e.. Stack size 256 f.. JVM server Issue: We are getting OutOfMemory errors with very few threads simulated (as low as 5). More problematic, we've seen the OOM just after a Tomcat service restart! From the stack trace below, you can see we get the OOM before any of our code is executed :( Questions: a.. Anyone has seen this behavior upon Tomcat start up? b.. Anything particular to watch for in our JMeter test plan? c.. Would a profiler help? Could it profile a remote Tomcat installation? Any +/- feedback on Eclipse Profiler plug in (http://eclipsecolorer.sourceforge.net/index_profiler.html)? We'll work on gathering more data (e.g. periodic free / allocated memory dumps). Untill then, thank you for sharing your experiences, suggestions, code,...! Cheers, Guillaume javax.servlet.ServletException: Servlet execution threw an exception at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at
Re: Equivalent of Resin run-at servlet configuration
: I am developing a Java web application, and one of the requirements is to run : a particular servlet periodically, or even at specified times. Resin provides : this ability via its run-at configuration element for servlets in web.xml Tomcat doesn't have this. Are you trying to run that particular servlet, or just the business logic called by that servlet? Look into a scheduler (such as Quartz) to call that business logic for you at given times. You could also use Java's builtin TimerTask class, but (IIRC) that takes a Runnable or a Thread, so it's up to you to make sure those threads are properly terminated at container shutdown. Tomcat won't do that for you. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to initialize TldLocationsCache: no !/ in spec
I hate answering myself, but in case anyone else runs across this error, I left the system sit overnight, rebooted Tomcat and everything was happy again. I'm not quite sure what happened. Derek On Mar 2, 2005, at 10:22 PM, Derek wrote: Ok, I've searched the archives and Googled for this, but I can't find the answer. If I create a page with the following at the top: %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; % and save it in the root of my web site, it executes just fine. If I create a subdirectory and have the exact same line (or any taglib directive), I get the following error: org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: no !/ in spec org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.jav a:248) org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCa che.java:219) org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationCo ntext.java:475) org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java: 417) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539) org.apache.jasper.compiler.Parser.parse(Parser.java:126) org.apache.jasper.compiler.ParserController.doParse(ParserController.ja va:220) org.apache.jasper.compiler.ParserController.parse(ParserController.java :101) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203) org.apache.jasper.compiler.Compiler.compile(Compiler.java:461) org.apache.jasper.compiler.Compiler.compile(Compiler.java:442) org.apache.jasper.compiler.Compiler.compile(Compiler.java:430) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.j ava:511) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j ava:274) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java: 292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) What am I doing wrong? I'm using Tomcat 5.0.25 on Mac OS X. I do have other sites setup the exact same way on the same machine and I can create files in subdirectories without a problem. I can't think of anything that I did different with this setup. What other information could I provide that would be useful? I really appreciate any advice. Thanks! Derek - 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 and JRockit
I've benchmarks tomcat 5.5.4 with jrockit5 and it worked fine on Redhat FedoraCore1 peter On Thu, 3 Mar 2005 10:26:37 -, Michael Cornell [EMAIL PROTECTED] wrote: Hi, Just wondering if there is some documentation w regards to what/which virtual machines tomcat (5.0.x) has been tested on (ie does it work with BEA Jrockit and if so what version) ? Failing this, does anyone know if tomcat 5.0.25 does work (or there are issues) with Jrockit SDK 1.4.2 (which appears to be the same as 7.0) as featured here http://dev2dev.bea.com/products/wljrockit70/index.jsp Thanks Michael -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.6.0 - Release Date: 02/03/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Equivalent of Resin run-at servlet configuration
Subramanya Sastry wrote: Hello, I am developing a Java web application, and one of the requirements is to run a particular servlet periodically, or even at specified times. Resin provides this ability via its run-at configuration element for servlets in web.xml Example Resin configuration: servlet servlet-namedownload/servlet-name servlet-classDownloadNewsServlet/servlet-class run-at period='360m'/ /servlet However, I haven't found an equivalent configuration for Tomcat. I searched the web and was unsuccessful. So, any pointers as to how I could achieve this for Tomcat would be appreciated. There is none and shouldn't be any. I understand the need to run periodical tasks, but J2EE specification, prior to 1.4 has no such provisions. Further, Servlet/JSP specification has no such provision, even in J2EE 1.4. You'd be best advised to setup a cron-job to perform this periodic activity. There are several good HTTP client packages out there, Jakarta-Commons HTTPclient, to name one, that will help you in building the client side of your cron-job. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Equivalent of Resin run-at servlet configuration
With all the questions and suggestions flying around, a question to the other programmers: If one was to write a class for the purpose of running classes at set times, what pitfalls would one need to watch for? I have a class that loads on startup and runs a continuous loop that is timed (sleeps, wakes up, does something, sleeps again). It runs fine, but I know that it could be better. Any guidance or suggestions would be appreciated. And maybe we could create an add-on and post it for use in apps that need such a device. Thanks Doug - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, March 03, 2005 6:55 AM Subject: Re: Equivalent of Resin run-at servlet configuration Subramanya Sastry wrote: Hello, I am developing a Java web application, and one of the requirements is to run a particular servlet periodically, or even at specified times. Resin provides this ability via its run-at configuration element for servlets in web.xml Example Resin configuration: servlet servlet-namedownload/servlet-name servlet-classDownloadNewsServlet/servlet-class run-at period='360m'/ /servlet However, I haven't found an equivalent configuration for Tomcat. I searched the web and was unsuccessful. So, any pointers as to how I could achieve this for Tomcat would be appreciated. There is none and shouldn't be any. I understand the need to run periodical tasks, but J2EE specification, prior to 1.4 has no such provisions. Further, Servlet/JSP specification has no such provision, even in J2EE 1.4. You'd be best advised to setup a cron-job to perform this periodic activity. There are several good HTTP client packages out there, Jakarta-Commons HTTPclient, to name one, that will help you in building the client side of your cron-job. Nix. - 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: Equivalent of Resin run-at servlet configuration
I think the Cocoon project has such a facility. I'm not sure how complicated it would be to pull out that functionality, but their work might be worth looking at for this. --David Parsons Technical Services wrote: With all the questions and suggestions flying around, a question to the other programmers: If one was to write a class for the purpose of running classes at set times, what pitfalls would one need to watch for? I have a class that loads on startup and runs a continuous loop that is timed (sleeps, wakes up, does something, sleeps again). It runs fine, but I know that it could be better. Any guidance or suggestions would be appreciated. And maybe we could create an add-on and post it for use in apps that need such a device. Thanks Doug - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, March 03, 2005 6:55 AM Subject: Re: Equivalent of Resin run-at servlet configuration Subramanya Sastry wrote: Hello, I am developing a Java web application, and one of the requirements is to run a particular servlet periodically, or even at specified times. Resin provides this ability via its run-at configuration element for servlets in web.xml Example Resin configuration: servlet servlet-namedownload/servlet-name servlet-classDownloadNewsServlet/servlet-class run-at period='360m'/ /servlet However, I haven't found an equivalent configuration for Tomcat. I searched the web and was unsuccessful. So, any pointers as to how I could achieve this for Tomcat would be appreciated. There is none and shouldn't be any. I understand the need to run periodical tasks, but J2EE specification, prior to 1.4 has no such provisions. Further, Servlet/JSP specification has no such provision, even in J2EE 1.4. You'd be best advised to setup a cron-job to perform this periodic activity. There are several good HTTP client packages out there, Jakarta-Commons HTTPclient, to name one, that will help you in building the client side of your cron-job. Nix. - 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: Equivalent of Resin run-at servlet configuration
I think that what you want, with this feature, is a daemon (but not a servlet that respond to requests). So, Tomcat don't have to implement anything for this (it's not in its sphere of activities). I think that crons (eventually with httpclients), TimerTasks, ... are more usefull for this need... On Thu, 3 Mar 2005 08:27:46 -0500 Parsons Technical Services [EMAIL PROTECTED] wrote: With all the questions and suggestions flying around, a question to the other programmers: If one was to write a class for the purpose of running classes at set times, what pitfalls would one need to watch for? I have a class that loads on startup and runs a continuous loop that is timed (sleeps, wakes up, does something, sleeps again). It runs fine, but I know that it could be better. Any guidance or suggestions would be appreciated. And maybe we could create an add-on and post it for use in apps that need such a device. Thanks Doug - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, March 03, 2005 6:55 AM Subject: Re: Equivalent of Resin run-at servlet configuration Subramanya Sastry wrote: Hello, I am developing a Java web application, and one of the requirements is to run a particular servlet periodically, or even at specified times. Resin provides this ability via its run-at configuration element for servlets in web.xml Example Resin configuration: servlet servlet-namedownload/servlet-name servlet-classDownloadNewsServlet/servlet-class run-at period='360m'/ /servlet However, I haven't found an equivalent configuration for Tomcat. I searched the web and was unsuccessful. So, any pointers as to how I could achieve this for Tomcat would be appreciated. There is none and shouldn't be any. I understand the need to run periodical tasks, but J2EE specification, prior to 1.4 has no such provisions. Further, Servlet/JSP specification has no such provision, even in J2EE 1.4. You'd be best advised to setup a cron-job to perform this periodic activity. There are several good HTTP client packages out there, Jakarta-Commons HTTPclient, to name one, that will help you in building the client side of your cron-job. Nix. - 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: display my index.jsp as default
bhupendra bendale wrote: I have placed my directory under %catalina_home%/webapps/ now i want to configure tomcat to display my index.jsp page by entering only http://localhost:8080/; what changes should i make. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com The following will set the default page to display for the web application. welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list As far as mapping the root to your app, you could put a redirect in the root index.jsp to the jsp page of your choice. Not very elegant, but it would work. -- Justin Crabtree Java Programmer Ozarks Technical Community College 447-7533 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: display my index.jsp as default
Add the Context tag to your Host section of the Engine section in the conf/server.xml file (look for this section): Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false then add this below that: Context path= docBase=myDirectory/ debug=0/ At 09:19 AM 3/3/2005, you wrote: bhupendra bendale wrote: I have placed my directory under %catalina_home%/webapps/ now i want to configure tomcat to display my index.jsp page by entering only http://localhost:8080/; what changes should i make. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RequestDispatcher.forward: SOLVED
Thanks to Tim and Remy for the answers; For more explanations for those who have the same problem like me : - see bugs 23211 and 33831 on http://issues.apache.org/bugzilla/ - In my example, after ctx = ctx.getContext(/myNewContext); but before dispatcher = ctx.getRequestDispatcher(/myNewServlet); I can verify if my context (ctx) is the good one (or the context root) thanks to : ctx.getServletContextName() //if servlet API is 2.4 or ctx.getInitParameterNames() return a initParameter present in my desired Context or ctx.getAttributeNames() return an attribute present in my desired Context or ctx.getRealPath(/myNewServlet) is a Path valid for my desired Context On Wed, 2 Mar 2005 16:34:42 +0100 Lionel Farbos [EMAIL PROTECTED] wrote: Yes : it's my problem. ctx.getContext(/myNewContext) always return a Context (even if myNewContext is not deployed :-( and ctx.getRequestDispatcher(/myNewServlet) always return a dispatcher (even if myNewServlet is not here :-( So How can I avoid a 404 ? On Wed, 02 Mar 2005 10:24:37 -0500 Tim Funk [EMAIL PROTECTED] wrote: getRequestDispatcher() will always return a servlet. (The default servlet) -Tim Lionel Farbos wrote: Hi, (I work on Tomcat 5.0.30). When my servlet (http://myVhost/proxy/testProxy) forward to another servlet : try { ServletContext ctx = getServletContext(); ctx = ctx.getContext(/myNewContext); RequestDispatcher dispatcher = ctx.getRequestDispatcher(/myNewServlet); dispatcher.forward(request, response); } catch (Exception e) {e.printStackTrace();} (in server.xml, in the Context /proxy of myVhost, I put crossContext=true) If the Context /myNewContext is deployed in myVhost, the HTTPresponse is : HTTP/1.1 200 OK ... response of myNewServlet If the Context /myNewContext is not deployed, the HTTPresponse is : HTTP/1.1 404 /myNewServlet :-( 1) In other servlets containers, I read that ctx.getRequestDispatcher(...) returns null if the resource is absent. So, Why Tomcat reacts differently ? Is it a bug ? 2) In my case, I'd want to forward to myNewServlet if it is present, BUT, if it is absent, I'd want to call another url distant (with httpclient)... How can I do this with Tomcat ? - 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: How to approximate tomcat-5.0/4.x/3.x logging in 5.5?
Understandable. I was a little dismayed to see that what had been more automatic in Tomcat-5.0.xx had become less so in Tomcat-5.5. What I mean is, in Tomcat-5.0.xx, one could add a Logger to the context configuration file, deploy that with the webapp, and dynamically get a log file for ServletContext.log() output. In Tomcat-5.5, one has to have this in the logger config file at Tomcat startup, therefore forcing one to predict the apps that will be deployed to the appserver during runtime ... I was trying to achieve this with multiple separate log4j.properties, one in the container (common/classes/) for the uncaught stack trace and other general logging, and others in each webapp. With my setup below I was expecting to get THREE files: catalina.out (with stdout/err), tomcat.log (with the container's log4j output), and bar.log (with the webapp's log4j output, which I changed from ServletContext.log() to use Logger.info()). Instead, I got only catalina.out and tomcat.log, the latter containing everything that I thought the webapp would be sending to bar.log. And this should have worked. It works in every case I have ever tried. I suggest you double and triple check that you have log4j.jar in both common/lib and WEB-INF/lib and make sure you have log4j.properties in both common/classes and WEB-INF/classes. OK, thanks to your vote of confidence in the method, I dug further and discovered that my WEB-INF/classes/log4j.properties was never being found. If I put the log4j.properties into the same jar (in WEB-INF/lib) with the class that was instantiating the Logger, it worked correctly. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Equivalent of Resin run-at servlet configuration
Well, I use a servlet that is kicked off at container start(On TC 3.x used load-on-startup attribute, TC 5.x+ there is something else which is now part of the J2EE spec). Most other containers have a load-on-startup type attribute available to them. When that servlet is init()ed at container start I kick off a class which loads more class names out of the web.xml that are Runnable. This parent class then kicks off a thread for each Runnable, and handles making sure they are all reaped when the destroy() method of the servlet is called(usually at container shutdown). There are better ways of doing this now with the newer TC's. If you don't shutdown your child threads, there may be a possibility that they will remain running after TC stops. Good luck. -JW Lionel Farbos wrote: I think that what you want, with this feature, is a daemon (but not a servlet that respond to requests). So, Tomcat don't have to implement anything for this (it's not in its sphere of activities). I think that crons (eventually with httpclients), TimerTasks, ... are more usefull for this need... On Thu, 3 Mar 2005 08:27:46 -0500 Parsons Technical Services [EMAIL PROTECTED] wrote: With all the questions and suggestions flying around, a question to the other programmers: If one was to write a class for the purpose of running classes at set times, what pitfalls would one need to watch for? I have a class that loads on startup and runs a continuous loop that is timed (sleeps, wakes up, does something, sleeps again). It runs fine, but I know that it could be better. Any guidance or suggestions would be appreciated. And maybe we could create an add-on and post it for use in apps that need such a device. Thanks Doug - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, March 03, 2005 6:55 AM Subject: Re: Equivalent of Resin run-at servlet configuration Subramanya Sastry wrote: Hello, I am developing a Java web application, and one of the requirements is to run a particular servlet periodically, or even at specified times. Resin provides this ability via its run-at configuration element for servlets in web.xml Example Resin configuration: servlet servlet-namedownload/servlet-name servlet-classDownloadNewsServlet/servlet-class run-at period='360m'/ /servlet However, I haven't found an equivalent configuration for Tomcat. I searched the web and was unsuccessful. So, any pointers as to how I could achieve this for Tomcat would be appreciated. There is none and shouldn't be any. I understand the need to run periodical tasks, but J2EE specification, prior to 1.4 has no such provisions. Further, Servlet/JSP specification has no such provision, even in J2EE 1.4. You'd be best advised to setup a cron-job to perform this periodic activity. There are several good HTTP client packages out there, Jakarta-Commons HTTPclient, to name one, that will help you in building the client side of your cron-job. Nix. - 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: How to approximate tomcat-5.0/4.x/3.x logging in 5.5?
Quoting Adrian Robert [EMAIL PROTECTED]: Understandable. I was a little dismayed to see that what had been more automatic in Tomcat-5.0.xx had become less so in Tomcat-5.5. What I mean is, in Tomcat-5.0.xx, one could add a Logger to the context configuration file, deploy that with the webapp, and dynamically get a log file for ServletContext.log() output. In Tomcat-5.5, one has to have this in the logger config file at Tomcat startup, therefore forcing one to predict the apps that will be deployed to the appserver during runtime ... I was trying to achieve this with multiple separate log4j.properties, one in the container (common/classes/) for the uncaught stack trace and other general logging, and others in each webapp. With my setup below I was expecting to get THREE files: catalina.out (with stdout/err), tomcat.log (with the container's log4j output), and bar.log (with the webapp's log4j output, which I changed from ServletContext.log() to use Logger.info()). Instead, I got only catalina.out and tomcat.log, the latter containing everything that I thought the webapp would be sending to bar.log. And this should have worked. It works in every case I have ever tried. I suggest you double and triple check that you have log4j.jar in both common/lib and WEB-INF/lib and make sure you have log4j.properties in both common/classes and WEB-INF/classes. OK, thanks to your vote of confidence in the method, I dug further and discovered that my WEB-INF/classes/log4j.properties was never being found. If I put the log4j.properties into the same jar (in WEB-INF/lib) with the class that was instantiating the Logger, it worked correctly. That's extremely odd. What version of Tomcat are you running? That's a bug because WEB-INF/classes should be put in the classpath before jars in WEB-INF/lib. Jake - 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: How to approximate tomcat-5.0/4.x/3.x logging in 5.5?
OK, thanks to your vote of confidence in the method, I dug further and discovered that my WEB-INF/classes/log4j.properties was never being found. If I put the log4j.properties into the same jar (in WEB-INF/lib) with the class that was instantiating the Logger, it worked correctly. That's extremely odd. What version of Tomcat are you running? That's a bug because WEB-INF/classes should be put in the classpath before jars in WEB-INF/lib. This is 5.5.7, with the 1.4 compatibility package on MacOS. I've experienced similar issues before with different tomcat versions, though I had forgotten that in this case.. Note I do NOT unpack the app from a war, just copy the full hierarchy straight under webapps. Also, the WEB-INF/classes/log4j.properties file was a symblic link. Maybe one of these makes a difference? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Connection reset by peer: socket write error
Hi, When a page is loading -- it is a page with large ammount of data from database, I clicked a button. I see the exception on the monitor window: Connection reset by peer: socket write error. The detal error is attached. This message might be harmless. I think it is because the response has not finished the task. Is there a way to know the response is finished and the socket is idle? Anybody has some suggestion? Any setting in tomcat? Thanks. Mar 2, 2005 5:09:11 PM org.apache.jk.server.JkCoyoteHandler action SEVERE: Error in action code java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:489) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:697) at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:487) at org.apache.coyote.Response.action(Response.java:226) at org.apache.coyote.Response.finish(Response.java:348) at org.apache.coyote.tomcat5.OutputBuffer.close(OutputBuffer.java:328) at org.apache.coyote.tomcat5.CoyoteResponse.finishResponse(CoyoteResponse.java: 497) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:339) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:415) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:716) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:650) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:829) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:688) at java.lang.Thread.run(Thread.java:534) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
System load creeping up with Tomcat + Lucene
Hi, I'm using Tomcat and Lucene to build a search engine. I suspect this is a Tomcat problem, but I can't be sure. The system load and CPU usage by Tomcat keeps creeping up with http-8081-Processorn threads becoming stuck in _hpiThreadHardSuspend in libhpi.so. For example, I might get 10 or more threads similar to what I pasted below. Any ideas? Thanks, Filip 3XMTHREADINFO http-8081-Processor8 (TID:1007B400, sys_thread_t:8B68F18, state:R, native ID:B30A2BB0) prio=5 NULL 3HPREGISTERS Register Values NULL --- 3HPREGVALUESEAX : 0101, EBX : 08B69208, ECX : 3HPREGVALUESEDX : 08B68F18, ESI : 08B692CC, EDI : B30A03FC 3HPREGVALUESEBP : B30A0404, ESP : B30A02FC, EIP : B72011B0 3HPREGVALUESEFLAGS : 0202 NULL 3HPNATIVESTACK Native Stack of http-8081-Processor8 PID 29178 NULL - 3HPSTACKLINE_hpiThreadHardSuspend at B72011B0 in libhpi.so 3HPSTACKLINE?? at B71F45BB in libhpi.so 3HPSTACKLINE?? at B71F47C0 in libhpi.so 3HPSTACKLINE?? at B75CFE50 in libpthread.so.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to approximate tomcat-5.0/4.x/3.x logging in 5.5?
On Thu, 03 Mar 2005 12:11:27 -0500, Adrian Robert [EMAIL PROTECTED] wrote: That's extremely odd. What version of Tomcat are you running? That's a bug because WEB-INF/classes should be put in the classpath before jars in WEB-INF/lib. I agree it's very odd. This is 5.5.7, with the 1.4 compatibility package on MacOS. I've experienced similar issues before with different tomcat versions, though I had forgotten that in this case.. Note I do NOT unpack the app from a war, just copy the full hierarchy straight under webapps. Also, the WEB-INF/classes/log4j.properties file was a symblic link. Maybe one of these makes a difference? Yes, I think the symlinking is the issue. -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to approximate tomcat-5.0/4.x/3.x logging in 5.5?
Quoting Adrian Robert [EMAIL PROTECTED]: OK, thanks to your vote of confidence in the method, I dug further and discovered that my WEB-INF/classes/log4j.properties was never being found. If I put the log4j.properties into the same jar (in WEB-INF/lib) with the class that was instantiating the Logger, it worked correctly. That's extremely odd. What version of Tomcat are you running? That's a bug because WEB-INF/classes should be put in the classpath before jars in WEB-INF/lib. This is 5.5.7, with the 1.4 compatibility package on MacOS. I've experienced similar issues before with different tomcat versions, though I had forgotten that in this case.. Note I do NOT unpack the app from a war, just copy the full hierarchy straight under webapps. Also, the WEB-INF/classes/log4j.properties file was a symblic link. Maybe one of these makes a difference? That makes a huge difference. Symbolic links are not enabled by default. I believe there is some sort of allowLinking property you can set in the context configuration file for the app. I don't recall the syntax for that, though. See the Tomcat docs for info. Once you have that set, it will probably work as expected. Jake - 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: How to approximate tomcat-5.0/4.x/3.x logging in 5.5?
OK, thanks to your vote of confidence in the method, I dug further and discovered that my WEB-INF/classes/log4j.properties was never being found. If I put the log4j.properties into the same jar (in WEB-INF/lib) with the class that was instantiating the Logger, it worked correctly. That's extremely odd. What version of Tomcat are you running? That's a bug because WEB-INF/classes should be put in the classpath before jars in WEB-INF/lib. This is 5.5.7, with the 1.4 compatibility package on MacOS. I've experienced similar issues before with different tomcat versions, though I had forgotten that in this case.. Note I do NOT unpack the app from a war, just copy the full hierarchy straight under webapps. Also, the WEB-INF/classes/log4j.properties file was a symblic link. Maybe one of these makes a difference? It turns out it WAS the symbolic link. I get the following results: - symbolic link, relative (e.g., WEB-INF/classes/log4j.properties - resources/log4j.properties): not found - symbolic link, absolute (e.g., WEB-INF/classes/log4j.properties - /usr/java/tomcat/webapps/foo/WEB-INF/classes/resources/log4j.properties - OR - regular file: found and prevents common/classes/log4j.properties from being found (tomcat-general stuff goes into webapp's log file) - file in jar with class that instantiates Logger: both tomcat's (common/classes/) and webapp's log4j.properties are found and heeded Sorry about the bother if this is just standard knowledge of how tomcat operates on Unix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Root Context on Tomcat 5.5.7
I am trying to deploy a root context webapp using a war file. Anytime I try to deploy the war file (ROOT.war) it says it deployed successfully but then disappears from the manager. I can deploy it manually by copying the context.xml to 'conf/Catalina/localhost/ROOT.xml' and copying the web app files into 'webapps/ROOT'. I am including a copy of the context.xml and a snippet from the log file. Log file: Mar 3, 2005 12:29:42 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive ROOT.war Mar 3, 2005 12:29:42 PM org.apache.catalina.startup.ContextConfig applicationWebConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] META-INF/context.xml file: ?xml version='1.0' encoding='utf-8'? Context path=/ docBase=C:/Program Files/Apache Software Foundation/Tomcat 5.5/webapps/ROOT ResourceLink name=jdbc/ssdb type=javax.sql.DataSource global=jdbc/ssdb/ /Context I know it says it's missing the web.xml but I know it is in the war archive in WEB-INF/web.xml Any ideas? Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can we know when the Response is finished? or other solution.
If you use custom tags, then when the custom tag that generates /html is done, then you are done. We use this approach, and also return SKIP_PAGE from the tag so you know it is done. Maybe there is an easier way though. :) Can we know when the Response is finished? or other solution. 122561 by: Daxin Zuo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsvc.exec error on FC3
Chong Yu Meng [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill Barker wrote: | Chong Yu Meng [EMAIL PROTECTED] wrote in message | news:[EMAIL PROTECTED] | | The daemon starts up ok, but when shutting down, I get this error: | | Feb 28, 2005 3:23:40 PM org.apache.coyote.http11.Http11Protocol pause | INFO: Pausing Coyote HTTP/1.1 on http-8080 | jsvc.exec error: Service exit with a return value of 143 | | When I do a shutdown using the shutdown.sh script, Tomcat shuts down | gracefully. | | Is there a way to shutdown jsvc gracefully? | | Yes. Don't use the version that ships with Tomcat. Hi Bill, I just downloaded and compiled the source version from the Commons website (http://www.apache.org/dist/jakarta/commons/daemon/binaries/). Unfortunately, I still get the same error. Any ideas? Perhaps you could point me to the site you downloaded your jsvc sources from, because the date stamp on the two sites I visited were different -- although the results were the same. You need CVS HEAD. - -- ~ -- ~ Pascal Chong -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFCJaUgmVdpiRJSldgRAo8/AJ0QnHZ9OAiWCnYZ307u+2f1MyMOAwCgksRt h0KffKXJ+tk+cU3JXD3TT7U= =Vgbu -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can we know when the Response is finished? or other solution.
Thanks for reply. I do not use custom tag. In my code, I disabled the button actions at the beginning of the page. At the very end of the page, I enable the button actions. But the Exception still occurs. My error occur only when the source code recompiled for hand test. Thanks. -Original Message- From: Chris Hyzer [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 9:45 AM To: tomcat-user@jakarta.apache.org Subject: Re: Can we know when the Response is finished? or other solution. If you use custom tags, then when the custom tag that generates /html is done, then you are done. We use this approach, and also return SKIP_PAGE from the tag so you know it is done. Maybe there is an easier way though. :) Can we know when the Response is finished? or other solution. 122561 by: Daxin Zuo - 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]
Contexts
I inherited an application recently that uses Tomcat 5.0.16. I know that previous to Tomcat 5, Context elements were in Tomcat's server.xml, but with Tomcat 5 it is recommended that Context elements be in their own .xml files under /conf/Catalina/host/. In this application, however, there are Context elements in BOTH places - when this is the case, does one overwrite the other, do they cancel one another out, what? Thanks! -- Lynn Hollerman. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to disable PUT, DELETE http methods etc if not using container managed security?
Sorry, I blanked on this one. You also need the http-methodGET/http-method etc on the second (SSL) constraint. It's a pain, but the servlet-spec says you get the least restrictive combination of constraints. Ted Anagnost [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks Bill but I'm not sure it's working. Per your suggestion here's what I have now: security-constraint web-resource-collection web-resource-nameProtected Context/web-resource-name url-pattern/*/url-pattern http-methodHEAD/http-method http-methodPUT/http-method http-methodDELETE/http-method http-methodTRACE/http-method http-methodOPTIONS/http-method /web-resource-collection auth-constraint / /security-constraint security-constraint web-resource-collection web-resource-nameProtected Context/web-resource-name url-pattern/*/url-pattern /web-resource-collection !-- auth-constraint goes here if you requre authentication -- user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint But, how do I verify that PUT's and DELETE's are blocked now? My vulnerability scanner still shows them as open: It seems that the PUT method is enabled on your web server Although we could not exploit this, you'd better disable it Solution : disable this method Risk factor : High BID : 12141 If I try to delete index.jsp through a telnet session: DELETE /index.jsp HTTP/1.1 I get this as a response: HTTP/1.1 400 Bad Request What's a good way to verify that DELETE is blocked? Can someone give a definitive test? Thanks - Original Message - From: Bill Barker [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Saturday, February 26, 2005 3:33 PM Subject: Re: How to disable PUT, DELETE http methods etc if not using container managed security? For TC 5.x.x, you need two security-constraints to do what you want. One of them looks like your first example, and the other like your second example (except that you probably want auth-constraint /, which is deny all, instead of role-name/ which is deny to all but the blank role). Since you are forbidding all access, you could also drop the user-data-constraint on the second one (since with it, TC will first redirect a PUT to SSL, and then deny it). Ted Anagnost [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there a way to prevent PUT or DELETE http methods if you're not using container managed security? If so, how? I already have this to force the use of https: security-constraint web-resource-collection web-resource-nameProtected Context/web-resource-name url-pattern/*/url-pattern /web-resource-collection !-- auth-constraint goes here if you requre authentication -- user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint What changes are needed? I tried this but it didn't seem to work: security-constraint web-resource-collection web-resource-nameProtected Context/web-resource-name url-pattern/*/url-pattern http-methodHEAD/http-method -- http-methodPUT/http-method -- http-methodDELETE/http-method -- http-methodTRACE/http-method-- http-methodOPTIONS/http-method -- /web-resource-collection auth-constraint role-name/role-name /auth-constraint user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint Inserting these statements seems to turn off the automatic enforcement of https which was achieved with the first version. Any ideas? Thanks - 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: Split catalina.out to separate stdout and stderr?
Or just read and undrestand the startup parameters and go catalina run out.txt - Original Message - From: Tim Funk [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, February 17, 2005 11:43 AM Subject: Re: Split catalina.out to separate stdout and stderr? You'd need to write a listener (or other code) which calls the appropriate System calls to set out and err in the JVM. -Tim [EMAIL PROTECTED] wrote: Hi, I'm runnning Tomcat 4.1.30 on Linux/Unix. I'm trying to get our app's debug info from catalina.out split into 2 separate stderr and stdout files. I'm able to do this in Windows via the System.out File and System.err File registry parameters, but I can't find a way to do this in Linux/Unix. I've tried a couple things that haven't worked: (A) Changing catalina.sh from $CATALINA_BASE/logs/catalina.out 21 to 2 $CATALINA_BASE/logs/catalina.err 1 $CATALINA_BASE/logs/catalina.out (B) JAVA_OPTS and CATALINA_OPTS with -Dstdout= and -Dstderr= params (C) JAVA_OPTS and CATALINA_OPTS with -outfile= and -errfile= params Is there any easy way to do this? Thanks in advance for any assistance. ~RZ __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo - 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]
[OT] Jav/JSP Programmer
I apologize for placing this on this mail list but I am getting pretty desperate. The opportunity: Small company, opportunity to grow with it and participate in its success. Technical requirements: Java/JSP, Apache/Tomcat and SQL required. Knowledge of Linux, NetBeans and JasperReports helpful. Location: Charleston, SC. Reply to me directly. TIA. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.6.0 - Release Date: 3/2/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Jav/JSP Programmer
Hi Carl, are you looking for someone on-site or off-site ? P.S. please do the world a favor and get rid of the flash intro at the beginning of your site, my eardrums just exploded !! Best Regards, -Wiley At 12:08 PM 3/3/2005, you wrote: I apologize for placing this on this mail list but I am getting pretty desperate. The opportunity: Small company, opportunity to grow with it and participate in its success. Technical requirements: Java/JSP, Apache/Tomcat and SQL required. Knowledge of Linux, NetBeans and JasperReports helpful. Location: Charleston, SC. Reply to me directly. TIA. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.6.0 - Release Date: 3/2/2005 - 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: [OT] Jav/JSP Programmer
And why don't you do the list a favour, and contact the intended recipient directly! Hi Carl, are you looking for someone on-site or off-site ? P.S. please do the world a favor and get rid of the flash intro at the beginning of your site, my eardrums just exploded !! Best Regards, -Wiley At 12:08 PM 3/3/2005, you wrote: I apologize for placing this on this mail list but I am getting pretty desperate. The opportunity: Small company, opportunity to grow with it and participate in its success. Technical requirements: Java/JSP, Apache/Tomcat and SQL required. Knowledge of Linux, NetBeans and JasperReports helpful. Location: Charleston, SC. Reply to me directly. TIA. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.6.0 - Release Date: 3/2/2005 - 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]
path attributes in context xml files
I use xml files in /conf/[enginename]/[hostname] to define my contexts. I now know that Tomcat 5.5.x doesn't allow for 'path' attributes in the Context elements when defined that way. Previously, I could specify the path as '/dir1/dir2/appname'. I can easily rename the xml file to 'appname.xml', but how do I get the other directories into the path without a 'path' attribute in the Context element. Using the 5.5.x approach, by web application is at '/appname' instead of '/dir1/dir2/appname'. Is there a way to get a multi-directory path using this approach (a la Tomcat 5.0.x), or will I need to declare these Contexts in my server.xml to do that?
Re: [OT] Jav/JSP Programmer
Wiley, I agree with your suggestions about the website but that is not a priority right now. Really need someone onsite as the system is very complex and I am looking for someone who is looking for the opportunity to help build a business not just have a job. Thanks, Carl - Original Message - From: B Wiley [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, March 03, 2005 5:12 PM Subject: Re: [OT] Jav/JSP Programmer Hi Carl, are you looking for someone on-site or off-site ? P.S. please do the world a favor and get rid of the flash intro at the beginning of your site, my eardrums just exploded !! Best Regards, -Wiley At 12:08 PM 3/3/2005, you wrote: I apologize for placing this on this mail list but I am getting pretty desperate. The opportunity: Small company, opportunity to grow with it and participate in its success. Technical requirements: Java/JSP, Apache/Tomcat and SQL required. Knowledge of Linux, NetBeans and JasperReports helpful. Location: Charleston, SC. Reply to me directly. TIA. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.6.0 - Release Date: 3/2/2005 - 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] -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.6.0 - Release Date: 3/2/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.6.0 - Release Date: 3/2/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: path attributes in context xml files
Yes there is. I cannot remember, but it is in the archives. It has to do with how you name the file. Something like dir1#dir2#appname.xml or it may have been an underscore. I will see if I can find it if no one else knows off the top. Doug - Original Message - From: David Boyer [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Thursday, March 03, 2005 5:31 PM Subject: path attributes in context xml files I use xml files in /conf/[enginename]/[hostname] to define my contexts. I now know that Tomcat 5.5.x doesn't allow for 'path' attributes in the Context elements when defined that way. Previously, I could specify the path as '/dir1/dir2/appname'. I can easily rename the xml file to 'appname.xml', but how do I get the other directories into the path without a 'path' attribute in the Context element. Using the 5.5.x approach, by web application is at '/appname' instead of '/dir1/dir2/appname'. Is there a way to get a multi-directory path using this approach (a la Tomcat 5.0.x), or will I need to declare these Contexts in my server.xml to do that? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
failover
Can either JK or JK2 properly failover when a webapp fails? They seem to work fine when an entire tomcat instance drops, but they don't seem to do anything useful when a single webapp on a tomcat instance breaks down and starts throwing exceptions. They both continue to send requests to the broken webapp. Am I wrong? -Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: path attributes in context xml files
Yep, that's it. I'd already tried underscore (and everything else except #). Thanks! [EMAIL PROTECTED] 3/3/2005 6:14:35 PM Yes there is. I cannot remember, but it is in the archives. It has to do with how you name the file. Something like dir1#dir2#appname.xml or it may have been an underscore. I will see if I can find it if no one else knows off the top. Doug - Original Message - From: David Boyer [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Thursday, March 03, 2005 5:31 PM Subject: path attributes in context xml files I use xml files in /conf/[enginename]/[hostname] to define my contexts. I now know that Tomcat 5.5.x doesn't allow for 'path' attributes in the Context elements when defined that way. Previously, I could specify the path as '/dir1/dir2/appname'. I can easily rename the xml file to 'appname.xml', but how do I get the other directories into the path without a 'path' attribute in the Context element. Using the 5.5.x approach, by web application is at '/appname' instead of '/dir1/dir2/appname'. Is there a way to get a multi-directory path using this approach (a la Tomcat 5.0.x), or will I need to declare these Contexts in my server.xml to do that? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: path attributes in context xml files
Interesting. So, what If I wanted to deploy an app as a .war file with a context.xml file in META-INF, but wanted the app to be deployed to webapps/dir1/dir2/myapp rather than just webapps/myapp? The file in META-INF must be named context.xml. What clue can one give Tomcat the clue that it should be deployed in a special way other than manually creating the context config file manually before deploying the app? Jake Quoting David Boyer [EMAIL PROTECTED]: Yep, that's it. I'd already tried underscore (and everything else except #). Thanks! [EMAIL PROTECTED] 3/3/2005 6:14:35 PM Yes there is. I cannot remember, but it is in the archives. It has to do with how you name the file. Something like dir1#dir2#appname.xml or it may have been an underscore. I will see if I can find it if no one else knows off the top. Doug - Original Message - From: David Boyer [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Thursday, March 03, 2005 5:31 PM Subject: path attributes in context xml files I use xml files in /conf/[enginename]/[hostname] to define my contexts. I now know that Tomcat 5.5.x doesn't allow for 'path' attributes in the Context elements when defined that way. Previously, I could specify the path as '/dir1/dir2/appname'. I can easily rename the xml file to 'appname.xml', but how do I get the other directories into the path without a 'path' attribute in the Context element. Using the 5.5.x approach, by web application is at '/appname' instead of '/dir1/dir2/appname'. Is there a way to get a multi-directory path using this approach (a la Tomcat 5.0.x), or will I need to declare these Contexts in my server.xml to do that? - 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 startup error
I'm using eclipse and sysdeo. I attempted to make a small prototype application, but I can't get tomcat to start. This is what tomcat says when I try: SEVERE: Error deploying configuration descriptor klapa9.xml java.lang.NoClassDefFoundError: org/apache/log4j/Layout klapa9.xml looks like this: Context path=/klapa9 docBase=D:/posao/klapa9/context debug=6/ My project is obviously in D:/posao/klapa9/. I started with tomcat 5.5.7 as well as 5.0.28 and got nowhere. Any ideas what I'm doing wrong? Tomislav - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 5.5.7 autoDeploy/reload trouble
Hi there. I have migrated from tomcat 4.1.31 to tomcat 5.5.7 I have a setup with many virtual hosts. I ame using the option in 5.5 to put context information in /CATALINA_BASE/conf/[engine]/[host]/context.xml.default in server.xml each host is defined like this host name=name.example.com autoDeploy=true... appBase=webapps/ and the contexts Context docBase=/home//public_html reloadable=true/ If the appBase in server.xml is within the docBase of the context tomcat 5.5 says no host matches name name.example.com... But changing a /home//public_html/WEB-INF/web.xml, does not make tomcat redeploy the Context. the catalin_base/conf/context.xml makes web.xml a watched resourse. I'm thinking that the appBase=webapps, is the problem but as mentiod changing it does not work What to do ? Any suggestion appriciated TIA Jesper `--- Videresendt brev (slut) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP-Servlet tutorial
Can somebody direct me to a tutorial on jsp/servlet that pulls data from a database and displays the content via a jsp? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Equivalent of Resin run-at servlet configuration
If this is not supported in Tomcat, is there a way or a plan to have this kind of service? This would really be a big help to many developers. Just a thought Aris -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 9:34 PM To: Tomcat Users List Subject: Re: Equivalent of Resin run-at servlet configuration I think the Cocoon project has such a facility. I'm not sure how complicated it would be to pull out that functionality, but their work might be worth looking at for this. --David Parsons Technical Services wrote: With all the questions and suggestions flying around, a question to the other programmers: If one was to write a class for the purpose of running classes at set times, what pitfalls would one need to watch for? I have a class that loads on startup and runs a continuous loop that is timed (sleeps, wakes up, does something, sleeps again). It runs fine, but I know that it could be better. Any guidance or suggestions would be appreciated. And maybe we could create an add-on and post it for use in apps that need such a device. Thanks Doug - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, March 03, 2005 6:55 AM Subject: Re: Equivalent of Resin run-at servlet configuration Subramanya Sastry wrote: Hello, I am developing a Java web application, and one of the requirements is to run a particular servlet periodically, or even at specified times. Resin provides this ability via its run-at configuration element for servlets in web.xml Example Resin configuration: servlet servlet-namedownload/servlet-name servlet-classDownloadNewsServlet/servlet-class run-at period='360m'/ /servlet However, I haven't found an equivalent configuration for Tomcat. I searched the web and was unsuccessful. So, any pointers as to how I could achieve this for Tomcat would be appreciated. There is none and shouldn't be any. I understand the need to run periodical tasks, but J2EE specification, prior to 1.4 has no such provisions. Further, Servlet/JSP specification has no such provision, even in J2EE 1.4. You'd be best advised to setup a cron-job to perform this periodic activity. There are several good HTTP client packages out there, Jakarta-Commons HTTPclient, to name one, that will help you in building the client side of your cron-job. Nix. - 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: Equivalent of Resin run-at servlet configuration
no. (unless the spec says so) -Tim Aris Javier wrote: If this is not supported in Tomcat, is there a way or a plan to have this kind of service? This would really be a big help to many developers. Just a thought Aris -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 9:34 PM To: Tomcat Users List Subject: Re: Equivalent of Resin run-at servlet configuration I think the Cocoon project has such a facility. I'm not sure how complicated it would be to pull out that functionality, but their work might be worth looking at for this. --David Parsons Technical Services wrote: With all the questions and suggestions flying around, a question to the other programmers: If one was to write a class for the purpose of running classes at set times, what pitfalls would one need to watch for? I have a class that loads on startup and runs a continuous loop that is timed (sleeps, wakes up, does something, sleeps again). It runs fine, but I know that it could be better. Any guidance or suggestions would be appreciated. And maybe we could create an add-on and post it for use in apps that need such a device. Thanks Doug - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, March 03, 2005 6:55 AM Subject: Re: Equivalent of Resin run-at servlet configuration Subramanya Sastry wrote: Hello, I am developing a Java web application, and one of the requirements is to run a particular servlet periodically, or even at specified times. Resin provides this ability via its run-at configuration element for servlets in web.xml Example Resin configuration: servlet servlet-namedownload/servlet-name servlet-classDownloadNewsServlet/servlet-class run-at period='360m'/ /servlet However, I haven't found an equivalent configuration for Tomcat. I searched the web and was unsuccessful. So, any pointers as to how I could achieve this for Tomcat would be appreciated. There is none and shouldn't be any. I understand the need to run periodical tasks, but J2EE specification, prior to 1.4 has no such provisions. Further, Servlet/JSP specification has no such provision, even in J2EE 1.4. You'd be best advised to setup a cron-job to perform this periodic activity. There are several good HTTP client packages out there, Jakarta-Commons HTTPclient, to name one, that will help you in building the client side of your cron-job. Nix. - 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: Equivalent of Resin run-at servlet configuration
No, meaning impossible? cause if it would be very beneficial to many then why not change the specs to accommodate such service? Pardon me, maybe because I really don't understand the specs. I was just thinking in a layman's way. Thanks Aris -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Friday, March 04, 2005 9:42 AM To: Tomcat Users List Subject: Re: Equivalent of Resin run-at servlet configuration no. (unless the spec says so) -Tim Aris Javier wrote: If this is not supported in Tomcat, is there a way or a plan to have this kind of service? This would really be a big help to many developers. Just a thought Aris -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 9:34 PM To: Tomcat Users List Subject: Re: Equivalent of Resin run-at servlet configuration I think the Cocoon project has such a facility. I'm not sure how complicated it would be to pull out that functionality, but their work might be worth looking at for this. --David Parsons Technical Services wrote: With all the questions and suggestions flying around, a question to the other programmers: If one was to write a class for the purpose of running classes at set times, what pitfalls would one need to watch for? I have a class that loads on startup and runs a continuous loop that is timed (sleeps, wakes up, does something, sleeps again). It runs fine, but I know that it could be better. Any guidance or suggestions would be appreciated. And maybe we could create an add-on and post it for use in apps that need such a device. Thanks Doug - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, March 03, 2005 6:55 AM Subject: Re: Equivalent of Resin run-at servlet configuration Subramanya Sastry wrote: Hello, I am developing a Java web application, and one of the requirements is to run a particular servlet periodically, or even at specified times. Resin provides this ability via its run-at configuration element for servlets in web.xml Example Resin configuration: servlet servlet-namedownload/servlet-name servlet-classDownloadNewsServlet/servlet-class run-at period='360m'/ /servlet However, I haven't found an equivalent configuration for Tomcat. I searched the web and was unsuccessful. So, any pointers as to how I could achieve this for Tomcat would be appreciated. There is none and shouldn't be any. I understand the need to run periodical tasks, but J2EE specification, prior to 1.4 has no such provisions. Further, Servlet/JSP specification has no such provision, even in J2EE 1.4. You'd be best advised to setup a cron-job to perform this periodic activity. There are several good HTTP client packages out there, Jakarta-Commons HTTPclient, to name one, that will help you in building the client side of your cron-job. Nix. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Equivalent of Resin run-at servlet configuration
run-at is an extension to web.xml that is not portable across containers. That's why it will not be implemented. -Tim Aris Javier wrote: No, meaning impossible? cause if it would be very beneficial to many then why not change the specs to accommodate such service? Pardon me, maybe because I really don't understand the specs. I was just thinking in a layman's way. Thanks Aris -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Friday, March 04, 2005 9:42 AM To: Tomcat Users List Subject: Re: Equivalent of Resin run-at servlet configuration no. (unless the spec says so) -Tim Aris Javier wrote: If this is not supported in Tomcat, is there a way or a plan to have this kind of service? This would really be a big help to many developers. Just a thought Aris -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 9:34 PM To: Tomcat Users List Subject: Re: Equivalent of Resin run-at servlet configuration I think the Cocoon project has such a facility. I'm not sure how complicated it would be to pull out that functionality, but their work might be worth looking at for this. --David Parsons Technical Services wrote: With all the questions and suggestions flying around, a question to the other programmers: If one was to write a class for the purpose of running classes at set times, what pitfalls would one need to watch for? I have a class that loads on startup and runs a continuous loop that is timed (sleeps, wakes up, does something, sleeps again). It runs fine, but I know that it could be better. Any guidance or suggestions would be appreciated. And maybe we could create an add-on and post it for use in apps that need such a device. Thanks Doug - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, March 03, 2005 6:55 AM Subject: Re: Equivalent of Resin run-at servlet configuration Subramanya Sastry wrote: Hello, I am developing a Java web application, and one of the requirements is to run a particular servlet periodically, or even at specified times. Resin provides this ability via its run-at configuration element for servlets in web.xml Example Resin configuration: servlet servlet-namedownload/servlet-name servlet-classDownloadNewsServlet/servlet-class run-at period='360m'/ /servlet However, I haven't found an equivalent configuration for Tomcat. I searched the web and was unsuccessful. So, any pointers as to how I could achieve this for Tomcat would be appreciated. There is none and shouldn't be any. I understand the need to run periodical tasks, but J2EE specification, prior to 1.4 has no such provisions. Further, Servlet/JSP specification has no such provision, even in J2EE 1.4. You'd be best advised to setup a cron-job to perform this periodic activity. There are several good HTTP client packages out there, Jakarta-Commons HTTPclient, to name one, that will help you in building the client side of your cron-job. Nix. - 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] - 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: Equivalent of Resin run-at servlet configuration
And so the best way is to have a set of classes to add to your project that add this feature. It then moves with the app and can be applied per app or even as a jar in common lib for use by all apps. Tim, am I thinking right on this? Remember that Tomcat follows the spec which is developed and created by others. So impossible is not an accurate statement. Anything is possible. But this is not the forum to lobby. Tomcat nor Apache are the creators of the spec. They only follow it. Now if you want to lobby these folks, fell free to. You never know, it may be something that is being considered and another voice may help. As for Tomcat if you start adding things that are not spec driven you open yourself up for controversy and problems down the road. Just trying to follow the spec can be a pain in itself, for each creator of a container will interpret some areas differently. Knowing that you app will run on any container because the container you run on follows the spec can be a big load off a developers mind. Although I am not one of the developers working on Tomcat, I think this is why you are seeing some of the changes that have occurred in the last year. Tomcat is moving away from non spec features and trying to tow a tighter line. NOTE: This is my opinion as an outside observer. I know the developers sound a little rude or abrupt, but remember that is many way their hands are tied. They are committed to building a reliable product that is widely accepted and compatible/comparable to other containers. To accomplish this they must do their best to follow the spec for failure to do so would result in just that, failure. I am sure there are tons of features and ideas that they would love to add, but can't because of the spec. I have spoke up, many times, in defense of the wonderful folks who spend so much of their time on Tomcat. I do this because it is one way that I can contribute back. I do this not to belittle you or anyone else, but to inform you and help you and others understand. These guys do a great job and I for one am very thankful. So if someone will write these classes, and someone will host them maybe we can get a link off the Tomcat in the FAQ section??? Just a thought. Doug - Original Message - From: Tim Funk [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, March 03, 2005 8:51 PM Subject: Re: Equivalent of Resin run-at servlet configuration run-at is an extension to web.xml that is not portable across containers. That's why it will not be implemented. -Tim Aris Javier wrote: No, meaning impossible? cause if it would be very beneficial to many then why not change the specs to accommodate such service? Pardon me, maybe because I really don't understand the specs. I was just thinking in a layman's way. Thanks Aris -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Friday, March 04, 2005 9:42 AM To: Tomcat Users List Subject: Re: Equivalent of Resin run-at servlet configuration no. (unless the spec says so) -Tim Aris Javier wrote: If this is not supported in Tomcat, is there a way or a plan to have this kind of service? This would really be a big help to many developers. Just a thought Aris -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 9:34 PM To: Tomcat Users List Subject: Re: Equivalent of Resin run-at servlet configuration I think the Cocoon project has such a facility. I'm not sure how complicated it would be to pull out that functionality, but their work might be worth looking at for this. --David Parsons Technical Services wrote: With all the questions and suggestions flying around, a question to the other programmers: If one was to write a class for the purpose of running classes at set times, what pitfalls would one need to watch for? I have a class that loads on startup and runs a continuous loop that is timed (sleeps, wakes up, does something, sleeps again). It runs fine, but I know that it could be better. Any guidance or suggestions would be appreciated. And maybe we could create an add-on and post it for use in apps that need such a device. Thanks Doug - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, March 03, 2005 6:55 AM Subject: Re: Equivalent of Resin run-at servlet configuration Subramanya Sastry wrote: Hello, I am developing a Java web application, and one of the requirements is to run a particular servlet periodically, or even at specified times. Resin provides this ability via its run-at configuration element for servlets in web.xml Example Resin configuration: servlet servlet-namedownload/servlet-name servlet-classDownloadNewsServlet/servlet-class run-at period='360m'/ /servlet However, I haven't found an equivalent configuration for Tomcat. I searched the web and was unsuccessful. So,
Tomcat 5.5.8 Postgresql 7.4.6 No suitable driver exception
Hi everybody, I'm attempting to get the JNDI Datasource How To example for Postgresql to work. Here is the URL for the example: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html After completing the listed steps the test.jsp error page reports: java.sql.SQLException: No suitable driver Here are all my configuration steps, including the files: - On Fedora Core 3 - adduser postgres - passwd postgres (set to postgres) - chown postgres /var/lib/pqsql/data - /usr/bin/initdb -D /var/lib/pgsql/data - /usr/bin/postmaster -D /var/lib/pgsql/data logfile 21 - createdb test postgres - psql test create table testdata (id int not null primary key, foo varchar(25), bar int); insert into testdata values(1, 'hello', 12345); - Update server.xml with this under the /Host tag: Resource name=jdbc/postgres auth=Container type=javax.sql.DataSource driverClassName=org.postgresql.Driver url=jdbc:postgresql://127.0.0.1:5432/mydb username=postgres password=postgres maxActive=20 maxIdle=10 maxWait=-1/ /Context cd /usr/local/jakarta-tomcat-5.5.7/common/lib - wget http://cvs.apache.org/builds/jakarta-taglibs/nightly/jakarta-taglibs-20050303.tar.gz - tar xzf jakarta-taglibs-20050303.tar.gz - mkdir /var/www/webapps/dbtest - vi /var/www/webapps/dbtest/test.jsp (I put the example code here) Here it is just in case: %@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql % %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % sql:query var=rs dataSource=jdbc/TestDB select id, foo, bar from testdata /sql:query html head titleDB Test/title /head body h2Results/h2 c:forEach var=row items=${rs.rows} Foo ${row.foo}br/ Bar ${row.bar}br/ /c:forEach /body /html - mkdir /var/www/webapps/dbtest/WEB-INF/ - vi /var/www/webapps/dbtest/WEB-INF/web.xml I have the following in web.xml web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 descriptionPostgre Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/test/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app I now copy the necessary tag libraries over to the application directory: - mkdir /var/www/webapps/dbtest/WEB-INF/lib - cp /usr/local/jakarta-tomcat-5.5.7/common/lib/jakarta-taglibs/standard/lib/jstl.jar standard.jar /var/www/webapps/dbtest/WEB-INF/lib - cp /usr/local/jakarta-tomcat-5.5.7/common/lib/jakarta-taglibs/standard/tld/* /var/www/webapps/dbtest/WEB-INF - catalina.sh run - http://localhost:8080/dbtest/test.jsp - And the console gives the following: [EMAIL PROTECTED] local]# catalina.sh run Using CATALINA_BASE: /usr/local/jakarta-tomcat-5.5.7 Using CATALINA_HOME: /usr/local/jakarta-tomcat-5.5.7 Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-5.5.7/temp Using JRE_HOME: /usr/java/jdk1.5.0 Mar 3, 2005 10:22:45 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Mar 3, 2005 10:22:45 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1106 ms Mar 3, 2005 10:22:45 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Mar 3, 2005 10:22:45 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.7 Mar 3, 2005 10:22:45 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Mar 3, 2005 10:22:46 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Mar 3, 2005 10:22:46 PM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8009 Mar 3, 2005 10:22:46 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/142 config=null Mar 3, 2005 10:22:47 PM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource Mar 3, 2005 10:22:47 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 1701 ms Mar 3, 2005 10:23:29 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: java.sql.SQLException: No suitable driver at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unknown Source) at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknown Source) at org.apache.jsp.test_jsp._jspx_meth_sql_query_0(org.apache.jsp.test_jsp:101) at org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:58) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802
Tomcat 5.5.4: Define a default application w/ Context Descriptors?
Hi All, I would like to know how to define a default application w/ Context Descriptors. On Tomcat 5.0, I could define a default application w/ a context descriptor fragment in: $CATALINA_HOME/conf/[enginename]/[hostname]/foo.xml The file foo.xml would contain this entry: Context path= docBase=c:/test/website/ However, in Tomcat 5.5.4 the context name is tied to the context descriptor filename. The path attribute is ignored. Right now, the only solution I see is to place it in the server.xmlbut that is not recommended by the Tomcat 5.5 docs. Thanks in advance for your help. // Darby - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP-Servlet tutorial
Hi, TheServerSide.com has a free pdf which should cover the jsp/servlet part. You can download it from here: http://www.theserverside.com/books/addisonwesley/ServletsJSP/index.tss For jdbc I would recommend the jdbc tutorial from Sun. Trond Venkat Radha Venkataramanan wrote: Can somebody direct me to a tutorial on jsp/servlet that pulls data from a database and displays the content via a jsp? Thanks - 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]