Re: How to map the servlet in web.xml
You have to declare every servlet with separate servlet/ element and map all of them with different url patterns: servlet servlet-namename_1/servlet-name servlet-classclass_1/servlet-class /servelt servlet servlet-namename_2/servlet-name servlet-classclass_2/servlet-class /servelt servlet servlet-namename_N/servlet-name servlet-classclass_N/servlet-class /servelt servlet-mapping servlet-namename_1/servlet-name url-patternurl_pattern_1/url-pattern /servlet-mapping servlet-mapping servlet-namename_2/servlet-name url-patternurl_pattern_2/url-pattern /servlet-mapping ... servlet-mapping servlet-namename_N/servlet-name url-patternurl_pattern_N/url-pattern /servlet-mapping You can not map several servlets on the same url pattern, cause this creates disambiguity. It is a non-deterministic aproach. And in our context (Java web application context) it is not a solvable problem :]] Khe, khe Peace, Aidas inr [EMAIL PROTECTED] wrote: Hai all, +--Root +--Web-Inf +--Classes --HelloWorld.class +--servlet +--myservlet --Myservlet.class I am using the following servlet mapping in my webApplication Deployment Descriptor web.xml, when i attempt to use /justtesting the sevlet produces the respone in Browser servlet servlet-nameHelloWorld/servlet-name servlet-classHelloWorld/servlet-class /servlet servlet-mapping servlet-nameHelloWorld/servlet-name url-pattern/justtesting/url-pattern /servlet-mapping if i want to map a Group of Servlet E.g the servlets under the folder Root/Web-Inf/Classes/servlet/ what i Should do.. Thanks for ever, inr - 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: CLIENT-CERT
Raphael Gallo wrote: It´s possible use FORM authentication and CLIENT-CERT in the same application. How can I do this ? Not sure if it works with FORM but I have done this with BASIC (through https). If the CLIENT-CERT fails the system will fallback to BASIC. I have done this by fiddling my own SSLAuthenticator (called SSLAuthenticatorOptional) into Tomcat. The main changes in short: private BasicAuthenticator secondAuth = new BasicAuthenticator(); // Authenticate the specified certificate chain principal = context.getRealm().authenticate(certs); if (principal == null) { if (debug = 1) { log( Realm.authenticate() returned false); } return secondAuth.authenticate(request, response, config); // hres.sendError(HttpServletResponse.SC_UNAUTHORIZED, //sm.getString(authenticator.unauthorized)); // return (false); } To put the SSLAuthenticatorOptional into Tomcat I have had to change the Authenticators.properties - which could done by this ant task target name=config-tomcat description=Tomcat configuration unjar src=${tomcat-server}/lib/catalina.jar dest=${tomcat-server}/classes patternset includes=org/apache/catalina/startup/Authenticators.properties/ /unjar replaceregexp file=${tomcat-server}/classes/org/apache/catalina/startup/Authenticators.properties byline=true match=CLIENT-CERT=org.apache.catalina.authenticator.SSLAuthenticator replace=CLIENT-CERT=tomcat.SSLAuthenticatorOptional/ /target --- Mario - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TC 5.0.28 error creating temporary file
Tim Funk wrote: Ant is trying to create some temporary files to compile the JSP. Ant cannot write the temp file. Somewhere in the archives or in bugzilla there was a discussion about this. -Tim I found a few hits in the archives about this but they seemed to be related to permissions for the TC install. In my case I already have a couple of webapps deployed on TC that are running just fine so is that likely to still be the case? There seems to be something about this particular app that is triggering the problem. I have been thinking that it is something in my app rather than the TC install that is causing the problem. Keep in mind that I don't have the ability to change or check permissions for the Tomcat install. However I am sure if I can go to my ISP with a concrete statement of what should be changed, and why, they would act on it. Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TC 5.0.28 error creating temporary file
Have you tried pre-compiling your JSPs before deployment? Mark -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of M.Hockings Sent: Saturday, November 27, 2004 12:59 PM To: [EMAIL PROTECTED] Subject: Re: TC 5.0.28 error creating temporary file Tim Funk wrote: Ant is trying to create some temporary files to compile the JSP. Ant cannot write the temp file. Somewhere in the archives or in bugzilla there was a discussion about this. -Tim I found a few hits in the archives about this but they seemed to be related to permissions for the TC install. In my case I already have a couple of webapps deployed on TC that are running just fine so is that likely to still be the case? There seems to be something about this particular app that is triggering the problem. I have been thinking that it is something in my app rather than the TC install that is causing the problem. Keep in mind that I don't have the ability to change or check permissions for the Tomcat install. However I am sure if I can go to my ISP with a concrete statement of what should be changed, and why, they would act on it. Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Can I send response to browser even after the doGet returned?
Why do you want to put the request in the queque? I do something similar in a messaging application that runs in the background. I have the message related matters bundled in an interface called Message that is passed to the multithreaded queque. Is there an advantage to passing the request to the queque instead of something engineered to handle that task? I guess I have Frank's question: why, why, why? ;-) Jack On Sat, 27 Nov 2004 13:28:31 +0530, Santhosh Thomas [EMAIL PROTECTED] wrote: Or, are you trying to run some long-running process and think it would be better off as it's own thread? If that's the case, you probably want to look into some sort of queueing mechanism with either status polling or some sort of callback when the task is complete. Again, more details would be helpful. No my process is not time consuming. It will finish in milliseconds and in the worst case can take a few seconds. I am not spawning a thread from each servlet request, but the request processor is another independent thread(started at web init) proecssing a queue of requests. I am only putting the request into the queue from doGet(). After putting into queue, the doGet() returns. The request processor thread then forms the response and tries to flush the output later. My experience is, sometimes I get the output in the browser, sometimes not. I thought it was a broser catching problem (I am not sure..). I cant do a polling in the servlet, bacause it will block my servlet. Has there any way to implement asynchronous request/response using servlets? thanks and regards Santhosh - Couple of things... No, I don't believe you can do anything with request/response after you exit doGet(). Well, let me amend that... you MIGHT be able to get away with it, but I wouldn't expect it to work all the time. What I mean is, once your servlet is done it's work, the container takes over again, and even if you do have a valid reference to the object, I wouldn't expect that you could make any safe assumptions about the state of that object. You might get away with it sometimes, but probably not every request. The other point I wanted to make is that there is a pretty standard rule against spawning threads to service requests. Simply stated, you aren't supposed to do it. The container is supposed to spawn threads as appropriate to service requests, and if your doing it on your own you are more or less competing with the container. Bad Things (tm) tend to happen under those circumstances. I'm not really sure what you are trying to accomplish, but I'm taking a guess that you think that by spawning the threads you will be able to handle more requests concurrently. If that's not the case, please explain you goals further. But, assuming that is correct, I think you may have a fundamental misunderstanding at work... A servlet is supposed to be thread-safe, and the reason for that is that the container will spawn as many instances of it as needed to service requests (to whatever configured limits there are of course). In other words, every request essentially has it's own thread executing your servlet, hence the need for it to be thread-safe. In other words, you spwaning threads is superfluous because the container is already doing essentially what your trying to do on your own. So, just make sure your code is thread-safe, and your fine. Or, are you trying to run some long-running process and think it would be better off as it's own thread? If that's the case, you probably want to look into some sort of queueing mechanism with either status polling or some sort of callback when the task is complete. Again, more details would be helpful. As I said, I'm making assumptions here, so I could be completely wrong! -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com Santhosh Thomas wrote: Hi I know this is a basic question. I am passing the request and response object to another thread from the doGet() and after that the Get method returns. So that the processing is done in the thread and response to client will be flushed later. But by that time the servlet method would have returned. My question is, is it possible to flush the output to the client even after the servlet method returned (or response is commited) by tomcat. I am not talking about any server push but it is a simple http question. If http does not support this, how can I implement this? can i do this by extending the generic servlet instead of HttpServlet? Any help is greatly appreciated thanks and regards Boolee -- You can't wake a person who is pretending to be asleep. ~Native Proverb~ Each man is good in His sight. It is not necessary for eagles to be crows. ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
RES: [work] CLIENT-CERT
Hi, The questions are: 1. Is it possible to use two authentication methods (FORM and CLIENT_CERT) in the same J2EE application? 2. If so, how could we do it in Tomcat 5.0.19? Thanks in advance! Paulo Alvim/Raphael Powerlogic - Brazil -Mensagem original- De: Raphael Gallo [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 26 de novembro de 2004 17:44 Para: Tomcat Users List Assunto: [work] CLIENT-CERT Hi, It´s possible use FORM authentication and CLIENT-CERT in the same application. How can I do this ? Thanks, Raphael Gallo [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: TC 5.0.28 error creating temporary file
http://issues.apache.org/bugzilla/show_bug.cgi?id=19765 Tomcat uses Ant to do a compile. Ant creates a temp file to assist in compliation. I am guessing the tempdir is not set correctly. (or something similar) -Tim M.Hockings wrote: Tim Funk wrote: Ant is trying to create some temporary files to compile the JSP. Ant cannot write the temp file. Somewhere in the archives or in bugzilla there was a discussion about this. -Tim I found a few hits in the archives about this but they seemed to be related to permissions for the TC install. In my case I already have a couple of webapps deployed on TC that are running just fine so is that likely to still be the case? There seems to be something about this particular app that is triggering the problem. I have been thinking that it is something in my app rather than the TC install that is causing the problem. Keep in mind that I don't have the ability to change or check permissions for the Tomcat install. However I am sure if I can go to my ISP with a concrete statement of what should be changed, and why, they would act on it. Mike - 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]
Automated reply from bulletproof@www.bulletproofsoft.com
BulletProofSoft.com Support Ticket Reply. DO NOT REPLY TO THIS EMAIL Please use our Online Support system for faster results to your questions. You can monitor the status of your ticket online where you can add follow up replies. http://www.bulletproofsoft.com/cgi-bin/custquest/quest_desk.cgi If the URL above splits into two lines, please visit: http://www.bulletproofsoft.com/support.html and click on the Contact Customer Support link Rest assured we will do our best to respond to your query promptly. You will receive a further email notification when one of our technicians has replied. Tech Support BulletProofSoft.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I send response to browser even after the doGet returned?
Santhosh Thomas wrote: Or, are you trying to run some long-running process and think it would be better off as it's own thread? If that's the case, you probably want to look into some sort of queueing mechanism with either status polling or some sort of callback when the task is complete. Again, more details would be helpful. No my process is not time consuming. It will finish in milliseconds and in the worst case can take a few seconds. I am not spawning a thread from each servlet request, but the request processor is another independent thread(started at web init) proecssing a queue of requests. I am only putting the request into the queue from doGet(). After putting into queue, the doGet() returns. The request processor thread then forms the response and tries to flush the output later. My experience is, sometimes I get the output in the browser, sometimes not. I thought it was a broser catching problem (I am not sure..). I cant do a polling in the servlet, bacause it will block my servlet. Has there any way to implement asynchronous request/response using servlets? thanks and regards Santhosh - Couple of things... No, I don't believe you can do anything with request/response after you exit doGet(). Well, let me amend that... you MIGHT be able to get away with it, but I wouldn't expect it to work all the time. What I mean is, once your servlet is done it's work, the container takes over again, and even if you do have a valid reference to the object, I wouldn't expect that you could make any safe assumptions about the state of that object. You might get away with it sometimes, but probably not every request. The other point I wanted to make is that there is a pretty standard rule against spawning threads to service requests. Simply stated, you aren't supposed to do it. The container is supposed to spawn threads as appropriate to service requests, and if your doing it on your own you are more or less competing with the container. Bad Things (tm) tend to happen under those circumstances. I'm not really sure what you are trying to accomplish, but I'm taking a guess that you think that by spawning the threads you will be able to handle more requests concurrently. If that's not the case, please explain you goals further. But, assuming that is correct, I think you may have a fundamental misunderstanding at work... A servlet is supposed to be thread-safe, and the reason for that is that the container will spawn as many instances of it as needed to service requests (to whatever configured limits there are of course). In other words, every request essentially has it's own thread executing your servlet, hence the need for it to be thread-safe. In other words, you spwaning threads is superfluous because the container is already doing essentially what your trying to do on your own. So, just make sure your code is thread-safe, and your fine. Or, are you trying to run some long-running process and think it would be better off as it's own thread? If that's the case, you probably want to look into some sort of queueing mechanism with either status polling or some sort of callback when the task is complete. Again, more details would be helpful. As I said, I'm making assumptions here, so I could be completely wrong! Why can't you just perform your work? The request processor already has your request at the time of doGet. If you are not using multi-threading to perform some special type of task then you should have no problem. It sounds like you haven't used servlets and jsp's very much because if you are simply building the return to a get request you just perform your work from your servlet method doGet or doPost and that is really all there is to it. It shouldn't be any more complicated than that other than maybe something like...if variable this then do this...hand off to another class to process and add to the request or you use another framework that handles passing the request to the correct method depending on some form variable or something like that. That's it.you shouldn't be appending to the request queue yourself as that is already done for you by tomcat. Standard jsp/servlet container operation. Wade - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I send response to browser even after the doGet returned?
Has there any way to implement asynchronous request/response using servlets? Not directly. What you can do though is submit the request from the browser, put some operation in a queue and return immediately with a page that will call another servlet (or the same one, either way) to poll for the status of the queued operation. There are packages out there to do such things without you having to build the functionality, but it's not a big deal to build it either. The bottom line though is that once your servlet completes, you cannot guarantee access to the request/response because the container will do what it will do with it. That's almost certainly why, as you say yourself, sometimes you get a response and sometimes you don't. The times you do is when your process finished before the container finished with the response, so you just got lucky, timing-wise. Just queue the operation and let the browser poll for the status. You don't have to show anything to the user that you don't want to either... Use a frameset. In the main frame where the form is submitted from, just show a Please Wait message (as returned when the request was queued). Then have a hidden frame that does the polling and updates the main frame when it's done. That way, the user will just continue to see Please Wait until your ready for them to see something different. Remember that anything asychronous pretty much boils down to two possible approaches: callbacks and polling. You could do either (callback to an applet for instance), but polling is probably easier. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com Dakota Jack wrote: Why do you want to put the request in the queque? I do something similar in a messaging application that runs in the background. I have the message related matters bundled in an interface called Message that is passed to the multithreaded queque. Is there an advantage to passing the request to the queque instead of something engineered to handle that task? I guess I have Frank's question: why, why, why? ;-) Jack On Sat, 27 Nov 2004 13:28:31 +0530, Santhosh Thomas [EMAIL PROTECTED] wrote: Or, are you trying to run some long-running process and think it would be better off as it's own thread? If that's the case, you probably want to look into some sort of queueing mechanism with either status polling or some sort of callback when the task is complete. Again, more details would be helpful. No my process is not time consuming. It will finish in milliseconds and in the worst case can take a few seconds. I am not spawning a thread from each servlet request, but the request processor is another independent thread(started at web init) proecssing a queue of requests. I am only putting the request into the queue from doGet(). After putting into queue, the doGet() returns. The request processor thread then forms the response and tries to flush the output later. My experience is, sometimes I get the output in the browser, sometimes not. I thought it was a broser catching problem (I am not sure..). I cant do a polling in the servlet, bacause it will block my servlet. Has there any way to implement asynchronous request/response using servlets? thanks and regards Santhosh - Couple of things... No, I don't believe you can do anything with request/response after you exit doGet(). Well, let me amend that... you MIGHT be able to get away with it, but I wouldn't expect it to work all the time. What I mean is, once your servlet is done it's work, the container takes over again, and even if you do have a valid reference to the object, I wouldn't expect that you could make any safe assumptions about the state of that object. You might get away with it sometimes, but probably not every request. The other point I wanted to make is that there is a pretty standard rule against spawning threads to service requests. Simply stated, you aren't supposed to do it. The container is supposed to spawn threads as appropriate to service requests, and if your doing it on your own you are more or less competing with the container. Bad Things (tm) tend to happen under those circumstances. I'm not really sure what you are trying to accomplish, but I'm taking a guess that you think that by spawning the threads you will be able to handle more requests concurrently. If that's not the case, please explain you goals further. But, assuming that is correct, I think you may have a fundamental misunderstanding at work... A servlet is supposed to be thread-safe, and the reason for that is that the container will spawn as many instances of it as needed to service requests (to whatever configured limits there are of course). In other words, every request essentially has it's own thread executing your servlet, hence the need for it to be thread-safe. In other words, you spwaning threads is
which to use: JK2 or JK?
Hi, I am installing an apache + JBoss/tomcat and I need to run the JK module. Now I understand that the JK2 is no longer supported so does it mean that it would be better using JK1.2? Thanks, Erez
Tomcat classloader fails to load manager app
Hi, Tomcat 5.0.28, Windows XP install from exe. After deploying Jakarta Slide(2.1), the Tomcat manager and balancer applications fail during loading. It fails because something get broken in Tomcat's class loader/classpath. However Tomcat Admin application still works. I tried to reinstall Tomcat and re-deploy, it's always the same result. You can have Slide or Tomcat manager but not both at the same time. I Can't figure out what exactly get broken in configuration. If I copy all JARs from Tomcat/server/lib to Tomcat/common/lib then it works. But it's not the right way isn't it. Here is output: 2004-11-27 20:35:47 StandardContext[/manager]Marking servlet default as unavailable 2004-11-27 20:35:47 StandardContext[/manager]Error loading WebappClassLoader delegate: false repositories: -- Parent Classloader: StandardClassLoader delegate: true repositories: file:C:\Tomcat5.0\shared\classes\ -- Parent Classloader: StandardClassLoader delegate: true repositories: file:C:\Tomcat5.0\common\classes\ file:C:\Tomcat5.0\common\endorsed\xercesImpl.jar file:C:\Tomcat5.0\common\endorsed\xml-apis.jar file:C:\Tomcat5.0\common\lib\ant-launcher.jar file:C:\Tomcat5.0\common\lib\ant.jar file:C:\Tomcat5.0\common\lib\commons-collections-3.1.jar file:C:\Tomcat5.0\common\lib\commons-dbcp-1.2.1.jar file:C:\Tomcat5.0\common\lib\commons-el.jar file:C:\Tomcat5.0\common\lib\commons-pool-1.2.jar file:C:\Tomcat5.0\common\lib\jasper-compiler.jar file:C:\Tomcat5.0\common\lib\jasper-runtime.jar file:C:\Tomcat5.0\common\lib\jsp-api.jar file:C:\Tomcat5.0\common\lib\naming-common.jar file:C:\Tomcat5.0\common\lib\naming-factory.jar file:C:\Tomcat5.0\common\lib\naming-java.jar file:C:\Tomcat5.0\common\lib\naming-resources.jar file:C:\Tomcat5.0\common\lib\servlet-api.jar file:C:\Tomcat5.0\common\lib\tools.jar -- Parent Classloader: [EMAIL PROTECTED] org.apache.catalina.servlets.DefaultServlet java.lang.ClassNotFoundException: org.apache.catalina.servlets.DefaultServlet at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189) . 2004-11-27 20:35:48 StandardContext[/manager]Servlet /manager threw load() exception javax.servlet.ServletException: Wrapper cannot find servlet class org.apache.catalina.servlets.DefaultServlet or a class it depends on at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:974) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862) Root Cause - java.lang.ClassNotFoundException: org.apache.catalina.servlets.DefaultServlet at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340) How do I fix that? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mysql: Cannot create JDBC driver
Hello everybody. I am writting you because I get this exception ramdonly, I mean, sometimes happends, sometimes does not. javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) at org.apache.jsp.index_jsp._jspService(index_jsp.java:73) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:305) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644) at java.lang.Thread.run(Thread.java:534) I am using MySql 4.0.20a and the driver jar file is mysql-connector-java-3.0.14.jar, here you have my xml files: Server.xml: (...) Context path=/bankApp1 docBase=bankApp1 debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_bankApp1_log. suffix=.txt timestamp=true/ Resource name=jdbc/bankApp1 auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/bankApp1 parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxIdle/name value3/value /parameter parameter namemaxWait/name value20/value /parameter parameter nameusername/name
RE: Mysql: Cannot create JDBC driver
Carlos, did you check that the MySQL driver is in the path? -Original Message- From: Carlos Bracho [mailto:[EMAIL PROTECTED] Sent: Saturday, November 27, 2004 4:58 PM To: Tomcat Users List Subject: Mysql: Cannot create JDBC driver Hello everybody. I am writting you because I get this exception ramdonly, I mean, sometimes happends, sometimes does not. javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI mpl.java:825) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:758) at org.apache.jsp.index_jsp._jspService(index_jsp.java:73) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 98) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:157) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter .java:305) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:702) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:644) at java.lang.Thread.run(Thread.java:534) I am using MySql 4.0.20a and the driver jar file is mysql-connector-java-3.0.14.jar, here you have my xml files: Server.xml: (...) Context path=/bankApp1 docBase=bankApp1 debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_bankApp1_log. suffix=.txt timestamp=true/ Resource name=jdbc/bankApp1 auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/bankApp1 parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxIdle/name value3/value /parameter parameter namemaxWait/name
Re: Mysql: Cannot create JDBC driver
You may want to remove autoReconnect=true from this and see if you still observe same: valuejdbc:mysql://localhost:3306/bankapp1?autoReconnect=true/value --- Carlos Bracho [EMAIL PROTECTED] wrote: Hello everybody. I am writting you because I get this exception ramdonly, I mean, sometimes happends, sometimes does not. javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) at org.apache.jsp.index_jsp._jspService(index_jsp.java:73) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:305) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644) at java.lang.Thread.run(Thread.java:534) I am using MySql 4.0.20a and the driver jar file is mysql-connector-java-3.0.14.jar, here you have my xml files: Server.xml: (...) Context path=/bankApp1 docBase=bankApp1 debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_bankApp1_log. suffix=.txt timestamp=true/ Resource name=jdbc/bankApp1 auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/bankApp1 parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxIdle/name value3/value /parameter parameter namemaxWait/name