byte serving PDF with Tomcat 5.0.27
Hello all, I'm running Tomcat 5.0.27 on Linux, and need to know if this version of Tomcat supports byte serving and how to determine if it's working. If anyone can provide any help, I'd greatly appreciate it! Thank you, Shawn Maceno - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: byte serving PDF with Tomcat 5.0.27
Thanks for the quick reply. I think I need a little more hand-holding on this one, not being the Tomcat genius... Can you provide some kind of example that shows where the content-type setting is and what it needs to be? Thanks again, Shawn Maceno On Wed, 2005-09-28 at 18:52 +0200, Jilles van Gurp wrote: Sure, just set the content-type and stream some bytes. As far as I know this applies to all versions of tomcat too. Jilles Maceno, Shawn wrote: Hello all, I'm running Tomcat 5.0.27 on Linux, and need to know if this version of Tomcat supports byte serving and how to determine if it's working. If anyone can provide any help, I'd greatly appreciate it! Thank you, Shawn Maceno - 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: Servlet gateway to legacy cgi application
Steve, I've developed servlet-based webapps for several years, I've written servlet filters and implemented many various types of authentication mechanisms, and I've also done request forwarding within an application. I was hoping to implement something similar to request forwarding, but according to Sun, Requests may be forwarded only to components within the same application context root, never between applications. I have to think however that there must be a way to accomplish this. This need has never arisen for me either, so I would not be surprised to find there may be something within the servlet API or within the Tomcat container itself which with I am not familiar. Any thoughts? Thanks, Shawn Quoting Steve Kirk [EMAIL PROTECTED]: I'm not personally aware of anything already built in to TC that specifically handles request, although having said that I haven't really ever had the need for it. However I think that the standard features of TC will probably make this quite straightforward to do. Have you written Java and/or Servlets before, and how much do you know already about servlets with respect to: Filters authentication request forwarding -Original Message- From: Shawn Church [mailto:[EMAIL PROTECTED] Sent: Thursday 28 October 2004 03:58 To: [EMAIL PROTECTED] Subject: Servlet gateway to legacy cgi application I am planning to migrate an old cgi (actually iSeries/AS/400 Net.DATA) application to Java, but in the meantime I would like to create a servlet-based gateway to the application, so that all requests are filtered through this gateway prior to being forwarded to the cgi application. Likewise, all responses should flow back through the servlet. I would also like to use Apache as the web server. I have no problem integrating Apache and Tomcat, but I'm not sure of the best method of sitting in front of the cgi app. I am needing to do this to integrate security with other Java apps (running on other servers), and it would be convenient if I could develop a gateway app to filter requests to the cgi application. I would appreciate some pointers on how to approach this. I would prefer to handle this in my own custom servlet, but if there is something already built into Tomcat I would like to know about it. Thanks, Shawn - 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: Servlet gateway to legacy cgi application
I initially looked at CGIServlet, but I run the Apache http server, rather than using Tomcat's implementation. I also need to implement my own functionality (primarily for user authentication). But yes, this is close to what I'm after. I'm sure I can roll my own, but it would be nice to find an existing solution. I just googled cgiservlet, and this may yield something useful. I will let you know. Thanks, Shawn Quoting Mike Curwen [EMAIL PROTECTED]: Maybe it's too obvious to say ... but does the cgi servlet (that comes with Tomcat) fit your needs ? http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cgi-howto.html -Original Message- From: Shawn Church [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 27, 2004 9:58 PM To: [EMAIL PROTECTED] Subject: Servlet gateway to legacy cgi application I am planning to migrate an old cgi (actually iSeries/AS/400 Net.DATA) application to Java, but in the meantime I would like to create a servlet-based gateway to the application, so that all requests are filtered through this gateway prior to being forwarded to the cgi application. Likewise, all responses should flow back through the servlet. I would also like to use Apache as the web server. I have no problem integrating Apache and Tomcat, but I'm not sure of the best method of sitting in front of the cgi app. I am needing to do this to integrate security with other Java apps (running on other servers), and it would be convenient if I could develop a gateway app to filter requests to the cgi application. I would appreciate some pointers on how to approach this. I would prefer to handle this in my own custom servlet, but if there is something already built into Tomcat I would like to know about it. Thanks, Shawn - 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]
Servlet gateway to legacy cgi application
I am planning to migrate an old cgi (actually iSeries/AS/400 Net.DATA) application to Java, but in the meantime I would like to create a servlet-based gateway to the application, so that all requests are filtered through this gateway prior to being forwarded to the cgi application. Likewise, all responses should flow back through the servlet. I would also like to use Apache as the web server. I have no problem integrating Apache and Tomcat, but I'm not sure of the best method of sitting in front of the cgi app. I am needing to do this to integrate security with other Java apps (running on other servers), and it would be convenient if I could develop a gateway app to filter requests to the cgi application. I would appreciate some pointers on how to approach this. I would prefer to handle this in my own custom servlet, but if there is something already built into Tomcat I would like to know about it. Thanks, Shawn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ENCTYPE + SetCharacterEncodingFilter = no go joe for Tomcat 5.0.28
Hello, When using ENCTYPE=multipart/form-data in a form on a jsp page, text sent ignores the SetCharacterEncodingFilter which is calling request.setCharacterEncoding(UTF-8); I thought about getting parameter values by using String field = request.getParameter(whatever); field=new String(field.getBytes (UTF-8)); Does this seem a reasonable approach or is should the SetCharacterEncodingFilter *really* be setting the charEncoding? I don't want to be creating a new string for every parameter unless necessary. When ENCTYPE is not set, all works as expected. This problem is seen on Tomcat 5.0.28, but not 4.x versions. I understand something changed around 5.0.27 for UTF-8 handeling but am not sure if that is realated. -- Shawn [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Tomcat Clusterin Multicast Multiinstances
Hello, This thread hijacked the original about Clustering. For courtesy to others trying to follow the original thread, it would be appreciated if you would start an original thread under your topic. Not only that, but trimming the unneeded context is nice as well. Please note: I am not any kind of moderator and my opinion carries no offical weight but am a open source developer who does a great deal of work through mailing lists and appreciates it when people follow common courtesy. hijacking Can any one quickly tell the comparison of running tomcat as a service or without a windows service. I mean what are the benifits of running tomcat as a windows service. S H A K E E L A H M A D hijacking -- Shawn Karma is immutable, so act accordingly! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Solaris9/Tomcat406-Apache2.0.43 not redirecting
Apache and tomcat are working on there own independently. Mod_jk.so compiled cleanly. when I try to do the redirect I get the following in my mod_jk.log. I don't get error in any of my other logs. Any idea's what is going on? Thanks, Shawn Pate Technology Consultant [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Solaris9/Tomcat406-Apache2.0.43 not redirecting
sorry about that. the log got stripped because I sent it as an attachment here it is [Tue Jun 29 09:48:10 2004] [jk_uri_worker_map.c (486)]: Into jk_uri_worker_map_t::map_uri_to_worker [Tue Jun 29 09:48:10 2004] [jk_uri_worker_map.c (500)]: Attempting to map URI '/cgi-lawson/printenv.exe' [Tue Jun 29 09:48:10 2004] [jk_uri_worker_map.c (618)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match [Tue Jun 29 09:48:15 2004] [jk_uri_worker_map.c (486)]: Into jk_uri_worker_map_t::map_uri_to_worker [Tue Jun 29 09:48:15 2004] [jk_uri_worker_map.c (500)]: Attempting to map URI '/cgi-lawson/printenv.exe' [Tue Jun 29 09:48:15 2004] [jk_uri_worker_map.c (618)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match [Tue Jun 29 11:37:45 2004] [jk_uri_worker_map.c (486)]: Into jk_uri_worker_map_t::map_uri_to_worker [Tue Jun 29 11:37:45 2004] [jk_uri_worker_map.c (500)]: Attempting to map URI '/index.html' [Tue Jun 29 11:37:45 2004] [jk_uri_worker_map.c (618)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match [Tue Jun 29 11:37:45 2004] [jk_uri_worker_map.c (486)]: Into jk_uri_worker_map_t::map_uri_to_worker [Tue Jun 29 11:37:45 2004] [jk_uri_worker_map.c (500)]: Attempting to map URI '/index.html' [Tue Jun 29 11:37:45 2004] [jk_uri_worker_map.c (618)]: jk_uri_worker_map_t::mp_uri_to_worker, done without a match Shawn Pate Technology Consultant [EMAIL PROTECTED] [EMAIL PROTECTED] 06/29/2004 10:09 AM Please respond to Tomcat Users List [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject Solaris9/Tomcat406-Apache2.0.43 not redirecting Apache and tomcat are working on there own independently. Mod_jk.so compiled cleanly. when I try to do the redirect I get the following in my mod_jk.log. I don't get error in any of my other logs. Any idea's what is going on? Thanks, Shawn Pate Technology Consultant [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk hangs
Just yesterday we started running into problems requesting pages on our production website through mod_jk. Previously everything had been working fine for months. Essentially what happens is when you request the page for the first time (doesn't seem to matter what browser you're using) the browser just sits and spins. Then after hitting refresh (Ctrl+R) a couple times it finally comes up. Subsequent visits to the same page continue to work for me in Mozilla but after closing IE and reopening it after a couple more requests it hangs again. In case it helps, the site in question is http://www.atmreports.com. I simply cannot figure out what is going on. I do see many errors in the mod_jk.log, but these had been there before when everything worked fine too: [Wed May 05 09:27:46 2004] [jk_ajp_common.c (1137)]: Error reading reply from tomcat. Tomcat is down or network problems. [Wed May 05 09:27:46 2004] [jk_ajp_common.c (1290)]: ERROR: Receiving from tomcat failed, recoverable operation. err=0 [Wed May 05 09:27:46 2004] [jk_ajp_common.c (1309)]: sending request to tomcat failed in send loop. err=0 [Wed May 05 09:27:46 2004] [jk_ajp_common.c (738)]: ERROR: can't receive the response message from tomcat, network problems or tomcat is down. err=-1 A few things to note, any of which may contribute to the problem but for the life of me I can't figure out how: 1. On Friday we just moved out datacenter to a new location. However we see this problem even internally at the location so I don't believe it is any sort of routing issue (and the problem didn't start until Tuesday). 2. The clock on this webserver was many hours off. On Tuesday (yes, the day the problems started) the clock was synchronized and the timezone correctly set so the machine now has correct time. This seems to be the most probable cause simply because it happened around the same time, but I just can't understand why or how. 3. Yesterday we rebooted the box to see if that would help. It did. We didn't have any more problems at all that day until this morning we see the problems again. Today we recycled just tomcat and that seems to have fixed it as well, though I expect that by tomorrow I will see the problem again. 4. I wouldn't think this could have anything to do with that new Sasser worm, but listing that just in case. The machine is running Linux kernel 2.4.20-8 with httpd-2.0.40-21 and jakarta-tomcat-5.0.18. We are running 4 instances of tomcat on the box, each started with the following JVM options: -Xmn128M -Xmx1024M -Djava.awt.headless=true Nothing having to do with configuration has changed at all in a long time. Here is the relevant configuration sections: # Mod_jk (Tomcat connector) LoadModule jk_module modules/mod_jk.so IfModule mod_jk.c JkWorkersFile /etc/httpd/conf/workers.properties JkLogFile /var/log/httpd/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat %w %V %T /IfModule ...and later (in a VirtualHost section)... JKMount /myreports balancer JKMount /myreports/* balancer Here is our workers.properties file (comments removed): workers.java_home=/usr/java/j2sdk1.4.2_03 ps=/ worker.list=balancer worker.ajp13_0.port=8090 worker.ajp13_0.host=localhost worker.ajp13_0.type=ajp13 worker.ajp13_0.lbfactor=1 worker.ajp13_1.port=8091 worker.ajp13_1.host=localhost worker.ajp13_1.type=ajp13 worker.ajp13_1.lbfactor=1 worker.ajp13_2.port=8092 worker.ajp13_2.host=localhost worker.ajp13_2.type=ajp13 worker.ajp13_2.lbfactor=1 worker.ajp13_3.port=8093 worker.ajp13_3.host=localhost worker.ajp13_3.type=ajp13 worker.ajp13_3.lbfactor=1 worker.balancer.type=lb worker.balancer.balanced_workers=ajp13_0, ajp13_1, ajp13_2, ajp13_3 worker.balancer.sticky_session=1 Any help would be greatly appreciated! Thanks, -shawn -- Shawn Wilson [EMAIL PROTECTED] Software Developer, ATMReports.com PH: 877-327-0873, FAX: 406-294-5806 smime.p7s Description: S/MIME Cryptographic Signature
Re: mod_jk hangs
Okay, here is the section from our server.xml in production: Service name=Catalina Connector port=8080 / !-- This is here for compatibility only, not required -- Connector port=8090 protocol=AJP/1.3 / Engine name=Catalina defaultHost=localhost jvmRoute=ajp13_0 Logger className=org.apache.catalina.logger.FileLogger / Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase / Host name=localhost appBase=webapps / /Engine /Service I thought it interesting the comment that this is here for compatibility only, not required. It sounds to me that connector is required if I want AJP/1.3 isn't it? I can't remember if that comment was there or if I (mistakingly) added it. Anyways, I see that I could probably do well to add the minSpareThreads and maxSpareThreads parameters. Any idea where I should look in my httpd.conf file to see what values to set these to? Thanks, -shawn Randall Svancara wrote: You might want to check to make sure you have enough tomcat threads for each apache thread. I usually give tomcat a few more threads than apache just to make sure I do not run out. ---snip !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 debug=0 minSpareThreads=100 maxSpareThreads=300 protocol=AJP/1.3 / ---snip So you might want to increase min and max spare threads to accomodate more requestes from apache to tomcat via mod_jk. Randall -Original Message- From: Shawn Wilson [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 05, 2004 9:50 AM To: [EMAIL PROTECTED] Subject: mod_jk hangs Just yesterday we started running into problems requesting pages on our production website through mod_jk. Previously everything had been working fine for months. Essentially what happens is when you request the page for the first time (doesn't seem to matter what browser you're using) the browser just sits and spins. Then after hitting refresh (Ctrl+R) a couple times it finally comes up. Subsequent visits to the same page continue to work for me in Mozilla but after closing IE and reopening it after a couple more requests it hangs again. In case it helps, the site in question is http://www.atmreports.com. I simply cannot figure out what is going on. I do see many errors in the mod_jk.log, but these had been there before when everything worked fine too: [Wed May 05 09:27:46 2004] [jk_ajp_common.c (1137)]: Error reading reply from tomcat. Tomcat is down or network problems. [Wed May 05 09:27:46 2004] [jk_ajp_common.c (1290)]: ERROR: Receiving from tomcat failed, recoverable operation. err=0 [Wed May 05 09:27:46 2004] [jk_ajp_common.c (1309)]: sending request to tomcat failed in send loop. err=0 [Wed May 05 09:27:46 2004] [jk_ajp_common.c (738)]: ERROR: can't receive the response message from tomcat, network problems or tomcat is down. err=-1 A few things to note, any of which may contribute to the problem but for the life of me I can't figure out how: 1. On Friday we just moved out datacenter to a new location. However we see this problem even internally at the location so I don't believe it is any sort of routing issue (and the problem didn't start until Tuesday). 2. The clock on this webserver was many hours off. On Tuesday (yes, the day the problems started) the clock was synchronized and the timezone correctly set so the machine now has correct time. This seems to be the most probable cause simply because it happened around the same time, but I just can't understand why or how. 3. Yesterday we rebooted the box to see if that would help. It did. We didn't have any more problems at all that day until this morning we see the problems again. Today we recycled just tomcat and that seems to have fixed it as well, though I expect that by tomorrow I will see the problem again. 4. I wouldn't think this could have anything to do with that new Sasser worm, but listing that just in case. The machine is running Linux kernel 2.4.20-8 with httpd-2.0.40-21 and jakarta-tomcat-5.0.18. We are running 4 instances of tomcat on the box, each started with the following JVM options: -Xmn128M -Xmx1024M -Djava.awt.headless=true Nothing having to do with configuration has changed at all in a long time. Here is the relevant configuration sections: # Mod_jk (Tomcat connector) LoadModule jk_module modules/mod_jk.so IfModule mod_jk.c JkWorkersFile /etc/httpd/conf/workers.properties JkLogFile /var/log/httpd/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat %w %V %T /IfModule ...and later (in a VirtualHost section)... JKMount /myreports balancer JKMount /myreports/* balancer Here is our workers.properties file (comments
Re: mod_jk hangs
Looks like the maximum for everyting in my config was 150 so I'll try setting maxSpareThreads for Tomcat to 150 as well. If this is indeed the cause of the problem, any idea why it would just start happening yesterday after months without problem? My only guess is that perhaps we just happened to reach some threshold of traffic yesterday that we never did before. Actually, that may indeed be the case since we usually get a surge of traffic during the beginning of a month. Thanks, -shawn Randall Svancara wrote: Well, that depends on what platform and how apache was compiled. As I understand on windows, apache uses the mpm modules and unix it uses forking or it can use mpm. You need to find the section for you platform and make the ajustments as neccessary. Below is the section where you need to look in your apache configuration file, usually called httpd.conf, but i have seen them named apache.conf (gentoo anyone). But you can see the min and max spare servers/threads listed in each section. Just adjust accordingly. I hope this helps. IfModule prefork.c StartServers 75 MinSpareServers 75 MaxSpareServers 300 MaxClients 300 MaxRequestsPerChild 0 /IfModule # worker MPM # StartServers: initial number of server processes to start # MaxClients: maximum number of simultaneous client connections # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadsPerChild: constant number of worker threads in each server process # MaxRequestsPerChild: maximum number of requests a server process serves IfModule worker.c StartServers 75 MaxClients 300 MinSpareThreads 75 MaxSpareThreads 300 ThreadsPerChild 25 MaxRequestsPerChild 0 /IfModule # perchild MPM # NumServers: constant number of server processes # StartThreads: initial number of worker threads in each server process # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # MaxThreadsPerChild: maximum number of worker threads in each server process # MaxRequestsPerChild: maximum number of connections per server process IfModule perchild.c NumServers 75 StartThreads 75 MinSpareThreads 75 MaxSpareThreads 300 MaxThreadsPerChild 20 MaxRequestsPerChild 0 /IfModule # WinNT MPM # ThreadsPerChild: constant number of worker threads in the server process # MaxRequestsPerChild: maximum number of requests a server process serves IfModule mpm_winnt.c ThreadsPerChild 250 MaxRequestsPerChild 0 /IfModule -Original Message- From: Shawn Wilson [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 05, 2004 10:21 AM To: Tomcat Users List Subject: Re: mod_jk hangs Okay, here is the section from our server.xml in production: Service name=Catalina Connector port=8080 / !-- This is here for compatibility only, not required -- Connector port=8090 protocol=AJP/1.3 / Engine name=Catalina defaultHost=localhost jvmRoute=ajp13_0 Logger className=org.apache.catalina.logger.FileLogger / Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase / Host name=localhost appBase=webapps / /Engine /Service I thought it interesting the comment that this is here for compatibility only, not required. It sounds to me that connector is required if I want AJP/1.3 isn't it? I can't remember if that comment was there or if I (mistakingly) added it. Anyways, I see that I could probably do well to add the minSpareThreads and maxSpareThreads parameters. Any idea where I should look in my httpd.conf file to see what values to set these to? Thanks, -shawn Randall Svancara wrote: You might want to check to make sure you have enough tomcat threads for each apache thread. I usually give tomcat a few more threads than apache just to make sure I do not run out. ---snip !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 debug=0 minSpareThreads=100 maxSpareThreads=300 protocol=AJP/1.3 / ---snip So you might want to increase min and max spare threads to accomodate more requestes from apache to tomcat via mod_jk. Randall -Original Message- From: Shawn Wilson [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 05, 2004 9:50 AM To: [EMAIL PROTECTED] Subject: mod_jk hangs Just yesterday we started running into problems requesting pages on our production website through mod_jk. Previously everything had been working fine for months. Essentially what happens is when you request the page for the first time (doesn't seem to matter what browser you're using) the browser just sits and spins. Then after hitting refresh (Ctrl+R) a couple times it finally comes up
tomcat jk1.2 connector and IIS logging
Hello, I am using Tomcat-4.1.29 and the jk1.2 connector (isapi_redirect.dll) to interface with IIS 6. Everything works wonderfully, except that IIS logs the cs-uri-stem as the redirect dll (/jakarta/isapi_redirect.dl). Is it possible to log the actual redirected URL (i.e index.jsp)? Without the actual URL the IIS logs are pretty much useless. Current Log Entry: * 2004-03-29 00:12:53 555.55.55.555- GET /jakarta/isapi_redirect.dll - 200 22464 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0;+.NET+CLR+1.0.3705;+.N ET+CLR+1.1.4322) GUID=xx----x;+rdm%5Fv3=1;+UserID=http://x xx.x.com/xxx.jsp http://xxx.x.com/xxx.jsp Wanted Log Entry (/index.jsp): * 2004-03-29 00:12:53 555.55.55.555- GET /index.jsp- 200 22464 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0;+.NET+CLR+1.0.3705;+.N ET+CLR+1.1.4322) GUID=xx----x;+rdm%5Fv3=1;+UserID=http://x xx.x.com/xxx.jsp http://xxx.x.com/xxx.jsp Thanks in Advance, Shawn
Tomcat for FreeBSD
Tomcat Gurus: Is their a *current* version of Java/Tomcat that been assembled for FreeBSD 5.0? Shawn Zernik Internetwork Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat w Java1.5 beta problem
Hello, Under Tomcat 5.0.18 with servlets compiled with 1.5 beta, I get an odd message, and the servlet won't load. When the same servlet is compiled with 1.4.2 it runs fine. The method signature in the following message is correct. There is simple nothing to complain about. Is this a problem with Tomcat or Java sdk1.5. Where is the best place to report this to? No, I have not altertered my common/endorsed jars 2004-02-09 12:00:13 StandardContext[/midp]Servlet /midp threw load() exception ... - Root Cause - java.lang.VerifyError: (class: com/koyuru/midp/servlets/LessonDownload, method: compareAvailableToOnHandset signature: (Ljava/util/Vector;Ljava/util/Vector;)[Ljava/lang/String;) Incompatible object argument for function call at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:1873) at java.lang.Class.getConstructor0(Class.java:2185) at java.lang.Class.newInstance0(Class.java:293) at java.lang.Class.newInstance(Class.java:275) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1002) Shawn Happily using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat w Java1.5 beta problem
I suggest rebuilding tomcat with 1.5 beta if you want to run servlets compiled using 1.5 beta. I'm not even sure my suggestion will work, as I haven't tried it myself. There has not been a tomcat release declared to support JDK 1.5 yet, although you're welcome to do building and testing for us ;) The problem I had, I think, is that my method used an Enumeration and under 1.5 enum is a new keyword but jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper used enum many places as an identifier, as do some classes in org.apache.tomcat.util.compat -- Shawn Happily using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: MOD JK NOT SUCESSFUL
Hey: After playing with it for some time, I found the following VERY useful (http://www.gregoire.org/howto/Apache2_Jk2_TC4.1.x_JSDK1.4.x.html). It's probably a run of the mill solution, but I'm not complaining for development perposes. I followed these directions and am using Tomcat throug socks, not JNI. That means tomcat needs to be running, and your workers2.properties would look something like this: = [logger] level=DEBUG [config:] file=c:/Apache2/conf/workers2.properties debug=0 debugEnv=0 [uriMap:] info=Maps the requests. Options: debug debug=0 [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers file=c:/apache2/logs/jk2.shm size=1048576 debug=0 disabled=0 [workerEnv:] info=Global server options timing=1 debug=0 [channel.socket:localhost:8009] info=Ajp13 forwarding over socket debug=0 tomcatId=localhost:8009 [status:] info=Status worker, displays runtime informations [uri:/jkstatus/*] info=Display status information and checks the config file for changes. group=status: [uri:/jsp-examples/*] context=/jsp-examples debug=0 [uri:/admin/*] context=/admin debug=0 [uri:/manager/*] context=/manager debug=0 Every thing else should work just as their directions state. I'm using Tomcat5 and Apache2 on XP. If I try to do the JNI method, I run into hords of Java errors that are very discouraging and don't speak for managability of Java: sorry, I'm a little jaded on java right this moment. Maybe when I start programming my oppinion will change. Shawn Zernik Internetwork Consulting www.internetworkconsulting.net -Original Message- From: Suneel [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 30, 2003 11:08 PM To: Tomcat Users List Subject: MOD JK NOT SUCESSFUL hi i am not able to run Mod JK with apache1.3.29/2.0.48 with Tomcat 4.1.29 on RH 9.0. I have followed John Turners how to and all attempts have failed. The problem is that i am not getting the SO for the version above. There are various links on the net that finally fall to the Jakarta binary list. Which dose not work for my config. i really need to get this working as i have been assigned the reponsibilty to integrate apache and tomcat. Please help regards suneel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.0 as JK Mod
Tomcat Guru's: I was wondering where the documentation to install Tomcat as a module in Apache HTTPd? The Project is JK, but when I go to the JK docs, it bringsme to the binary dist. Any URL would be appreciated. Shawn Zernik Internetwork Consulting www.internetworkconsulting.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5 with Apache2
) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) My workers2.properties file is as follows: [logger] level=DEBUG [config:] #file=${serverRoot}/conf/workers2.properties file=c:/Apache2/conf/workers2.properties debug=0 debugEnv=0 [uriMap:] info=Maps the requests. Options: debug debug=0 # Alternate file logger #[logger.file:0] #level=DEBUG #file=${serverRoot}/logs/jk2.log [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers file=${serverRoot}/logs/jk2.shm size=100 debug=0 disabled=0 [workerEnv:] info=Global server options timing=1 debug=0 # Default Native Logger (apache2 or win32 ) # can be overriden to a file logger, useful # when tracing win32 related issues #logger=logger.file:0 [lb:lb] info=Default load balancer. debug=0 #[lb:lb_1] #info=A second load balancer. #debug=0 [channel.socket:localhost:8009] info=Ajp13 forwarding over socket debug=0 tomcatId=localhost:8009 #[channel.socket:localhost:8019] #info=A second tomcat instance. #debug=0 #tomcatId=localhost:8019 #lb_factor=1 #group=lb #group=lb_1 #disabled=0 #[channel.un:/opt/33/work/jk2.socket] #info=A second channel connecting to localhost:8019 via unix socket #tomcatId=localhost:8019 #lb_factor=1 #debug=0 [channel.jni:jni] info=The jni channel, used if tomcat is started inprocess [status:] info=Status worker, displays runtime informations [vm:] info=Parameters used to load a JVM in the server process #JVM=C:\jdk\jre\bin\hotspot\jvm.dll #OPT=-Djava.class.path=c:/Tomcat/bin/* #OPT=-Djava.class.path=c:/Tomcat/bin/tomcat-jni.jar;c:/Tomcat/server/lib/com mons-logging.jar #OPT=-Djava.class.path=c:/Tomcat/bin/*;C:/Tomcat/server/lib/*;C:/Tomcat/comm on/lib/*; OPT=-Djava.class.path=C:/Tomcat/bin/tomcat-jni.jar;C:/Tomcat/server/lib/tomc at-jk2.jar;C:/Tomcat/server/lib/commons-logging.jar;C:/Tomcat/common/lib/com mons-collections.jar;C:/Tomcat/common/lib/naming-common.jar;C:/Tomcat/common /lib/naming-resources.jar;C:/Tomcat/server/lib/catalina.jar;C:/Tomcat/server /lib/commons-digester.jar;C:/TomCat/server/lib/commons-beanutils.jar;C:/Tomc at/server/lib/mx4j-jmx.jar;C:/Tomcat/server/lib/commons-modeler.jar;C:/Tomca t/common/lib/servlet.jar;C:/Tomcat/server/lib/tomcat-http11.jar;C:/Tomcat/se rver/lib/servlets-invoker.jar;C:/Tomcat/server/lib/servlets-default.jar;C:/T omcat/server/lib/servlets-webdav.jar;C:/Tomcat/server/lib/servlets-manager.j ar;C:/Tomcat/server/lib/servlets-common.jar;c:/j2sdk/j2sdk1.4.2/lib/tools.ja r;c:/tomcat/bin/BootStrap.jar;c:/tomcat/server/lib/tomcat-util.jar;c:/tomcat /server/lib/tomcat-coyote.jar OPT=-Dtomcat.home=c:\Tomcat OPT=-Dcatalina.home=c:\tomcat OPT=-Xmx128M #OPT=-Djava.compiler=NONE disabled=0 [worker.jni:onStartup] info=Command to be executed by the VM on startup. This one will start tomcat. class=org/apache/jk/apr/TomcatStarter ARG=start disabled=0 stdout=c:/Apache2/logs/stdout.log stderr=c:/Apache2/logs/stderr.log [worker.jni:onShutdown] info=Command to be executed by the VM on shutdown. This one will stop tomcat. class=org/apache/jk/apr/TomcatStarter ARG=stop disabled=0 [uri:/jkstatus/*] info=Display status information and checks the config file for changes. group=status: #[uri:127.0.0.1:8003] #info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to test it #alias=myVirtualHost:8003 #[uri:127.0.0.1:8003/ex] #info=Example webapp in the virtual host. It'll go to lb_1 ( i.e. localhost:8019 ) #context=/ex #group=lb_1 #[uri:/examples] #info=Example webapp in the default context. #context=/examples #debug=0 #[uri:/examples1/*] #info=A second webapp, this time going to the second tomcat only. #group=lb_1 #debug=0 #[uri:/examples/servlets/*] #info=Prefix mapping #[uri:/examples/*.jsp] #info=Extension mapping #[uri:/examples/*] #info=Map the whole webapp #[uri:/examples/servlets/HelloW] #info=Exampel with debug enabled. #debug=10 [uri:/jsp-examples] context=/jsp-examples debug=0 [uri:/admin] context=/admin debug=0 [uri:/manager] context=/manager debug=0 [uri:/tomcat] context=/tomcat-docs debug=0 The other properties file is verbatum what the documentation says. I just had to uncomment some lines from the exitsting files. Shawn Zernik Internetwork Consulting www.internetworkconsulting.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Q] Tomcat ZoneAlarm?
Riaan: If you are using windows XP you are better off setting the port with the firewall build into XP. To do this go into network, right click the adapter and you should be able to find the fire wall setting there. you can tell it to deny all except... The except is what you would be interested in. Shawn Zernik Internetwork Consulting www.internetworkconsulting.net -Original Message- From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] Sent: Monday, December 29, 2003 1:58 PM To: Tomcat Users List Subject: Re: [Q] Tomcat ZoneAlarm? Thanks... I know what a firewall is and what it does. Problem is, with the free version of ZoneAlarm you cannot manually specify ports to allow access on. I know you CAN get it to work, but how I do not know. I need the firewall. It is my home PC on a ADSL connection, permanently connected to the internet. So I use it for basicly everything I do on the internet. --- Philipp Taprogge [EMAIL PROTECTED] wrote: Hi! Riaan Oberholzer wrote: This is not a Tomcat issue, but I've tried desperately and could find no answer elsewhere... can someone please tell me how to get Tomcat working with ZoneAlarm (free version) as firewall? In general, it is very advisable to know what a firewall does and how it works before installing one. In general, ZoneAlarm is a (rather simple) packet filter, i.e. a piece of software that examines network packets as they arrive at or depart from the machine and decides on a set of rules to allow or deny them. If you want a so protected machine to run tomcat and access it from beyond the firewall, you need to add a rule that allows requests from external sources directed at port 80 (or whatever you set your tomcat to listen on) on the local machine and also to allow the responses from tomcat to any external host. If you want to use SSL, you will have to allow those request/response-pairs as well. You should, however concider wether you really need a firewall, if your machine is a pure server that does not serve other purposes. In that case, you should just close all ports you don't need. A closed port is no risk and if the listening software has flaws, a firewall wouldn't protect you either. HTH Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Website Throughput
Is their a program that will report the throuput of a website? Shawn Zernik Internetwork Consulting www.internetworkconsulting.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Website Performance Clocking
TomCat Admins: I am having server performnce issues with my site and was wondering if their is a website perfoance tacking software that when given a URL will request all the files referance in that URL like a web browser and track 1) server responce time, and 2) transfer rate for each file. some thing that is command line driven would be best so I can add it to Windows' scheduler. Shawn Zernik Internetwork Consulting www.internetworkconsulting.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why should i use Tomcat vs .NET?
Linux web servers have a lower cost or ownership - Topcat is a Linux solution with about the same features as ASPX. Shawn Zernik Internetwork Consulting www.internetworkconsulting.net -Original Message- From: Eduardo Vazquez [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 10:48 AM To: [EMAIL PROTECTED] Subject: Why should i use Tomcat vs .NET? I work for a small company which is seriously considering the .NET route moving into the future. My mission if I chose to accept is to sway popular opinion towards Tomcat (Jakarta) for reasons I've yet to summarize because I can't confidently regurgitate any (I'm new to Linux/Tomcat for the most part). Is there anyone who has made this argument yet? Are there anyone have a url with the comparison done already or a list of reasons why .NET isn't optimal versus the other options or on the flip side of that; why tomcat rocks? Any help would be appreciated; I'm not looking forward to becoming even more reliant on one company. Thanks in advance, Eduardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Regarding Tomcat Start
Vishal: go through the batch file (.bat) and add PAUSE followed by and enter after the tomcat or java command to see their responces. Batch filesare just a series of DOS command made to run in order. It has a GOTO statments and enviorment vars for varibles. The %1 %2 %3 represent the first command line argument, the soncond, and the third. It has if statments. Just follow it throug and add some pauses, that'll cuase it to wiat for you to press a key alowing you to see the error messages. The second command prompt window is called through the first batch fil through the CMD command. Look for the CMD or other betch files and add pauses to those files. It's calling another command prompt to free the one you in when Tomcat starts. This second command prompt is probably giving an error like Port already in use or something else. Adding the pause will allow you to see these errors. Shawn Zernik Internetwork Consulting www.internetworkconsulting.net -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, September 27, 2003 11:54 AM To: Tomcat Users List Subject: Regarding Tomcat Start I have installed jakarta-tomcat-5.0.12. I set jdk and catalina path. I open a command prompt, move to the bin directory of tomcat. I run startup.bat. It opens another prompt that vanishes in seconds. I dont see anything wrong (warning or error message) at original command prompt. I move to localhost in browser. Nothing loads up on browser ! How do i know whether tomcat has really started or not ? (I tried to look at services running, it does not show up there) I tried to see log floder, but it is just empty. I tried to run shutdown bat file. It says, connection not found ! Does it help in answering my question? I am using Windows XP Operating System. Regards ~Vishal - 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: Regarding Tomcat Start
What version of windows are you running, and you might want to at the pause command in the batch file so it6 does not disappear to keep the data from eunning off the screen. Shawn Zernik Internetwork Consulting www.internetworkconsulting.net -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, September 27, 2003 11:54 AM To: Tomcat Users List Subject: Regarding Tomcat Start I have installed jakarta-tomcat-5.0.12. I set jdk and catalina path. I open a command prompt, move to the bin directory of tomcat. I run startup.bat. It opens another prompt that vanishes in seconds. I dont see anything wrong (warning or error message) at original command prompt. I move to localhost in browser. Nothing loads up on browser ! How do i know whether tomcat has really started or not ? (I tried to look at services running, it does not show up there) I tried to see log floder, but it is just empty. I tried to run shutdown bat file. It says, connection not found ! Does it help in answering my question? I am using Windows XP Operating System. Regards ~Vishal - 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: Simple question about JSP page
you should post you tag code of the code for that page. It can either be a problem with your tag, or the connection pooling. Try stopping and restarting the app in the manager and see if that makes the updates take affect. If so, the issues is with re-use of objects and possible connection pooling. Shawn Zernik Internetwork Consulting www.internetworkconsulting.net -Original Message- From: engp0510 [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2003 9:31 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Simple question about JSP page Hi, Maybe it's a stupid question. Built jsps for addingsearching with MySQL. First listing all existing records in db and then adding a new one into database, then listing all records again. Now the list is the same as previous. How to solve it? THX - 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]
Start hangs indefinately, cpu to 100%
Hello, Using 4.1.27 (which starts normally except when a particular webapp(ie context) is included), starting hangs indefinately and the cpu goes to 100%. In the log for that particular webapp, it seems that nothing unsual appears for the context and it ends with -- 2003-09-02 13:38:21 StandardContext[/root]: Starting completed As for Catlina.out, after about 5 minutes of letting it try to start, I get a 4.7 mb file (and growing until I killed it) with entries similar to 25296 [main] DEBUG org.apache.commons.digester.Digester.sax - setDocumentLocator([EMAIL PROTECTED]) 25298 [main] DEBUG org.apache.commons.digester.Digester.sax - startDocument() 25321 [main] DEBUG org.apache.commons.digester.Digester.sax - resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 'http://java.sun.com/dtd/web-app_2_3.dtd') 25324 [main] DEBUG org.apache.commons.digester.Digester - Resolving to alternate DTD 'jar:file:/home/javauser/jakarta-tomcat- 4.1.27/common/lib/servlet.jar!/javax/servlet/resources/web-app_2_3.dtd' 25657 [main] DEBUG org.apache.commons.digester.Digester.sax - startPrefixMapping(xml,http://www.w3.org/XML/1998/namespace) 25671 [main] DEBUG org.apache.commons.digester.Digester.sax - startPrefixMapping(xmlns,http://www.w3.org/2000/xmlns/) 25683 [main] DEBUG org.apache.commons.digester.Digester.sax - startElement(,,web-app) 25708 [main] DEBUG org.apache.commons.digester.Digester - Pushing body text '' 25725 [main] DEBUG org.apache.commons.digester.Digester - New match='web-app' 25737 [main] DEBUG org.apache.commons.digester.Digester - Fire begin() for [EMAIL PROTECTED] 25770 [main] DEBUG org.apache.commons.digester.Digester.sax - ignorableWhitespace( HOWEVER IN A SUCCESSFUL START-UP IT INCLUDES- 39393 [main] INFO org.apache.coyote.http11.Http11Protocol - Starting Coyote HTTP/1.1 on port 8080 39430 [main] DEBUG org.apache.jk.server.JkMain - Substituting soTimeout channelSocket.soTimeout 0 39437 [main] DEBUG org.apache.jk.server.JkMain - Substituting port channelSocket.port 8009 INSTEAD OF THE DIGESTER DEBUG INFO ABOVE. ANY IDEAS? Shawn RH9, JDK1.4.2 -- Shawn Happily using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Start hangs indefinately, cpu to 100% --solved
Apperantly one of the jars in my lib was either corrupted or in conflict because after removing unneeded ones and updated others, it seems to be likeable Tomcat behavior as usual. --following was original post--- Using 4.1.27 (which starts normally except when a particular webapp(ie context) is included), starting hangs indefinately and the cpu goes to 100%. In the log for that particular webapp, it seems that nothing unsual appears for the context and it ends with -- 2003-09-02 13:38:21 StandardContext[/root]: Starting completed As for Catlina.out, after about 5 minutes of letting it try to start, I get a 4.7 mb file (and growing until I killed it) with entries similar to 25296 [main] DEBUG org.apache.commons.digester.Digester.sax - setDocumentLocator([EMAIL PROTECTED]) 25298 [main] DEBUG org.apache.commons.digester.Digester.sax - startDocument() 25321 [main] DEBUG org.apache.commons.digester.Digester.sax - resolveEntity('-//Sun - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java/JSP vs C#/.NET
Lance: 100% Multi-Platform Support: Microsoft doesn't have it. Shawn Zernik Internetwork Consulting www.internetworkconsulting.net -Original Message- From: Xingqun Jiang [mailto:[EMAIL PROTECTED] Sent: Monday, August 25, 2003 4:57 PM To: Tomcat Users List Subject: Java/JSP vs C#/.NET Hi, I am a pure java supporter. I don't like C# or .Net because of Microsoft's monopolization (sorry, kind of prejudice). However, I notice that more and more people pick up C#/.NET due to their new advantages. I also heard that C# is much faster than Java. My concern is, can Java/JSP still be competitive to Microsoft's products? I don't like to see java be beaten by Microsoft since it borrowed so many ideas from java to make up the so-called C#. ok, feel free to talk about this topic. Lance - 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: E-Mail to CompuServe Customer Service
Someone needs to cancel this Compuserve email address. Shawn Zernik Internetwork Consulting www.internetworkconsulting.net -Original Message- From: CompuServe Customer Service [mailto:[EMAIL PROTECTED] Sent: Friday, August 22, 2003 11:15 AM To: Tomcat Users List Subject: E-Mail to CompuServe Customer Service Thank you for your e-mail message to CompuServe Customer Service. In order to improve our service to members, the general account 70006,101 ([EMAIL PROTECTED]) has now been replaced with new mailboxes dedicated to each country/region. Please re-send your message to one of the following e-mail addresses and a local CompuServe Representative will respond to you via e-mail: United States and Canada: Technical Support - [EMAIL PROTECTED] General Support - [EMAIL PROTECTED] Business Account Support - [EMAIL PROTECTED] United Kingdom: Technical Support - [EMAIL PROTECTED] General Support - [EMAIL PROTECTED] Business Account Support - [EMAIL PROTECTED] Germany and Austria: Technische Mitgliederbetreuung - [EMAIL PROTECTED] Allgemeine Fragen - [EMAIL PROTECTED] Fragen zur Abrechnung - [EMAIL PROTECTED] Firmenkundenbetreuung - [EMAIL PROTECTED] France: Assistance Technique - [EMAIL PROTECTED] Assistance Technique Mac - [EMAIL PROTECTED] Gestion de votre Compte Personnel - [EMAIL PROTECTED] Gestion de votre Compte Société - [EMAIL PROTECTED] Netherlands: Technical Support - [EMAIL PROTECTED] General Support - [EMAIL PROTECTED] Business Account Support - [EMAIL PROTECTED] Switzerland: Fragen zur Abrechnung (billing-issues) - [EMAIL PROTECTED] Allgemeine Anfragen (general demands) - [EMAIL PROTECTED] Technische Mitgliederbetreuung (technical support) - [EMAIL PROTECTED] Firmenkundenbetreuung (CBA-issues) - [EMAIL PROTECTED] All other European Countries: Technical Support - [EMAIL PROTECTED] General Support - [EMAIL PROTECTED] Business Account Support - [EMAIL PROTECTED] Japan - CompuServe/NIFTYServe: General Support - [EMAIL PROTECTED] Australia/Pacific: General Support - [EMAIL PROTECTED] Mexico: General Support - [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: Processing .html files like JSPs
It should have some setting in your web.xml to configure you context: exact syntax, I'm unsure. Look for context documentation. Shawn Zernik Internetwork Consulting www.internetworkconsulting.net -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 11:09 AM To: [EMAIL PROTECTED] Subject: Processing .html files like JSPs In the app I'm working on there's a number JSP files that actually have the extension .html. Is there a way to configure Tomcat to treat these files just as if they had the standard .jsp extension, or do I need to rely on Apache rewrite rules? I'm using Tomcat 4.1.27 on Linux. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Custom Tag Lib
Mike: Thanks so very much... I saw their is a config option in the Jasper to turn off tag pooling. do you thing that would work too, of shouldI impliment it in my source code. I'm gonna take a look at it right now. Shawn -Original Message- From: Mike Cherichetti (Renegade Internet) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 10:28 PM To: Tomcat Users List Subject: RE: Custom Tag Lib Shawn, I ran into this problem as well when switching from 4.0 to 4.1. I think it has something to do with 4.1 pooling and re-using tag objects. What I did in all of my doStartTag(), doAfterBody(), etc... methods was manually call release() to reset the data in the tags like so: public int doStartTag() throws JspException { try { ... } catch (Exception exception) { throw new JspException(exception); } finally { release(); } return SKIP_BODY; } Have a nice day ... Sincerely, Mike Cherichetti Renegade Internet Internet Advertising Delivery Solutions www.renegadeinternet.com Phone (724) 658-6346 Fax (724) 658-6346 -Original Message- From: Shawn Zernik [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 10:56 PM To: [EMAIL PROTECTED] Subject: Custom Tag Lib Tomcat Users: I've been fighting with some version differences in tom cat wondering why my app acts severly different on Tomcat 4.1.27 then 4.0.6. It appears that 4.1.27 is not working from my perspective, and have been fighting with it since monday. None of the books I have touch this subject or ellude to the problem, and I've seached high and low for solutions. I'm having a problem working with my custom tag library. The stange part to this is it appears to work on tomcat 4.0.6 but not on 4.1.27. The library has a tage called site that extends a base tag, and those tags use other classes in my data namespace to hit a database. The tags are returning the proper data in both versions, but in 4.1.27, I have to reload the contect in the manager for it to register the changes from the database. I have added some printlns to std out to track what's going on. In tomcat 4.0.6 they are going through all the code as I would exspect it to. I have included each of the class files that are called. I have also included the printouts from both versions of tomcat to clierify how each version is handling the calls. The object hiarchey goes as follows: jPublish.Tags site extends inc_tag. jPublish.Data.site_manager extends jPublish.Data.manager, managers contain, load, and fill datas. jPublish.Data.site_data extends jPublish.Data.data, used for storing data and tracking updates. --- INDEX.JSP --- %@ page contentType=text/html % %@ taglib prefix=inc uri=inc % inc:site site=1 action=none/ html headtitleinc:site action=title //title/head body h1Welcome to inc:site action=title/!/h1 copy; inc:site action=copyright/ /body /html --- TOMCAT 4.0.6 STDOUT --- Starting service Tomcat-Standalone Apache Tomcat/4.0.6 Starting service Tomcat-Apache Apache Tomcat/4.0.6 jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.setSite() jPublish.Data.manager() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.site.doEndTag(): End jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.inc_tag.loaded() jPublish.Tags.inc_tag.loaded(): not instance jPublish.Data.manager.load() jPublish.Tags.inc_tag.loaded(): load ok jPublish.Tags.inc_tag.loaded(): next ok jPublish.Tags.inc_tag.loaded(): reached fill. jPublish.Tags.site.loaded() Internetwork Consulting jPublish.Tags.site.doEndTag(): End jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.inc_tag.loaded() jPublish.Tags.inc_tag.loaded(): not instance jPublish.Data.manager.load() jPublish.Tags.inc_tag.loaded(): load ok jPublish.Tags.inc_tag.loaded(): next ok jPublish.Tags.inc_tag.loaded(): reached fill. jPublish.Tags.site.loaded() Internetwork Consulting jPublish.Tags.site.doEndTag(): End jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.inc_tag.loaded() jPublish.Tags.inc_tag.loaded(): not instance jPublish.Data.manager.load() jPublish.Tags.inc_tag.loaded(): load ok jPublish.Tags.inc_tag.loaded(): next ok jPublish.Tags.inc_tag.loaded(): reached fill. jPublish.Tags.site.loaded() Shawn jPublish.Tags.site.doEndTag(): End jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.setSite() jPublish.Data.manager() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.site.doEndTag(): End jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.inc_tag.loaded() jPublish.Tags.inc_tag.loaded(): not instance jPublish.Data.manager.load() jPublish.Tags.inc_tag.loaded(): load ok jPublish.Tags.inc_tag.loaded(): next ok jPublish.Tags.inc_tag.loaded(): reached fill. jPublish.Tags.site.loaded() Internetwork Consulting
RE: Custom Tag Lib
Mr. Mezick: From what I'm gathering, the release should not be implimented to reset the data and classes used by a tag, but only for things like closing files and db connections? Just to make sure I'm thinking about this properly, the doStartTag should be treated like the constructor: make sure my data is setup properly there. The doEndTag should be used for normal completion without errors. Does Tomcat impliment object pooling beyon the tags? Are my supporting classes for the tag pooled? Thanks to all who have helped me. Shawn -Original Message- From: Angus Mezick [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 8:06 AM To: Tomcat Users List Subject: RE: Custom Tag Lib It would be best if you went a rewrote your tags not to require release to be called. That change will also bring you in-line with the jsp spec. These links might help: http://www.onjava.com/lpt/a/1248 http://www.onjava.com/lpt/a/1250 http://jakarta.apache.org/taglibs/guidelines.html -Original Message- From: Shawn Zernik [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 11:41 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: Custom Tag Lib Mike: Thanks so very much... I saw their is a config option in the Jasper to turn off tag pooling. do you thing that would work too, of shouldI impliment it in my source code. I'm gonna take a look at it right now. Shawn -Original Message- From: Mike Cherichetti (Renegade Internet) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 10:28 PM To: Tomcat Users List Subject: RE: Custom Tag Lib Shawn, I ran into this problem as well when switching from 4.0 to 4.1. I think it has something to do with 4.1 pooling and re-using tag objects. What I did in all of my doStartTag(), doAfterBody(), etc... methods was manually call release() to reset the data in the tags like so: public int doStartTag() throws JspException { try { ... } catch (Exception exception) { throw new JspException(exception); } finally { release(); } return SKIP_BODY; } Have a nice day ... Sincerely, Mike Cherichetti Renegade Internet Internet Advertising Delivery Solutions www.renegadeinternet.com Phone (724) 658-6346 Fax (724) 658-6346 -Original Message- From: Shawn Zernik [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 10:56 PM To: [EMAIL PROTECTED] Subject: Custom Tag Lib Tomcat Users: I've been fighting with some version differences in tom cat wondering why my app acts severly different on Tomcat 4.1.27 then 4.0.6. It appears that 4.1.27 is not working from my perspective, and have been fighting with it since monday. None of the books I have touch this subject or ellude to the problem, and I've seached high and low for solutions. I'm having a problem working with my custom tag library. The stange part to this is it appears to work on tomcat 4.0.6 but not on 4.1.27. The library has a tage called site that extends a base tag, and those tags use other classes in my data namespace to hit a database. The tags are returning the proper data in both versions, but in 4.1.27, I have to reload the contect in the manager for it to register the changes from the database. I have added some printlns to std out to track what's going on. In tomcat 4.0.6 they are going through all the code as I would exspect it to. I have included each of the class files that are called. I have also included the printouts from both versions of tomcat to clierify how each version is handling the calls. The object hiarchey goes as follows: jPublish.Tags site extends inc_tag. jPublish.Data.site_manager extends jPublish.Data.manager, managers contain, load, and fill datas. jPublish.Data.site_data extends jPublish.Data.data, used for storing data and tracking updates. --- INDEX.JSP --- %@ page contentType=text/html % %@ taglib prefix=inc uri=inc % inc:site site=1 action=none/ html headtitleinc:site action=title //title/head body h1Welcome to inc:site action=title/!/h1 copy; inc:site action=copyright/ /body /html --- TOMCAT 4.0.6 STDOUT --- Starting service Tomcat-Standalone Apache Tomcat/4.0.6 Starting service Tomcat-Apache Apache Tomcat/4.0.6 jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.setSite() jPublish.Data.manager() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.site.doEndTag(): End jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.inc_tag.loaded() jPublish.Tags.inc_tag.loaded(): not instance jPublish.Data.manager.load() jPublish.Tags.inc_tag.loaded(): load ok jPublish.Tags.inc_tag.loaded(): next ok jPublish.Tags.inc_tag.loaded(): reached fill. jPublish.Tags.site.loaded() Internetwork Consulting jPublish.Tags.site.doEndTag(): End jPublish.Data.manager() jPublish.Tags.site
NetBeans Debug in JSP Tag Files
Tomcat-Users: I have the tag lib working. Thanks again. I was wondering if anyone could point me to a good tutorial on how to use NetBeans with Tomcat that's running. I can configure tomcat to allow debug connections and connect using NetBeans, but once I'm online with the server how do I trace through a JSP page? Shawn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Custom Tag Lib
Tomcat Users: I've been fighting with some version differences in tom cat wondering why my app acts severly different on Tomcat 4.1.27 then 4.0.6. It appears that 4.1.27 is not working from my perspective, and have been fighting with it since monday. None of the books I have touch this subject or ellude to the problem, and I've seached high and low for solutions. I'm having a problem working with my custom tag library. The stange part to this is it appears to work on tomcat 4.0.6 but not on 4.1.27. The library has a tage called site that extends a base tag, and those tags use other classes in my data namespace to hit a database. The tags are returning the proper data in both versions, but in 4.1.27, I have to reload the contect in the manager for it to register the changes from the database. I have added some printlns to std out to track what's going on. In tomcat 4.0.6 they are going through all the code as I would exspect it to. I have included each of the class files that are called. I have also included the printouts from both versions of tomcat to clierify how each version is handling the calls. The object hiarchey goes as follows: jPublish.Tags site extends inc_tag. jPublish.Data.site_manager extends jPublish.Data.manager, managers contain, load, and fill datas. jPublish.Data.site_data extends jPublish.Data.data, used for storing data and tracking updates. --- INDEX.JSP --- %@ page contentType=text/html % %@ taglib prefix=inc uri=inc % inc:site site=1 action=none/ html headtitleinc:site action=title //title/head body h1Welcome to inc:site action=title/!/h1 copy; inc:site action=copyright/ /body /html --- TOMCAT 4.0.6 STDOUT --- Starting service Tomcat-Standalone Apache Tomcat/4.0.6 Starting service Tomcat-Apache Apache Tomcat/4.0.6 jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.setSite() jPublish.Data.manager() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.site.doEndTag(): End jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.inc_tag.loaded() jPublish.Tags.inc_tag.loaded(): not instance jPublish.Data.manager.load() jPublish.Tags.inc_tag.loaded(): load ok jPublish.Tags.inc_tag.loaded(): next ok jPublish.Tags.inc_tag.loaded(): reached fill. jPublish.Tags.site.loaded() Internetwork Consulting jPublish.Tags.site.doEndTag(): End jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.inc_tag.loaded() jPublish.Tags.inc_tag.loaded(): not instance jPublish.Data.manager.load() jPublish.Tags.inc_tag.loaded(): load ok jPublish.Tags.inc_tag.loaded(): next ok jPublish.Tags.inc_tag.loaded(): reached fill. jPublish.Tags.site.loaded() Internetwork Consulting jPublish.Tags.site.doEndTag(): End jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.inc_tag.loaded() jPublish.Tags.inc_tag.loaded(): not instance jPublish.Data.manager.load() jPublish.Tags.inc_tag.loaded(): load ok jPublish.Tags.inc_tag.loaded(): next ok jPublish.Tags.inc_tag.loaded(): reached fill. jPublish.Tags.site.loaded() Shawn jPublish.Tags.site.doEndTag(): End jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.setSite() jPublish.Data.manager() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.site.doEndTag(): End jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.inc_tag.loaded() jPublish.Tags.inc_tag.loaded(): not instance jPublish.Data.manager.load() jPublish.Tags.inc_tag.loaded(): load ok jPublish.Tags.inc_tag.loaded(): next ok jPublish.Tags.inc_tag.loaded(): reached fill. jPublish.Tags.site.loaded() Internetwork Consulting jPublish.Tags.site.doEndTag(): End jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.inc_tag.loaded() jPublish.Tags.inc_tag.loaded(): not instance jPublish.Data.manager.load() jPublish.Tags.inc_tag.loaded(): load ok jPublish.Tags.inc_tag.loaded(): next ok jPublish.Tags.inc_tag.loaded(): reached fill. jPublish.Tags.site.loaded() Internetwork Consulting jPublish.Tags.site.doEndTag(): End jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.inc_tag.loaded() jPublish.Tags.inc_tag.loaded(): not instance jPublish.Data.manager.load() jPublish.Tags.inc_tag.loaded(): load ok jPublish.Tags.inc_tag.loaded(): next ok jPublish.Tags.inc_tag.loaded(): reached fill. jPublish.Tags.site.loaded() INC jPublish.Tags.site.doEndTag(): End --- TOMCAT 4.1.27 STDOUT: db INC then Shawn --- jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.setSite() jPublish.Data.manager() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.site.doEndTag(): End jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.inc_tag.loaded() jPublish.Tags.inc_tag.loaded(): not instance jPublish.Data.manager.load() jPublish.Tags.inc_tag.loaded(): load ok
RE: Custom Tag Lib
Mike: I can't resolve that problem. can I impliment those tags as simple tags: the JSP spec says that they will not be cached or reused. Shawn -Original Message- From: Mike Cherichetti (Renegade Internet) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 10:59 PM To: Tomcat Users List Subject: RE: Custom Tag Lib Hi Shawn, Actually, I wasn't aware that there was an option to disable it. When I figured out what was happening, I went ahead and handled it in my code. No telling how other application servers might handle it. If you're only going to be deploying on Tomcat, disabling pooling would probably save you some time, but you still might want to handle it in your code to get better performance. Mike -Original Message- From: Shawn Zernik [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 11:41 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: Custom Tag Lib Mike: Thanks so very much... I saw their is a config option in the Jasper to turn off tag pooling. do you thing that would work too, of shouldI impliment it in my source code. I'm gonna take a look at it right now. Shawn -Original Message- From: Mike Cherichetti (Renegade Internet) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 10:28 PM To: Tomcat Users List Subject: RE: Custom Tag Lib Shawn, I ran into this problem as well when switching from 4.0 to 4.1. I think it has something to do with 4.1 pooling and re-using tag objects. What I did in all of my doStartTag(), doAfterBody(), etc... methods was manually call release() to reset the data in the tags like so: public int doStartTag() throws JspException { try { ... } catch (Exception exception) { throw new JspException(exception); } finally { release(); } return SKIP_BODY; } Have a nice day ... Sincerely, Mike Cherichetti Renegade Internet Internet Advertising Delivery Solutions www.renegadeinternet.com Phone (724) 658-6346 Fax (724) 658-6346 -Original Message- From: Shawn Zernik [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 10:56 PM To: [EMAIL PROTECTED] Subject: Custom Tag Lib Tomcat Users: I've been fighting with some version differences in tom cat wondering why my app acts severly different on Tomcat 4.1.27 then 4.0.6. It appears that 4.1.27 is not working from my perspective, and have been fighting with it since monday. None of the books I have touch this subject or ellude to the problem, and I've seached high and low for solutions. I'm having a problem working with my custom tag library. The stange part to this is it appears to work on tomcat 4.0.6 but not on 4.1.27. The library has a tage called site that extends a base tag, and those tags use other classes in my data namespace to hit a database. The tags are returning the proper data in both versions, but in 4.1.27, I have to reload the contect in the manager for it to register the changes from the database. I have added some printlns to std out to track what's going on. In tomcat 4.0.6 they are going through all the code as I would exspect it to. I have included each of the class files that are called. I have also included the printouts from both versions of tomcat to clierify how each version is handling the calls. The object hiarchey goes as follows: jPublish.Tags site extends inc_tag. jPublish.Data.site_manager extends jPublish.Data.manager, managers contain, load, and fill datas. jPublish.Data.site_data extends jPublish.Data.data, used for storing data and tracking updates. --- INDEX.JSP --- %@ page contentType=text/html % %@ taglib prefix=inc uri=inc % inc:site site=1 action=none/ html headtitleinc:site action=title //title/head body h1Welcome to inc:site action=title/!/h1 copy; inc:site action=copyright/ /body /html --- TOMCAT 4.0.6 STDOUT --- Starting service Tomcat-Standalone Apache Tomcat/4.0.6 Starting service Tomcat-Apache Apache Tomcat/4.0.6 jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.setSite() jPublish.Data.manager() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.site.doEndTag(): End jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.inc_tag.loaded() jPublish.Tags.inc_tag.loaded(): not instance jPublish.Data.manager.load() jPublish.Tags.inc_tag.loaded(): load ok jPublish.Tags.inc_tag.loaded(): next ok jPublish.Tags.inc_tag.loaded(): reached fill. jPublish.Tags.site.loaded() Internetwork Consulting jPublish.Tags.site.doEndTag(): End jPublish.Data.manager() jPublish.Tags.site() jPublish.Tags.site.doEndTag(): Begin jPublish.Tags.inc_tag.loaded() jPublish.Tags.inc_tag.loaded(): not instance jPublish.Data.manager.load() jPublish.Tags.inc_tag.loaded(): load ok jPublish.Tags.inc_tag.loaded(): next ok jPublish.Tags.inc_tag.loaded(): reached fill. jPublish.Tags.site.loaded() Internetwork Consulting jPublish.Tags.site.doEndTag(): End jPublish.Data.manager
RE: security hole on windows tomcat?
Mr. Sundling: i'm running tomcat 4.1.27 and that does not appear to be an issue. I used http://localhost:8080/jweb/left.jsp%20; as my url. -Original Message- From: Spam Email [mailto:[EMAIL PROTECTED] Sent: Sunday, August 10, 2003 4:18 PM To: [EMAIL PROTECTED] Subject: security hole on windows tomcat? I came across what appears to be a security hole when running tomcat. I'm not sure how widespread it is, but my linux server is safe, yet my windows XP, tomcat 4.1.24 is vulnerable. I found that if you append %20 to a jsp page it shows the source code instead of displaying the page: http://192.168.1.54:8080/index.jsp shows page as expected http://192.168.1.54:8080/index.jsp%20 shows source code of index.jsp So how widespread is this? Paul Sundling - 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: NetBeans Debug in JSP Tag Files
Here's the files... They set it up but dont tell you how to use it. It at the botton of the page. http://jakarta.apache.org/site/idedevelopers.html -Original Message- From: Carlos Cajina - Hotmail [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 5:19 PM To: Tomcat Users List Subject: Re: NetBeans Debug in JSP Tag Files Hi Shawn... Do you happen to have a How-To somewhere about integrating Netbeans Tomcat? :-) I don't want to use Netbeans' internal Tomcat server and I've been struggling a little to use both together... Regards, Carlos *** Oh, about your question, there's information at http://developers.sun.com/tools/javatools/tips/tip02-05-17.html that I think might be useful to you even if it's related to Forte for Java/Sun ONE Studio (you might also want to check out the viewlet)... - Original Message - From: Shawn Zernik [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 08, 2003 12:40 PM Subject: NetBeans Debug in JSP Tag Files Tomcat-Users: I have the tag lib working. Thanks again. I was wondering if anyone could point me to a good tutorial on how to use NetBeans with Tomcat that's running. I can configure tomcat to allow debug connections and connect using NetBeans, but once I'm online with the server how do I trace through a JSP page? Shawn - 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: Can I get an answer please -- Re: Why integrate Tomcat with a web server?
It actually makes since. Most web servers are in native code which is uasually faster, and tomcat is in java. -Original Message- From: Rick Roberts [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 10:38 AM To: Tomcat Users List Subject: Re: Can I get an answer please -- Re: Why integrate Tomcat with a web server? Of course not. I'm only regergitating stuff I have read. But I have seen it from several different sources, so I took it as truth. Do you have benchmarks to prove otherwise? -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** Shapira, Yoav wrote: Howdy, Because a web server serves static content (html, images, etc.) much faster than tomcat will. Really? Do you have a benchmark using tomcat 4.1.x that supports the above? Yoav Shapira - 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: Does Tomcat support Unicode URL
Well Java 1.4 does. Did you try something like: %=URLEncoder.encode(s, enc)% s is your URL and enc is the java encoding such as Shift_JIS. See URLEncoder for more info. Will work from java 1.4 I believe. Had the same problem and this seems to solve it just fine. I had to set the correct encoding though. -- We tried to encode the characters with % URL encoding, but seems not working. Can anyone help? Thanks. John -- Shawn Happily using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple question on Unicode URL in Tomcat
Hiho, try something like: String s = URLEncoder.encode(s, enc); s is your URL and enc is the java encoding such as Shift_JIS. See URLEncoder for more info. Will work from java 1.4 I believe. Had the same problem and this seems to solve it just fine. -- Shawn Happily using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
3.3.X USE (JAXP) v1.1 OR 1.0
Does anyone know if Tomcat 3.3.x uses JAXP 1.1 or 1.0? Our open source project needs 1.1 and I need to figure out what I should be telling people in terms of what works. 3.2.x has 1.0 I believe. TIA, -- Shawn [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TryCatchFianlly requires servlet 2.3?
Someone told me that since our tags impliment a tryCatchFinally clause, we need to use servlet2.3. Is that right? I though tryCatchFinally was just basic syntax. -- Shawn [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
class loading issue bug? fw to dev list?
Using Tomcat 4.1.17 to upload a servlet I get a Class not found error when the class is there. If I put the class into jakarta/common/classes it works fine. Notice that the error stems from my driver in jakarta/common/lib while the class it can not find is loaded from a jar in my app's WEB-INF/lib ERROR [Thread-4] (SqlUtil.java:360) - ::logSqlExceptionSQL - exception java.sql.SQLException: Class not found: java.lang.ClassNotFoundException: org.dbforms.util.FileHolder while reading serialized object at com.mysql.jdbc.ResultSet.getObject(Unknown Source) at org.dbforms.util.ResultSetVector.init(ResultSetVector.java:93) A codeFileHolder/code holds data saved from a com.oreilly.servlet.multipart.FilePart as byteArray I would think this is not by design or it would be documented. I realize this mail might best go to the developers list but ...what's that address...I don't subscribe...could someone forward this... ..maybe this has already been solved?!?... -- shawn [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DBCP leak ?
As noted in Tomcat docs, A web application has to explicetely close ResultSet's, Statement's, and Connection's. I am using a web app that opens a ResultSet locally (in a method) but it never gets closed (gc'd sometime I presume). Under Oracle, a user is hitting the maximum number of Oracle process and I presume it is a leak. Three questions. 1) must a local ResultSet be explicitely closed to avoid a leak 2) if I use, parameter namelogAbandoned/name valuetrue/value /parameter to log the stack trace, where is that log? Under logs in the usual place for that context. I have to tell someone else where to find the log otherwise would just look for it myself (ie I'm not running Oracle). 3) If only Oracle shows this behavior what could account for that? Diff jvm? (just curious) TIA -- shawn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DBCP leak ?
On Fri, 2003-01-31 at 12:20, Craig R. McClanahan wrote: IS IT ESSENTIAL TO DO THIS IN A TRY CLAUSE? MUCH OF OUR CLOSING ISN'T AND THAT EXCEPTION ISN'T REARING IT'S UGLY HEAD. IF AN EXCEPTION WERE THROWN IN A FINALLY CLAUSE, WOULD WE SEE IT ANYWAY? STUPID QUESTION (I WOULD THINK YES BUT IF NOT MAYBE WE ARE LEEKING CONNECTIONS THERE?? MAYBE I JUST WILL DO IT LIKE THAT SINCE BEST PRACTICES ARE JUST THAT. finally { if (rs != null) { try { rs.close(); } catch (SQLException e) { ; } rs = null; } 1) must a local ResultSet be explicitely closed to avoid a leak Some JDBC drivers will close the ResultSet for you if you close the associated Statement, but it sounds like you're probably not doing that either. In most places yes. Might drivers also close the ResultSet when using a preparedStatement. The ps and connection is always closed. The ResultSet is closed in most places (and I'll correct where it's not). I wonder if the Oracle driver wasn't closing it (not that it should be expected to) and GC wasn't doing it either, hence the leak. Anyway, thanks for the help. Will clean up the few rough spots. (if you're old enough to remember): we have met the enemy and they is us. :-) I remember and will try to keep it more in mind. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help: invalid web.xml
Doesn't your taglib come after the welcome-file-list I think it should. I'm not sure about the error-page though. Anyway, the order is relevant. On Fri, 2003-01-31 at 12:59, Rob Cartier wrote: I am having a tough time trying to create a valid web.xml using taglib Is there a document that I can follow that will show me to hiearchy of a properly formatted document I am supplying my current web.xml for anyones review and correction. XMLWriter says the taglib declaration I am usng is invalid. I am confused . It looks ok thanks in advance Rob ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-name Farmington Sports Arena /display-name description Farmington Sports Arena /description context-param param-namebase_href/param-name param-valuehttp://www.fsasports.com/fsa//param-value /context-param servlet servlet-nameSendMailServlet/servlet-name display-nameSendMailServlet/display-name servlet-classSendMailServlet/servlet-class init-param param-namebase_href/param-name param-valuehttp://www.fsasports.com/fsa//param-value /init-param init-param param-namemailhost/param-name param-valueapollo.homeip.net/param-value /init-param init-param param-namemailfrom/param-name param-value[EMAIL PROTECTED]/param-value /init-param init-param param-nameenvelope_from/param-name param-value[EMAIL PROTECTED]/param-value /init-param /servlet servlet servlet-nameMailPremierApplication/servlet-name display-nameMailPremierApplication/display-name servlet-classMailPremierApplication/servlet-class init-param param-namemailhost/param-name param-valueapollo.homeip.net/param-value /init-param /servlet servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping taglib taglib-urihttp://jakarta.apache.org/taglibs/dbtags/taglib-uri taglib-location/WEB-INF/dbtags.tld/taglib-location /taglib welcome-file-list welcome-fileindex.html/welcome-file welcome-fileindex.htm/welcome-file welcome-fileindex.jsp/welcome-file welcome-filedefault.html/welcome-file welcome-filedefault.htm/welcome-file welcome-filedefault.jsp/welcome-file /welcome-file-list error-page error-code404/error-code location/error404.jsp/location /error-page /web-app - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- shawn [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JNDI jdbc resources
Hey catv... used to use them just to confirm, this is not your server.xml Resource name=jdbc/myoracle auth=Container type=javax.sql.DataSource/ that I beleive was an earlier post and different from jdbc/DBmultileague anyway, I had a similar prob and it was in my server.xml that's why I suggested it. yours may be different shawn On Mon, 2003-01-27 at 19:45, Paul Carpenter wrote: Hi Peng For Shawn's benefit - the context you see is in my server.xml (well, actually, a separate xml file just like the manager.xml and admin.xml in the /webapps directory). Based on the other posting to the list, I've tried both with the web.xml file having nothing for the resource defined, and also as below (after the servlet mappings): resource-ref description Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. /description res-ref-name jdbc/DBmultileague /res-ref-name res-type javax.sql.DataSource /res-type res-auth Container /res-auth /resource-ref -- shawn [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JNDI jdbc resources
What about server.xml? try{ Context ctx2 = new InitialContext(); out.print(Connecting1 : ); Context envCtx2 = (Context) ctx2.lookup(java:/comp/env/); out.print(Connecting2 : ); DataSource ds = (DataSource) envCtx2.lookup(jdbc/DBmultileague); out.print(Connecting3 : ); if (ds != null) { out.print(Query1 : ); Connection conn = ds.getConnection(); out.print(Query2 : ); That part worked for me too. Is there an advantage to breaking your Context into two pieces. Anyway, I tried it like that with no problem. Shawn On Mon, 2003-01-27 at 09:21, Peng Tuck Kwok wrote: Let's have a look at your web.xml as well. Might be helpful. Paul Carpenter wrote: Hi All I've scoured the list and got so close, yet so far from making the jdbc stuff work. With some help from Manav and other postings, this is what i see. can anyone solve the riddle? Please see the cut'n'pastes below. I draw you attention to the fact that the connection looks good right up to the point where it's used - like the DataSource object is good (because ds != null is true), yet the getConnection method throws the often seen Cannot load JDBC driver class 'null' error. I know this is very close...what's missing? I'm sure my jars are in the right place, as a regular forClass approach in the same webapp works with no problems? Thanks Paul tomcat 4.1.12, Mac OSX 10.2.3 Output from my test servlet: Simple lookup test : dbName : org.apache.commons.dbcp.BasicDataSource@25debb list() on /comp/env Context : Binding : jdbc: org.apache.naming.NamingContext listBindings() on /comp/env Context : Binding : jdbc: org.apache.naming.NamingContext:org.apache.naming.NamingContext@41f80c list() on full Context : Binding : DBmultileague: org.apache.commons.dbcp.BasicDataSource listBindings() on full Context today: Binding : DBmultileague: org.apache.commons.dbcp.BasicDataSource:org.apache.commons.dbcp.BasicDat aSource@25debb Connecting1 : Connecting2 : Connecting3 : Query1 : The relevant servlet code; try { out.println(list() on full Context : ); NamingEnumeration enum2 = ctx.list(java:/comp/env/jdbc/); while (enum2.hasMoreElements()) { out.print(Binding : ); out.println(enum2.nextElement().toString()); } out.println(listBindings() on full Context today: ); enum2 = ctx.listBindings(java:/comp/env/jdbc/); while (enum2.hasMoreElements()) { out.print(Binding : ); out.println(enum2.nextElement().toString()); } } catch (NamingException e) { out.println(JNDI lookup failed : + e); } try{ Context ctx2 = new InitialContext(); out.print(Connecting1 : ); Context envCtx2 = (Context) ctx2.lookup(java:/comp/env/); out.print(Connecting2 : ); DataSource ds = (DataSource) envCtx2.lookup(jdbc/DBmultileague); out.print(Connecting3 : ); if (ds != null) { out.print(Query1 : ); Connection conn = ds.getConnection(); out.print(Query2 : ); The context/resource definition: Context path=/DBmultileague-0.1-dev docBase=DBmultileague-0.1-dev debug=5 reloadable=true naming=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_DBmultileague_log. suffix=.txt timestamp=true/ Resource name=jdbc/DBmultileague auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/DBmultileague ParameternamemaxIdle/namevalue3000/value/Parameter ParameternamemaxActive/namevalue10/value/Parameter ParameternamemaxWait/namevalue10/value/Parameter Parameternameusername/namevaluesa/value/Parameter Parameternamepassword/namevalue/value/Parameter Parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /Parameter Parameter namedriverClassName/name valuecom.sybase.jdbc2.jdbc.SybDriver/value /Parameter Parameter nameurl/name valuejdbc:sybase:Tds:PowerBookPaul:11222/multiLeague/value /Parameter ParameternameinitialPoolSize/namevalue2/value/Parameter /ResourceParams -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- shawn [EMAIL
System Monitor accuracy
Is it just me or is the System Monitor unreliable. It shows my cpu at 100% locked there and my system is responding slowly but viewing it bye the process listing (all, my and/or active) gives me nothing using the cpu other than the system monitor and netscape at like 1%). Under windows at least I could find and shut the culprit down. It may well have to do with the ide I'm using to write some java stuff or a web app that I'm working on but I hate to just have to kill everything blindly hoping to get working again. -- shawn [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
System Monitor accuracy --sorry
Sorry that was meant to be sent to RedHat. Is it just me or is the System Monitor unreliable -- shawn [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Require a secure connection
According to http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Security5.html another way would be to specify it in web.xml. ... If you specify CONFIDENTIAL or INTEGRAL as a security constraint, that type of security constraint applies to all requests that match the URL patterns in the Web resource collection, not just to the login dialog. Specify CONFIDENTIAL when the application requires that data be transmitted so as to prevent other entities from observing the contents of the transmission. Specify INTEGRAL when the application requires that the data be sent between client and server in such a way that it cannot be changed in transit. The following example code from a web.xml file shows this setting in context: !-- SECURITY CONSTRAINT -- security-constraint web-resource-collection web-resource-nameWRCollection/web-resource-name url-pattern/index.jsp/url-pattern http-methodGET/http-method /web-resource-collection auth-constraint role-nameuser/role-name /auth-constraint user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint Shawn On Fri, 2003-01-17 at 07:09, neal wrote: Does anyone know how to *require* that a page be accessed only via a secure connection? For instance, I *can* request a secure connection to a page by going to https://; and the url ... but how do I prevent a user from going to http://; to request that same page? Would this be a proxy thing or is something I can set in Tomcat? Is there something that wouldn't require the overhead of reflecting upon every single request at the Java level? Thanks. neal -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- shawn [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Cannot load JDBC driver class 'null'
I had that error too. In my case it had to do with how I configured web.xml and server.xml. I was able to get the example from the docs working but when switching to /root context got mixed up. You aren't using the root context are you? In any case, I would double check again server.xml and web.xml and compare them to the examples. That's where my driver class 'null' problem arose. Shawn - Original Message - From: David Durst [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 10, 2003 6:43 PM Subject: Re: Cannot load JDBC driver class 'null' I have experience that before, but that was my fault rather than tomcat. I put the source jar instead of the driver binary. Other than that DBCP worked as described in the tomcat documents. Cannot load JDBC driver class null usually means that it couldn't find the jdbc driver that you specified in the server.xml . that is strange cause I have it in $CATALINA_HOME/common/lib And it is exactly the same class that I used when I was using JDBC non-jndi. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Cannot load JDBC driver class 'null'
I had that error too and just reproduced it again to be sure of how I resolved it. Let's say the following is a correct entry in server.xml: Context path=/DBTest docBase=DBTest debug=5 reloadable=true crossContext=true but I make a mistake and use Context path=/dBTest docBase=DBTest debug=5 reloadable=true crossContext=true **Notice the D vs d in the context path** Then I get a Cannot load JDBC driver class 'null' error message With the root context, where I had my problem, it was confusing because I needed path=/root and not path=/. Also, the error message is seemingly unrelated to the actual problem Anyway, whether or not this is the origin of your error I do not know, but only know that I got the same message when my context path was incorrect. Shawn On Sat, 2003-01-11 at 05:21, Daren R. Sefcik wrote: Yes I have..I have been trying for the last week to figure it out. I have found the same thing that BasicDataSource does not load the driverClassName. I have put my jdbcdriver.jar file in the common/lib dir..and I know it's in the classpath of tomcat as I can write a jsp page with a Class.forName and have it work fine.The problem only surfaces when doing jndi Datasource lookups. The driverClassName from the server.xml file is never passed to BasicDataSource. If anyone can spot errors in my configuration please let me know, thanks.. I know that the server.mxl is being read from my logs: 2003-01-10 11:22:29 NamingContextListener[/Apache/localhost/intranet]: Creating JNDI naming context 2003-01-10 11:22:29 NamingContextListener[/Apache/localhost/intranet]: Resource parameters for jdbc/TestDB = ResourceParams[name=jdbc/TestDB, parameters={factory=org.apache.commons.dbcp.BasicDataSourceFactory, password=user, url=jdbc:jtds:sqlserver://ns1:1433/WebDB, driverClassName=net.sourceforge.jtds.jdbcx.TdsDataSource, username=webuser}] 2003-01-10 11:22:29 NamingContextListener[/Apache/localhost/intranet]: Adding resource ref jdbc/TestDB 2003-01-10 11:22:29 NamingContextListener[/Apache/localhost/intranet]: ResourceRef[className=javax.sql.DataSource,factoryClassLocation=null,factoryClassName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Shareable},{type=auth,content=Container},{type=factory,content=org.apache.commons.dbcp.BasicDataSourceFactory},{type=password,content=user},{type=url,content=jdbc:jtds:sqlserver://ns1:1433/WebDB},{type=driverClassName,content=net.sourceforge.jtds.jdbcx.TdsDataSource},{type=username,content=webuser}] Here is the error from catalina.out: new context ctx lookup gonna try a ds.getConnection java.sql.SQLException: Cannot load JDBC driver class 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312) at foo.DBTest.init(DBTest.java:34) at org.apache.jsp.test_jsp._jspService(test_jsp.java:49) Here is my server.xml: Server port=8005 shutdown=SHUTDOWN debug=0 GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ /GlobalNamingResources Service name=Tomcat-Apache Connector className=org.apache.catalina.connector.warp.WarpConnector port=8008 minProcessors=5 maxProcessors=75 enableLookups=true appBase=webapps acceptCount=10 debug=5/ !-- Replace localhost with what your Apache ServerName is set to -- Engine className=org.apache.catalina.connector.warp.WarpEngine name=Apache debug=5 Host name=localhost debug=5 appBase=webapps unpackWARs=true autoDeploy=true Context path=/intranet docBase=intranet debug=5 reloadable=true crossContext=true Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valuenet.sourceforge.jtds.jdbcx.TdsDataSource/value /parameter parameter nameurl/name valuejdbc:jtds:sqlserver://ns1:1433/WebDB/value /parameter parameter nameusername/name valuewebuser/value /parameter parameter namepassword/name valueuser/value /parameter /ResourceParams Logger className=org.apache.catalina.logger.FileLogger prefix=intranet_log. suffix=.txt timestamp=true/ /Context /Host /Engine /Service /Server And here is the webapps/intranet/WEB-INF/web.xml: ?xml version=1.0? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
Re: Need help w. servlet mapping tag.
I can't ell the problem without seeing your web.xml Shawn - Original Message - From: Steve R Burrus [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 11, 2003 3:08 PM Subject: Need help w. servlet mapping tag. Hello all, I need help with setting the servlet tags as contained in the web.xml file to be able to FINALLY see/view either a JSP or a Servlet!! When I start up Tomcat, I seem to get this damn error msg. : SEVERE: Parse Error at line 14 column 46: The content of element type servlet-m apping is incomplete, it must match (servlet-name,url-pattern). org.xml.sax.SAXParseException: The content of element type servlet-mapping is incomplete, it must match (servlet-name,url-pattern). at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Er rorHandlerWrapper.java:232) at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper. java:173) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter. java:371) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter. java:305) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDVal idator.java:1918) at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator .java:851) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement( XMLDocumentFragmentScannerImpl.java:1008) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent Dispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1469) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM LDocumentFragmentScannerImpl.java:329) at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav a:525) at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav a:581) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152) at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.j ava:1175) at org.apache.commons.digester.Digester.parse(Digester.java:1495) at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextCo nfig.java:282) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:63 9) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi g.java:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl eSupport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3 567) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 97) at org.apache.catalina.core.StandardServer.start(StandardServer.java:218 9) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Jan 10, 2003 8:42:08 PM org.apache.commons.digester.Digester endElement SEVERE: End event threw exception java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.jav a:228) at org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:49 1) at org.apache.commons.digester.Digester.endElement(Digester.java:1036) at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXPar ser.java:585) at org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBind er.java:647) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDVal idator.java:1937) at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator .java:851) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement( XMLDocumentFragmentScannerImpl.java:1008
Re: Need help w. servlet mapping tag.
uuh, sorry. It seems valid according to the check I did. I was just assuming it wasn't valid. I'm not anyone special. Shawn - Original Message - From: Steve R Burrus [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, January 11, 2003 3:46 PM Subject: Re: Need help w. servlet mapping tag. Dear Shawn, Hi I have never heard from u ever before, but here in all of its' glory is the web.xml file in question. Happy Reading! __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameTomcat Examples/display-name description Tomcat Example servlets and JSP pages. /description !-- Define servlet-mapped and path-mapped example filters -- filter filter-nameServlet Mapped Filter/filter-name filter-classfilters.ExampleFilter/filter-class init-param param-nameattribute/param-name param-valuefilters.ExampleFilter.SERVLET_MAPPED/param-value /init-param /filter filter filter-namePath Mapped Filter/filter-name filter-classfilters.ExampleFilter/filter-class init-param param-nameattribute/param-name param-valuefilters.ExampleFilter.PATH_MAPPED/param-value /init-param /filter filter filter-nameRequest Dumper Filter/filter-name filter-classfilters.RequestDumperFilter/filter-class /filter !-- Example filter to set character encoding on each request -- filter filter-nameSet Character Encoding/filter-name filter-classfilters.SetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueEUC_JP/param-value /init-param /filter filter filter-nameCompression Filter/filter-name filter-classcompressionFilters.CompressionFilter/filter-class init-param param-namecompressionThreshold/param-name param-value10/param-value /init-param init-param param-namedebug/param-name param-value0/param-value /init-param /filter !-- Define filter mappings for the defined filters -- filter-mapping filter-nameServlet Mapped Filter/filter-name servlet-nameinvoker/servlet-name /filter-mapping filter-mapping filter-namePath Mapped Filter/filter-name url-pattern/servlet/*/url-pattern /filter-mapping !-- Example filter mapping to apply the Set Character Encoding filter to *all* requests processed by this web application -- !-- filter-mapping filter-nameSet Character Encoding/filter-name url-pattern/*/url-pattern /filter-mapping -- !-- filter-mapping filter-nameCompression Filter/filter-name url-pattern/CompressionTest/url-pattern /filter-mapping -- !-- filter-mapping filter-nameRequest Dumper Filter/filter-name url-pattern/*/url-pattern /filter-mapping -- !-- Define example application events listeners -- listener listener-classlisteners.ContextListener/listener-class /listener listener listener-classlisteners.SessionListener/listener-class /listener !-- Define servlets that are included in the example application -- servlet servlet-nameSendMailServlet/servlet-name servlet-classSendMailServlet/servlet-class /servlet servlet servlet-name snoop /servlet-name servlet-class SnoopServlet /servlet-class !-- init-param param-namefoo/param-name param-valuebar/param-value /init-param -- run-as descriptionSecurity role for anonymous access/description role-nametomcat/role-name /run-as /servlet servlet servlet-name servletToJsp /servlet-name servlet-class servletToJsp /servlet-class /servlet servlet servlet-name CompressionFilterTestServlet /servlet-name servlet-class compressionFilters.CompressionFilterTestServlet /servlet-class /servlet servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping servlet-mapping servlet-name CompressionFilterTestServlet /servlet-name url-pattern /CompressionTest /url-pattern /servlet-mapping servlet-mapping servlet
Re: Need help w. servlet mapping tag.
Stab in the dark. Try taking out the extra spaces in things like servlet-name snoop /servlet-name to be servlet-namesnoop/servlet-name Stupid guess. Hope it doesn't waste your time. Shawn - Original Message - From: Steve R Burrus [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, January 11, 2003 3:46 PM Subject: Re: Need help w. servlet mapping tag. Dear Shawn, Hi I have never heard from u ever before, but here in all of its' glory is the web.xml file in question. Happy Reading! __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameTomcat Examples/display-name description Tomcat Example servlets and JSP pages. /description !-- Define servlet-mapped and path-mapped example filters -- filter filter-nameServlet Mapped Filter/filter-name filter-classfilters.ExampleFilter/filter-class init-param param-nameattribute/param-name param-valuefilters.ExampleFilter.SERVLET_MAPPED/param-value /init-param /filter filter filter-namePath Mapped Filter/filter-name filter-classfilters.ExampleFilter/filter-class init-param param-nameattribute/param-name param-valuefilters.ExampleFilter.PATH_MAPPED/param-value /init-param /filter filter filter-nameRequest Dumper Filter/filter-name filter-classfilters.RequestDumperFilter/filter-class /filter !-- Example filter to set character encoding on each request -- filter filter-nameSet Character Encoding/filter-name filter-classfilters.SetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueEUC_JP/param-value /init-param /filter filter filter-nameCompression Filter/filter-name filter-classcompressionFilters.CompressionFilter/filter-class init-param param-namecompressionThreshold/param-name param-value10/param-value /init-param init-param param-namedebug/param-name param-value0/param-value /init-param /filter !-- Define filter mappings for the defined filters -- filter-mapping filter-nameServlet Mapped Filter/filter-name servlet-nameinvoker/servlet-name /filter-mapping filter-mapping filter-namePath Mapped Filter/filter-name url-pattern/servlet/*/url-pattern /filter-mapping !-- Example filter mapping to apply the Set Character Encoding filter to *all* requests processed by this web application -- !-- filter-mapping filter-nameSet Character Encoding/filter-name url-pattern/*/url-pattern /filter-mapping -- !-- filter-mapping filter-nameCompression Filter/filter-name url-pattern/CompressionTest/url-pattern /filter-mapping -- !-- filter-mapping filter-nameRequest Dumper Filter/filter-name url-pattern/*/url-pattern /filter-mapping -- !-- Define example application events listeners -- listener listener-classlisteners.ContextListener/listener-class /listener listener listener-classlisteners.SessionListener/listener-class /listener !-- Define servlets that are included in the example application -- servlet servlet-nameSendMailServlet/servlet-name servlet-classSendMailServlet/servlet-class /servlet servlet servlet-name snoop /servlet-name servlet-class SnoopServlet /servlet-class !-- init-param param-namefoo/param-name param-valuebar/param-value /init-param -- run-as descriptionSecurity role for anonymous access/description role-nametomcat/role-name /run-as /servlet servlet servlet-name servletToJsp /servlet-name servlet-class servletToJsp /servlet-class /servlet servlet servlet-name CompressionFilterTestServlet /servlet-name servlet-class compressionFilters.CompressionFilterTestServlet /servlet-class /servlet servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping servlet-mapping servlet-name CompressionFilterTestServlet /servlet-name url-pattern /CompressionTest
Re: java.sql.SQLException: Cannot load JDBC driver class 'null'
Try changing this value ResourceParams name=jdbc/TestDB Shouldn't it be jdbc/InfectedDB ? That's my guess. Shawn On Thu, 2003-01-02 at 12:29, Anastasios Angelidis wrote: Hi I downloaded the MySQL Connector/J 2.0.14 JDBC drivers and I copied the mysql-connector-java-2.0.14-bin.jar to the common/lib folder... Here is my server.xml context config... Context path=/infected docBase=infected debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_infected_log. suffix=.txt timestamp=true/ Resource name=jdbc/InfectedDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB parameternamefactory/namevalueorg.apache.commons.dbcp.BasicDataSourceFactory/value/parameter parameternamemaxActive/namevalue100/value/parameter parameternamemaxIdle/namevalue30/value/parameter parameternamemaxWait/namevalue1/value/parameter parameternameusername/namevaluexx/value/parameter parameternamepassword/namevaluexx/value/parameter parameternamedriverClassName/namevaluecom.mysql.jdbc.Driver/value/parameter parameternameurl/namevaluejdbc:mysql://localhost:3306/infected/value/parameter /ResourceParams /Context Here is my web.xml... web-app display-nameinfected rhythms/display-name descriptioninfected rhythms web site/description resource-ref descriptionDB Connection/description res-ref-namejdbc/InfectedDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app Then I worte this simple JSP code... try { Context ctx = new InitialContext(); DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/InfectedDB); Connection conn = ds.getConnection(); The rest of the code... } catch(Exception ex) { ex.printStackTrace(); } The exception os caught whne trying to get the connection Connection conn = ds.getConnection(); Any ideas? Thanks The stack trace... java.sql.SQLException: Cannot load JDBC driver class 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312) at org.apache.jsp.artists_jsp._jspService(artists_jsp.java:57) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) 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:2415) 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:170) 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:509) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480
Re: Mysql driver problem...
I got that same message myself many times. Are you trying from the root context? If so, you'll need resource-ref descriptionDB Connection/description res-ref-namejdbc/root/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref in web.xml and Context path=/root docBase=root debug=5 reloadable=true crossContext=true in server.xml that's what worked for me anyway Shawn On Mon, 2002-12-30 at 16:22, Keith Pemberton wrote: Ok, first off sorry if this is a little vague and I can write more details later. Anyway, I am new at this stuff with setting up the mysql driver to work with tomcat by setting a JNDI Datasource. I followed the directions under that heading in the documentation from the Tomcat website for the mysql driver, but I keep getting a Cannot load JDBC driver class 'null' message when I try to create a connection using the driver. I put the .jar file in the $TOMCAT/common/lib directory and restarted tomcat. Anyone have any quick tips for me to try? I can post my code later if yall need it; it's just late right now and I don't feel like cutting and pasting. Anyway, thanks in advance! Keith -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- shawn [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Mysql driver problem...
just like the example, I should think that would be ok. my point was Context path=/root docBase=root debug=5 reloadable=true crossContext=true and not sililar to the following which I found in server.xml !-- Tomcat Root Context -- !-- Context path= docBase=ROOT debug=0/ -- I tried Context path= docBase=ROOT debug=0/ and got the same message you did. On Mon, 2002-12-30 at 17:09, Keith Pemberton wrote: Well, my JNDI name for the resource is jdbc/gatep5 and that is what I have as the ResourceParams name=jdbc/gatep5. Then I translated that name into the web.xml which is under the ROOT directory of $Tomcat/webapps. Shouldn't this be ok? Keith On Mon, 2002-12-30 at 02:03, shawn wrote: I got that same message myself many times. Are you trying from the root context? If so, you'll need resource-ref descriptionDB Connection/description res-ref-namejdbc/root/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref in web.xml and Context path=/root docBase=root debug=5 reloadable=true crossContext=true in server.xml that's what worked for me anyway Shawn On Mon, 2002-12-30 at 16:22, Keith Pemberton wrote: Ok, first off sorry if this is a little vague and I can write more details later. Anyway, I am new at this stuff with setting up the mysql driver to work with tomcat by setting a JNDI Datasource. I followed the directions under that heading in the documentation from the Tomcat website for the mysql driver, but I keep getting a Cannot load JDBC driver class 'null' message when I try to create a connection using the driver. I put the .jar file in the $TOMCAT/common/lib directory and restarted tomcat. Anyone have any quick tips for me to try? I can post my code later if yall need it; it's just late right now and I don't feel like cutting and pasting. Anyway, thanks in advance! Keith -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- shawn [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- shawn [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: session id's really unique?
Just to confirm, If I send use RequestDispatcher.forward(request, response) and send it to another context, that session will be newly managed under the new context (or by the original context) and therefore there is no risk of duplicate id's. The other issue is to be patched. Shawn Sorry to be paranoid. Can't help it though. On Mon, 2002-12-30 at 23:58, Glenn Olander wrote: You run the risk of getting duplicate session id's. However, across contexts you'll have separate Managers, and therefore different sets of sessions. So, you don't run the risk of one context gaining access to another context's sessions. The risk is the one discussed in the other session id thread where if you get duplicate session id's in the same context. Then you've got serious problems. shawn wrote: If I use RequestDispatcher.forward(request, response) to another context am I running the risk of session id conflicts? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- shawn [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
session id's really unique?
If I use RequestDispatcher.forward(request, response) to another context am I running the risk of session id conflicts? I mean if a session Id is given in one context, another context is restarted and the java.security.SecureRandom is re-initialized for that webapp, then it would seem possible that newly generated sessions in the second context could match the previosly generated session id that was transferred from the first context. I doubt I know as much as many on this list, but that is something that I wondered about. Shawn PS I'm relying on potentially outdated info from a list that was posted in response to this topic. Tomcat 4 uses an instance of java.security.SecureRandom to generate session identifiers for a particular session. The instance is initialized the first time (after Tomcat is started, or after a webapp is restarted) that a session identifier is requested. More seriously, it is *you* as the application developer that is deciding whether or not to execute the RequestDispatcher.include() or RequestDispatcher.forward() call -- it's not the container. It is totally up to *you* to decide whether or not this is allowed, because *you* wrote the app. yes I did but will the sessions tranfer uniquely? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Newbie: Java Mail Problem
David, A troubleshooting idea. I'd isolate this problem by ensuring you can communicate directly via javamail. Try a simple test such as this (in a JSP will work fine)... String host = smtp.verizon.net; String from = [EMAIL PROTECTED]; String to = [EMAIL PROTECTED]; // Get system properties Properties props = System.getProperties(); // Setup mail server props.put(mail.smtp.host, host); // Get session Session mailsession = Session.getDefaultInstance(props, null); // Define message MimeMessage message = new MimeMessage(mailsession); // Set the from address message.setFrom(new InternetAddress(from)); // Set the to address message.addRecipient(Message.RecipientType.TO, new InternetAddress(to)); // Set the subject message.setSubject(Test message); // Set the content message.setText(Testing); // Send message Transport.send(message); If this works.. then I'd suspect something in TC or your config. If it doesn't.. you might want to post this info. to the javamail list. Lots of helpful people over there. Good luck, Shawn. yes, I stopped and restarted the Tomcat service. Denis Haskin wrote: From the error, looks like it's still trying to connect to an smtp server at localhost. Did you restart Tomcat after changing mail.smtp.host? dwh David Diskin wrote: I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I installed it as a service. I have no problem connecting to the Tomcat main web page. I reconfigured conf/server.xml and changed to value of mail.smtp.host to smtp.verizon.net, my isp mail server. However, when I go to run the jsp send mail example, I get the following exception. Can anyone help on this? == ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
OK Re: ClassCastException Conn=dataSource.getConnection();
I see now. Thanks. My confusion was this in server.xml !-- Tomcat Root Context -- !-- Context path= docBase=ROOT debug=0/ -- so I had Context path= docBase=root debug=5 reloadable=true crossContext=true... instead of Context path=/root docBase=root debug=5 reloadable=true crossContext=true... and DataSource dataSource2=(DataSource)ctx.lookup(java:comp/env/jdbc/); instead of DataSource dataSource2=(DataSource)ctx.lookup(java:comp/env/jdbc/root); It's because jdbc is not a datasource, it's a container (or something similar. I have not the time to look it up). In your server.xml/web.xml files you should have a resource that's probably named jdbc/myConnection. Your code should read dataSource2=(DataSource)ctx.lookup( java:comp/env/jdbc/myConnection ); This of course is a guess. Without your config file, it's hard to tell. Sorry if this is a duplicate post, but I replied from the wrong account earlier. Andy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DBCP trouble in 4.12
Hello, Not at all sure if this is my own problem or a bigger issue but I moved from 4.06 to 4.12 recently and... The example DBCP given for mysql works fine for me with mysql-connector-java-2.0.14-bin.jar Thanks for the nice docs! However, when I move the code to an app I'm trying to move, I get a Cannot load JDBC driver class 'null' error message. It stems from Connection conn=dataSource.getConnection(); (see complete snippet below) The code was originally in a servlet (and the ds got passed to a bean) but I moved everything to the bean with the same results. Connection conn; // Get the user info from the database try { Context ctx = new InitialContext(); if(ctx == null ) throw new Exception(Boom - No Context); DataSource dataSource2=(DataSource)ctx.lookup(java:comp/env/jdbc/TestDB); if(dataSource2 == null ) throw new Exception(Boom - No dataSource); conn = dataSource2.getConnection(); } catch (Exception e){throw new SQLException(couldn't get conn from dataSource2 in employeeBean+e.toString());} Yes, I recompiled everything after the move and have the driver in the Catalina_Home/common/lib dir. TIA, Shawn -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
ClassCastException Conn=dataSource.getConnection();
I am getting a java.lang.ClassCastException from Connection conn = datasource.getConnection(); in the folowing: try { Context ctx = new InitialContext(); if(ctx == null ) {throw new Exception(Boom - No Context);} DataSource dataSource2=(DataSource)ctx.lookup(java:comp/env/jdbc/); if(dataSource2 == null ) {throw new Exception(Boom - No dataSource);} conn = dataSource2.getConnection(); } Why would that be? TIA Shawn PS the ds =null error I had earlier was due to not setting up my root context properly. That document base threw me off. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Admin Webapp Problems (WAS: MBean server?)
Okay, this was just dumb on my part. When I installed Tomcat I installed the tomcat-noexamples and tomcat-admin RPM's. However, I noticed that installing Tomcat on a different machine (with examples), the first section in the server.xml file having to do with (believe it or not!) MBean server was not commented out like it was in the noexamples server.xml file. So basically that's all the problem was... if I had looked at server.xml more closely sooner I could have saved myself lots of frustration! Thanks for all the help, -shawn Jacob Kjome wrote: Hi Shawn, I'd recommend installing the full non-RPM version that includes all necessary jars. In that version, you will see the following files in common/endorsed: xercesImpl.jar xmlParserAPIs.jar What Bill says it correct, though. The Xerces version that come with Tomcat causes problems with Struts apps because of an XML parsing bug in Xerces which was recently fixed. You can either do as he says and go back to using 2.1.0 version or move to the latest jars which contain the fix: http://gump.covalent.net/jars/latest/xml-xerces2/ Otherwise, you could also check the xml commons to grab a xml-commons-api's jar that contains an earlier version of the xerces packages equivalent to the 2.1.0 release. http://xml.apache.org/commons/ Jake Tuesday, November 26, 2002, 10:05:27 AM, you wrote: SW Hi Bill, SW Thanks for the info. I checked, but there isn't any xerces jar in SW $CATALINA_HOME/common/endorsed... only jaxp_parser_impl.jar and SW xml-commons-apis.jar. This was just a basic RPM install of Tomcat along SW with the admin webapps. Also, the exception trace I posted _was_ from SW catalina.out, so that's as detailed as it gets. SW By the way, what is this MBean server it is looking for anyways? SW Thanks, SW -shawn SW Bill Barker wrote: I'm guessing that there is a more informative message in 'catalina.out', and that the problem is that 4.1.12 doesn't work with xerces-2.2.x (other than 'nightly'). Replace the xerces jars in $CATALINA_HOME/common/endorsed with the 2.1.0 version, and it should be fine. Shawn Wilson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have the following packages installed on a RedHat 7.3 box: tomcat4-4.1.12-full.2jpp tomcat4-admin-webapps-4.1.12-full.2jpp Tomcat starts up fine and I can log into the admin app without problem. However, the moment I try to do anything in the admin app I get a HTTP Status 503 - Servlet action is currently unavailable error, and I see this in my catalina.out log file: javax.servlet.UnavailableException: MBeanServer is not available at org.apache.webapp.admin.ApplicationServlet.initServer(Unknown Source) at org.apache.webapp.admin.ApplicationServlet.getServer(Unknown Source) at org.apache.webapp.admin.TomcatTreeBuilder.buildTree(Unknown Source) at org.apache.webapp.admin.SetUpTreeAction.perform(Unknown Source) at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.ja va) at org.apache.struts.action.ActionServlet.process(ActionServlet.java) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source) ... ... What does this exception mean, and what do I need to do to get the admin app running? Thanks, -shawn -- ==== Shawn Wilson [[EMAIL PROTECTED]] Software Developer, ATMReports.com PH: 877-327-0873, FAX: 406-294-5806 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- ==== Shawn Wilson [[EMAIL PROTECTED]] Software Developer, ATMReports.com PH: 877-327-0873, FAX: 406-294-5806 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
MBean server?
I have the following packages installed on a RedHat 7.3 box: tomcat4-4.1.12-full.2jpp tomcat4-admin-webapps-4.1.12-full.2jpp Tomcat starts up fine and I can log into the admin app without problem. However, the moment I try to do anything in the admin app I get a HTTP Status 503 - Servlet action is currently unavailable error, and I see this in my catalina.out log file: javax.servlet.UnavailableException: MBeanServer is not available at org.apache.webapp.admin.ApplicationServlet.initServer(Unknown Source) at org.apache.webapp.admin.ApplicationServlet.getServer(Unknown Source) at org.apache.webapp.admin.TomcatTreeBuilder.buildTree(Unknown Source) at org.apache.webapp.admin.SetUpTreeAction.perform(Unknown Source) at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java) at org.apache.struts.action.ActionServlet.process(ActionServlet.java) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source) ... ... What does this exception mean, and what do I need to do to get the admin app running? Thanks, -shawn -- Shawn Wilson [[EMAIL PROTECTED]] Software Developer, ATMReports.com PH: 877-327-0873, FAX: 406-294-5806 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: coredump using tomcat 3.2.4
#] gdb /path/to/executable /path/to/corefile ...loads all the symbols from the core ... (gdb)bt .. prints the stack trace of the segfault .. I have not done this with tomcat. your milage may vary. If you do not have a core you can do it this way #]gdb /path/to/executable (gdb) run -X ( cause your app to crash ) (gdb)bt On Thursday 14 November 2002 04:32 pm, John Park wrote: hi, All, We recently experienced a coredump when using an embedded tomcat servlet engine (version 3.2.4). The last hint was two stack traces showing socket read timeouts. The java version we were using is 1.2.2_12 on solaris 2.8. Has anyone seen something similar? I am not trying to solve the problem here but any ideas on how to trace the cause of the coredump is greatly appreciated. Thanks a lot, John PS: the stack trace looks like: java.io.InterruptedIOException: Read timed out at java.net.SocketInputStream.socketRead(Native Method) at java.net.SocketInputStream.socketRead(Compiled Code) at java.net.SocketInputStream.read(Compiled Code) at java.io.BufferedInputStream.fill(Compiled Code) at java.io.BufferedInputStream.read(Compiled Code) at org.apache.tomcat.service.http.HttpRequestAdapter.doRead(Compiled Code) at org.apache.tomcat.core.BufferedServletInputStream.doRead(Compiled Code) at org.apache.tomcat.core.BufferedServletInputStream.read(Compiled Code) at javax.servlet.ServletInputStream.readLine(Compiled Code) at org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequest(Compiled Code) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Comp iled Code) at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code) at java.lang.Thread.run(Compiled Code) Segmentation Fault - core dumped __ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Apache Index page jsp and sessionid with JKMount *.jsp
Use mod_dir in Apache. It is standard. add this directive in you apache conf DirectoryIndex index.jsp index.php index.html index.htm options are listed in order of preference. the directive can go in the main conf or in a Vitual Host Container. See the apache docs for more detail. http://httpd.apache.org/docs-2.0/mod/mod_dir.html#directoryindex On Wednesday 13 November 2002 01:56 pm, Turner, John wrote: That's pretty much the solution...this has come up before. By the time JK gets involved, Apache is just about done with the URL...it doesn't perform any rewriting, etc. it's just looking for a match. The elegant solution is probably using mod_rewrite to rewrite requests ending in / to /index.jsp. John -Original Message- From: Chad Cannell [mailto:ccannell;elogex.com] Sent: Wednesday, November 13, 2002 3:45 PM To: Tomcat Users List Subject: Apache Index page jsp and sessionid with JKMount *.jsp I am trying to set Apache's index file to index.jsp. It is not working. I am using JKmount *.jsp for the dynamic stuff, so for what ever reason, Apache won't server this as the point of entry to our site. We currently use an index.html page to redirect to index.jsp, but want to get rid of that. Any ideas? Using Apache 2.0, ajp13. Tomcat 3.2x Chad -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Testing Datasources
Looks fine, I would put the DBname as part of the URL, but I think it will work the way you have it. jdbc:microsoft:sqlserver://vc34:1433/TibcoClearHouse On Thursday 31 October 2002 02:23 pm, John Mattos wrote: Ah! Thank you! Good catch. Alright 2 more dumb questions (I'm not above that) in web xml, the resource-ref is... resource-ref descriptionDB Connection/description res-ref-namejdbc/indemand/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Correct? Also, the db url I'm using is... jdbc:microsoft:sqlserver://vc34:1433;databaseName=TibcoClearHouse and I'm wondering if that's in the right format... Thanks John shawn [EMAIL PROTECTED] wrote:driverClassName is : com.microsoft.jdbc.sqlserver.SQLServerDriver driverClassName com.microsoft.jdbc.sqlserver.SQLServerDriver Not : C:\Tomcat4.1\common\lib\msbase.jar;C:\Tomcat4.1\common\lib\mssqlserver.jar; C:\Tomcat4.1\common\lib\msutil.jar these need to be somewhere in your classpath Also do not forget the resource-ref in web.xml On Thursday 31 October 2002 01:49 pm, John Mattos wrote: Ah... interesting. No, I can't see them loading, but they're set up at the app and global level. Why wouldn't they be loading? Here's a snippet from server.xml validationQuery select top 100 * from Subscriber url jdbc:microsoft:sqlserver://vc34:1433;databaseName=TibcoClearHousealue password tibco_user maxActive 12 maxWait 5000 driverClassName C:\Tomcat4.1\common\lib\msbase.jar;C:\Tomcat4.1\common\lib\mssqlserv er.jar;C:\Tomcat4.1\common\lib\msutil.jar; username tibco_user Thoughts? [EMAIL PROTECTED] wrote:Where do you setup your datasource? If Global or default context, you should be able to see JNDI reference loading when you start your tomcat. Regards, Phillip Qin Software Developer Canadian Shareowner 121 Richmond Street W, 7th Floor Toronto, ON M5H 2K1 (416) 595-9600 ext 291 -Original Message- From: John Mattos [mailto:mattosj;yahoo.com] Sent: October 31, 2002 3:33 PM To: Tomcat Users List Subject: Testing Datasources Is there as easy way to test datasources I set up in server.xml (or in the Administrator app)? John L. Mattos 302 East 88th Street Apt #5B New York, New York 10128-4939 (M) (917) 202-8450 (www) http://www.mattos.ws - Do you Yahoo!? HotJobs - Search new jobs daily now - Yahoo! - We Remember 9-11: A tribute to the more than 3,000 lives lost -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Tomcat just dies
Look closely at this line. /valuejdbc:weblogic:mssqlserver4:Questionslocalhost/value On Thursday 31 October 2002 02:32 pm, pkrishnaswami wrote: I added some entries to the server.xml for database configuration; Here are the additions I made: Context. Resource name=jdbc/Questions auth=Container type=javax.sql.DataSource ResourceParams name=jdbc/Questions parameter namedriverClassName/name valueweblogic.jdbc.mssqlserver4.Driver/value /parameter parameter nameurl/name /valuejdbc:weblogic:mssqlserver4:Questionslocalhost/value /parameter parameter nameuser/name valuesa/value /parameter parameter namepassword/name value/value /parameter /ResourceParams /Context When I now startup the server in a DOX box in Windows 2000 env, the tomcat icon just shows up and then goes away. If I remove the aboev entry, Tomcat server starts up. Any idea why this would happen. Is there a way to see the messages printed by the Tomcat server when it comes up. Prabhakar -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Setup of Develoment Environment
put a servlet mapping in your web.xml file.. servlet servlet-nameHelloWorld/servlet-name servlet-classHelloWorld/servlet-class /servlet servlet-mapping servlet-nameHelloWorld/servlet-name url-pattern/servlet/HelloWorld/url-pattern /servlet-mapping see http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/deployment.html for more info. shawn On Wednesday 30 October 2002 02:36 pm, Raghava Rao wrote: Hello, I'm new to Servlet programming and need help in starting to develop servlets. I have downloaded jakarta-tomcat-4.0.6. Once installed, it's installed as C:\Program Files\Apache Tomcat 4.0 Now, I have a development environment of my own, where I write and compile my Java files.. Like, C:\servlet\examples\HelloWorld.java After providing the servlet.jar file in my CLASSPATH, and compiling HelloWorld.java, I got HelloWorld.class. Now, where do I move this class file to view it as http://localhost/servlet/HelloWorld?? I copied the classfile to C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\WEB-INF\classes, where classes dir was created by me and class files copied there. Now, starting the Tomcat Webserver, I try opening this in Internet Explorer as http://localhost/servlet/HelloWorld, I get the webpage error as: Apache Tomcat/4.0.6 - HTTP Status 404 - /servlet/HelloWorld --- - type Status report message /servlet/HelloWorld description The requested resource (/servlet/HelloWorld) is not available. What am I missing? I've thoroughly followed http://www.moreservlets.com/Using-Tomcat-4.html, need help at the earliest. Thank you. Raghava _ Unlimited Internet access for only $21.95/month. Try MSN! http://resourcecenter.msn.com/access/plans/2monthsfree.asp -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Unable to use getGeneratedKeys() through dbpc
Thanks for the help Steve, here is the code that works... try { javax.naming.Context ctx = new javax.naming.InitialContext(); javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup(java:comp/env/jdbc/testDB); Connection conn = ds.getConnection(); / BEGIN WORKAROUND org.apache.commons.dbcp.DelegatingStatement dste = (org.apache.commons.dbcp.DelegatingStatement)conn.createStatement(); Statement ste = dste.getDelegate(); / END WORKAROUND ste.execute(INSERT INTO test (name) VALUES ('test name') ); ResultSet rs = ste.getGeneratedKeys(); rs.next(); out.print(rs.getInt(GENERATED_KEY)); } catch ( Exception e ) { out.print(e.getMessage()); e.printStackTrace(); } The root cause is that dbpc's org.apache.commons.dbcp.DelegatingStatement has a passthru method for every Statement method as defined by the jdbc2 version of the Statement Interface. The DelegatingStatement then simply calls the corresponding Statement method i.e. public int executeUpdate(String sql) throws SQLException { checkOpen(); return _stmt.executeUpdate(sql);} What is needed is the following public ResultsSet getGeneratedKeys() throws SQLException { checkOpen(); return _stmt.getGeneratedKeys();} Of course the more appropriate way of doing it would be to implement the entire jdbc3 version of the Statement interface (as well as the other APIs in jdbc). Perhaps if I get time I will give it a shot On Monday 21 October 2002 12:36 pm, [EMAIL PROTECTED] wrote: Hmmm, Thats an interesting one, as DelegatingStatement is just a wrapper class round a regular Statement...And according to the javadocs it inherits the getGeneratedKeys() from the Statement! You can get access to the wrapped Statement class with ((DelegatingStatement)ste).getDelegate() - You could maybe try calling the getGeneratedKeys() on that and see what happens! Its a bit kludgey as you really shouldnt have to cast the Statement - but javac/jasper will choke if you dont I think! Without having a JDBC 3.0 driver to try it out myself thats the best I can say - hope that helps! Steve -Original Message- From: shawn [mailto:shawn;wnsi.net] Sent: Monday, October 21, 2002 2:19 PM To: Tomcat Users List Subject: Re: Unable to use getGeneratedKeys() through dbpc Thanks for the input Steve, I agree that it SHOULDN'T be dbpc, but it looks as if it is. Actually the driver does support it quite nicely. Everything works great if I create my connection manually. Things only break if I retrieve the connection from jndi ( and thus dbpc ). //This can use getGeneratedKeys() Class.forName(com.mysql.jdbc.Driver).newInstance(); Connection conn = DriverManager.getConnection(jdbc:mysql://localhost:3306/testDB?user=+dbUs e r+password=+dbPass); //This cannot.. javax.naming.Context ctx = new javax.naming.InitialContext(); javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup(java:comp/env/jdbc/testDB); Connection conn = ds.getConnection(); As things stand now I must either give up connection pooling ( not a good option ) or create a workaround through sql ( decreased performance through through additional queries ). Anybody know a way I can have both? On Monday 21 October 2002 11:54 am, [EMAIL PROTECTED] wrote: Shawn, It shouldnt be DBCP that would cause getGeneratedKeys() to not work - its the JDBC Driver that doesnt support it - my (limited) knowledge of the various different databases is that very few support the JDBC 3.0 specification yet so you might have to do a work-around. Its worth checking the MySQL web page to see what it supports right now but my guess is some subset of JDBC 2.0. You'll probably HAVE to do a workaround by retrieving the new key or something else! Hope this helps, Steve -Original Message- From: shawn [mailto:shawn;wnsi.net] Sent: Monday, October 21, 2002 1:36 PM To: [EMAIL PROTECTED] Subject: Unable to use getGeneratedKeys() through dbpc Hi folks, It seems to me that dbpc does not support getGeneratedKeys(). If I understand correctly this is a jdbc v3 call and it is possible that dbpc will not yet support jdbc3. I would appreciate any suggestions on alternative pooling mechanisms that could support this (Or any corrections if I am just being dumb). I would really rather not rely on queries to retrieve the new key after the insert. Here are the setup details.. RedHat 7.3 Tomcat 4.1.2 MySQL Connector/J 3.0.1 dbpc is working from within JSP, beans and servlets great, but chokes when requesting the generated key after an insert. Here is some code and exceptions try { //Doing non-pooled connection
Re: Unable to use getGeneratedKeys() through dbpc
Thanks for the input Steve, I agree that it SHOULDN'T be dbpc, but it looks as if it is. Actually the driver does support it quite nicely. Everything works great if I create my connection manually. Things only break if I retrieve the connection from jndi ( and thus dbpc ). //This can use getGeneratedKeys() Class.forName(com.mysql.jdbc.Driver).newInstance(); Connection conn = DriverManager.getConnection(jdbc:mysql://localhost:3306/testDB?user=+dbUser+password=+dbPass); //This cannot.. javax.naming.Context ctx = new javax.naming.InitialContext(); javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup(java:comp/env/jdbc/testDB); Connection conn = ds.getConnection(); As things stand now I must either give up connection pooling ( not a good option ) or create a workaround through sql ( decreased performance through through additional queries ). Anybody know a way I can have both? On Monday 21 October 2002 11:54 am, [EMAIL PROTECTED] wrote: Shawn, It shouldnt be DBCP that would cause getGeneratedKeys() to not work - its the JDBC Driver that doesnt support it - my (limited) knowledge of the various different databases is that very few support the JDBC 3.0 specification yet so you might have to do a work-around. Its worth checking the MySQL web page to see what it supports right now but my guess is some subset of JDBC 2.0. You'll probably HAVE to do a workaround by retrieving the new key or something else! Hope this helps, Steve -Original Message- From: shawn [mailto:shawn;wnsi.net] Sent: Monday, October 21, 2002 1:36 PM To: [EMAIL PROTECTED] Subject: Unable to use getGeneratedKeys() through dbpc Hi folks, It seems to me that dbpc does not support getGeneratedKeys(). If I understand correctly this is a jdbc v3 call and it is possible that dbpc will not yet support jdbc3. I would appreciate any suggestions on alternative pooling mechanisms that could support this (Or any corrections if I am just being dumb). I would really rather not rely on queries to retrieve the new key after the insert. Here are the setup details.. RedHat 7.3 Tomcat 4.1.2 MySQL Connector/J 3.0.1 dbpc is working from within JSP, beans and servlets great, but chokes when requesting the generated key after an insert. Here is some code and exceptions try { //Doing non-pooled connection works Class.forName(com.mysql.jdbc.Driver).newInstance(); Connection conn = DriverManager.getConnection(jdbc:mysql://localhost:3306/testDB?user=+dbUs e r+password=+dbPass); /* //Doing dbpc provided connection throws an exception javax.naming.Context ctx = new javax.naming.InitialContext(); javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup(java:comp/env/jdbc/testDB); Connection conn = ds.getConnection(); */ Statement ste = conn.createStatement(); ste.execute(INSERT INTO test (name) VALUES ('test name') ); ResultSet rs = ste.getGeneratedKeys(); rs.next(); out.print(rs.getInt(GENERATED_KEY)); } catch ( Exception e ) { out.print(e.getMessage()); e.printStackTrace(); } Here the message and stack trace org.apache.jasper.JasperException: org.apache.commons.dbcp.DelegatingStatement.getGeneratedKeys()Ljava/sql/Res u ltSet; at org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source) at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source) at org.apache.jasper.servlet.JspServlet.service(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source) at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invo k eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invo k eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContext.invoke(Unknown Source) at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invo k eNext(Unknown Source) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline
Unable to use getGeneratedKeys() through dbpc
Hi folks, It seems to me that dbpc does not support getGeneratedKeys(). If I understand correctly this is a jdbc v3 call and it is possible that dbpc will not yet support jdbc3. I would appreciate any suggestions on alternative pooling mechanisms that could support this (Or any corrections if I am just being dumb). I would really rather not rely on queries to retrieve the new key after the insert. Here are the setup details.. RedHat 7.3 Tomcat 4.1.2 MySQL Connector/J 3.0.1 dbpc is working from within JSP, beans and servlets great, but chokes when requesting the generated key after an insert. Here is some code and exceptions try { //Doing non-pooled connection works Class.forName(com.mysql.jdbc.Driver).newInstance(); Connection conn = DriverManager.getConnection(jdbc:mysql://localhost:3306/testDB?user=+dbUser+password=+dbPass); /* //Doing dbpc provided connection throws an exception javax.naming.Context ctx = new javax.naming.InitialContext(); javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup(java:comp/env/jdbc/testDB); Connection conn = ds.getConnection(); */ Statement ste = conn.createStatement(); ste.execute(INSERT INTO test (name) VALUES ('test name') ); ResultSet rs = ste.getGeneratedKeys(); rs.next(); out.print(rs.getInt(GENERATED_KEY)); } catch ( Exception e ) { out.print(e.getMessage()); e.printStackTrace(); } Here the message and stack trace org.apache.jasper.JasperException: org.apache.commons.dbcp.DelegatingStatement.getGeneratedKeys()Ljava/sql/ResultSet; at org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source) at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source) at org.apache.jasper.servlet.JspServlet.service(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source) at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContext.invoke(Unknown Source) at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source) at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:536) - Root Cause - javax.servlet.ServletException: org.apache.commons.dbcp.DelegatingStatement.getGeneratedKeys()Ljava/sql/ResultSet; at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown Source) at org.apache.jsp.testGeneratedKeys_jsp._jspService(testGeneratedKeys_jsp.java:81) at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source) at
Tomcat 4.1.12 unpackWARs
I found some hint of this in past archives, and am wondering if this is a bug or if I am missing something. The following will not unpack a .war file existing in the appBase directory. Tomcat processes will start and then quickly die because according to the log messages generated, the docBase directory doesn't (yet) exist, which is true since the .war didn't first expand: Engine className=org.apache.catalina.connector.warp.WarpEngine defaultHost=localhost name=Tomcat-Apache Engine debug=0 Host name=localhost debug=9 appBase=webapps autoDeploy=true unpackWARs=true Realm className=org.apache.catalina.realm.MemoryRealm / Context path=/testapp docBase=testapp reloadable=true privileged=true debug=1 / /Host /Engine It will unpack correctly if no context is specified, and it will work as shown above if the docBase directory is already unpacked. This will also work if I set unpackWARs to false, and the docBase to the war file, but I really need the war to be expanded in this case. Is there a work-around for this behavior, other than manually unpacking? My environment is SuSE Linux 8.0, Apache 1.3.26, Tomcat 4.1.12. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] Job Openings
I'm really not sure what your post has to do with Tomcat. Perhaps you should post to a jobs list? -shawn Shawn Wilson [[EMAIL PROTECTED]] Software Developer, ATMReports.com PH: 877-327-0873, FAX: 406-294-5806 -Original Message- From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 8:21 AM To: 'Tomcat Users List' Subject: Job Openings Hi, My company is looking for experienced Java professionals with 3-4 years of experience. Experience in core, serverside Java, JSP, XML and XSL is a must. If you are interested, please send your resume to [EMAIL PROTECTED] Thanks Manoj. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 11:03 AM To: Tomcat Users List Subject: RE: Redirect not working I'm quite sure: in one case I explicitly do a sendRedirect(newurl) from within a servlet. Furthermore, the response code is 302, which is a temporary redirection. Jonathan Soons [EMAIL PROTECTED] on 18/09/2002 15.45.03 Please respond to Tomcat Users List [EMAIL PROTECTED] To:Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: Redirect not working Are you sure that is a Redirect? Redirect requires /path - URL. Yours looks like an Alias. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 7:12 AM To: [EMAIL PROTECTED] Subject: Redirect not working Hi all. My configuration is: Apache 2.0.35 and Tomcat 4.0.3 (or 4.0.4, same behaviour), with mod_webapp and warp connector. Solaris 8, jdk 1.4.0. If I deploy examples webapp and access it through Tomcat's standalone listener (port 8080) everything works ok. When I access it through Apache, it works well until I find some kind of redirection (ie /examples/ - /examples/index.html), then I get a page with the message: Apache Tomcat/4.0.3 -HTTP Status 302 - Moved Temporarily but redirection is NOT followed by the browser (I've tried various versions of IE, Netscape, Mozilla...). If I try to connect using telnet, the response with port 8080 is: HTTP/1.1 302 Moved Temporarily while through Apache is: HTTP/1.1 Moved Temporarily Nevertheless, in access.log of Apache the status code for my request is correctly set to 302. Same behaviour if I do a sendRedirect from within a servlet or jsp, redirecting to another servlet (no static content at all). Can anybody help me? TIA, Carlo -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Carlo Montanari Sysadm Unix office T-Systems Italia debis IT Services Italia S.p.A. Via degli Ontani, 25 36100 - Vicenza Phone: +39 0444 558355 Fax: +39 0444 558352 Mobile: +39 348 4530249 e-mail: [EMAIL PROTECTED] Internet: http://www.t-systems.it -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Removing files from /lib
I must not be understanding completely the way the classloaders work under Tomcat. I thought that if I stop a webapp through the manager application that should unload its jar files. However, even after it's stopped, I find that log4j jar file is locked so I can't remove it. Why would that one file be locked but the others not? -shawn Shawn Wilson [[EMAIL PROTECTED]] Software Developer, ATMReports.com PH: 877-327-0873, FAX: 406-294-5806 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Removing files from /lib
It is in WEB-INF/lib, which is why I thought it would be unlocked when I stop that webapp. -shawn Shawn Wilson [[EMAIL PROTECTED]] Software Developer, ATMReports.com PH: 877-327-0873, FAX: 406-294-5806 -Original Message- From: Andrew Conrad [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 28, 2002 10:44 AM To: 'Tomcat Users List' Subject: RE: Removing files from /lib Where are you keeping log4j? Is it in common/lib or some place such as that or is it stored in you WEB-INF/lib folder? From my understanding if it's in common or shared, then unloading the webapp won't release the files, since webapps inherit common and shared classloaders, they don't actually create them. - Andrew -Original Message- From: Shawn Wilson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 28, 2002 12:05 PM To: tomcat Subject: Removing files from /lib I must not be understanding completely the way the classloaders work under Tomcat. I thought that if I stop a webapp through the manager application that should unload its jar files. However, even after it's stopped, I find that log4j jar file is locked so I can't remove it. Why would that one file be locked but the others not? -shawn Shawn Wilson [[EMAIL PROTECTED]] Software Developer, ATMReports.com PH: 877-327-0873, FAX: 406-294-5806 -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat memory usage
Here's are tomcat version: Apache Tomcat/4.0.4-b3 We've had it running for a while now and I just noticed that it is using a lot of memory! 142MB physical and 600MB virtual. I'm wondering if there is any way I can tell what webapp is consuming this memory? I've disabled all webapps but /manager and two others, but the memory usage did not go down. Thanks, -shawn Shawn Wilson [[EMAIL PROTECTED]] Software Developer, ATMReports.com PH: 877-327-0873, FAX: 406-294-5806 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Migration from 3.3a to 4.0.4
I am new to Tomcat 4, and I am trying to move an existing webapp from 3.3a to 4.0.4. I am using Apache as the web server, but I am not quite clear on which portions of Tomcat relate specifically to the stand-alone web server configuration versus general webapp serving through a connector (Warp or AJP). For example, the Host container is used to define virtual hosts, but is this necessary if Apache is handling the virtual hosting? Any general comparison or migration steps of Tomcat 3.3 to Tomcat 4 would be helpful. Currently I have multiple Apache virtual hosts served by multiple Tomcat instances (with multiple server.xml, etc.) and everything works fine (in 3.3a). Thanks, Shawn
Announcement: JSP Standard Tag Library (JSTL)
Tomcat users, You might have heard about the JSP Standard Tag Library (JSTL), which is a new standard under the Java Community Process. JSTL 1.0 was finalized at the end of May 2002, and its reference implementation was released as part of Sun's Web Services Developer Pack (WDSP) earlier this month. The goal of JSTL 1.0 is to simplify the development of JSP pages by standardizing tags for the following tasks: - control flow (iteration, conditional logic, and error handling) - URL management (session encoding, cross-context imports, etc.) - text formatting and internationalization (i18n) - XML manipulation (with XPath) - database access (via JDBC) JSTL also offers an expression language for accessing scoped attributes, request parameters, and other data. (This expression language is planned to be the basis of a core addition to JSP 2.0.) Using JSTL tags and the new expression language, you can often avoid scripting elements (scriptlets and scripting expressions) in your pages. JSTL works with a number of different models for web development. Users of a model 2 approach will probably appreciate JSTL's expression language and core tags for control flow; prototypers and developers of small applications may appreciate its SQL tags. Personally, I find JSTL's XML tags to offer a convenient, powerful alternative to XSLT for many common XML-manipulation tasks. And JSTL also offers an API for programmers who wish to configure JSTL and expose data for their JSP pages. I'm sending this message to announce that Jakarta Taglibs has just released version 1.0 of its Standard Taglib, an implementation of JSTL. (The implementation at Jakarta Taglibs is also the basis for Sun's reference implementation of JSTL.) You can download the 1.0 release of the Standard Taglib at http://jakarta.apache.org/builds/jakarta-taglibs/releases/standard/ The Standard Taglib requires JSP 1.2; it has been tested with Tomcat 4.0.4. (Earlier versions of Tomcat may have trouble loading the JAXP 1.2 classes included with our distribution, so I recommend using Tomcat 4.0.4. A set of older XML files is available from the URL above if you want to use an older version of Tomcat.) I'm happy to answer questions that you have about JSTL; for detailed discussion, you might be interested in joining the 'taglibs-user' mailing list at Jakarta; see http://jakarta.apache.org/site/mail.html for instructions on how to do so. For general information about JSTL, as well as a link to the formal specification, pointers to upcoming books on JSTL, and current articles, see http://java.sun.com/products/jsp/jstl/ If you have any comments for future versions of JSTL, you can submit them to our expert group by mailing [EMAIL PROTECTED] Enjoy, -- Shawn Bayern JSTL reference implementation lead Author, JSTL in Action http://www.manning.com/bayern (July 2002) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Help using JDBC realm with MySQL
Oh the simplest things are often the overlooked. I can't believe... I don't remember where I got this driver but it was extremely old (v1.2c)! Thanks for the help, -shawn http://www.shawn-wilson.com Hugh Brien wrote: Try the latest version of the driver r, Hugh - Original Message - From: Shawn A. Wilson [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, April 11, 2002 8:11 PM Subject: RE: Help using JDBC realm with MySQL Well, I tried adding the relaxAutocommit=true parameter but I still get the same message. Arg... this is not making any sense. Do my tables need to be of a specific type? I created them without any options so they should be MyISAM. -shawn http://www.shawn-wilson.com On Thu, 11 Apr 2002, Dennis Doubleday wrote: Add the following parameter to your connection URL: relaxAutocommit=true So it should look like: jdbc:mysql://localhost/peopleshare?relaxAutocommit=trueuser=hiddenpass word=hidden -Original Message- From: Shawn A. Wilson [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 2:33 PM To: Tomcat Users List Subject: Re: Help using JDBC realm with MySQL Does nobody know a solution to get around this problem? I have received no replies and I desparately need to know how to get around the Cannot disable AUTO_COMMIT error with JDBC realms and MySQL. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Local Directory Access using Tomcat 4.0 (SORRY TO REPOST)
Jordan, can you please provide the stack trace of the exception thrown by Tomcat? Thanks, -shawn http://www.shawn-wilson.com On Thu, 11 Apr 2002, Jordan C N Chong wrote: Dear all, I am really really sorry that I have to repost the question cause I really couldnt find any solution for that. I really wish there is someone out there could help me me out here... I wish to render the Tomcat 4.0 to access my local directory, what I mean is, I store some files in a directory, and that I could use servlet to download these files. I have tried to do the following: FileInputStream file = new FileInputStream(C:\\Inetpub\\content\\test.txt); or replace the \\ with File.Separator, but the Tomcat 4.0 keeps complaining that the directory is not accessible. I presume I have to do some modification on the server setting or configuration, but I have no idea at all how to proceed. Please help. Thank you very much. Best regards, Jo -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Help using JDBC realm with MySQL
Well, I tried adding the relaxAutocommit=true parameter but I still get the same message. Arg... this is not making any sense. Do my tables need to be of a specific type? I created them without any options so they should be MyISAM. -shawn http://www.shawn-wilson.com On Thu, 11 Apr 2002, Dennis Doubleday wrote: Add the following parameter to your connection URL: relaxAutocommit=true So it should look like: jdbc:mysql://localhost/peopleshare?relaxAutocommit=trueuser=hiddenpass word=hidden -Original Message- From: Shawn A. Wilson [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 2:33 PM To: Tomcat Users List Subject: Re: Help using JDBC realm with MySQL Does nobody know a solution to get around this problem? I have received no replies and I desparately need to know how to get around the Cannot disable AUTO_COMMIT error with JDBC realms and MySQL. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Help using JDBC realm with MySQL
Please help, I'm using Tomcat 4.0.2 and am trying to setup a JDBC realm with MySQL. Here is the snippet from server.xml: Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://localhost/peopleshare?user=hiddenamp;password=hidden userTable=users userNameCol=user_id userCredCol=password userRoleTable=user_roles roleNameCol=role_id / And here is the exception stack trace: Starting service Tomcat-Standalone Apache Tomcat/4.0.2 Catalina.start: LifecycleException: Exception opening database connection: java.sql.SQLException: Cannot disable AUTO_COMMIT LifecycleException: Exception opening database connection: java.sql.SQLException: Cannot disable A UTO_COMMIT at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108) at org.apache.catalina.core.StandardHost.start(StandardHost.java:614) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343) at org.apache.catalina.core.StandardService.start(StandardService.java:388) at org.apache.catalina.core.StandardServer.start(StandardServer.java:506) at org.apache.catalina.startup.Catalina.start(Catalina.java:781) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) - Root Cause - java.sql.SQLException: Cannot disable AUTO_COMMIT at org.gjt.mm.mysql.Connection.setAutoCommit(Connection.java:396) at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:549) at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:613) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108) at org.apache.catalina.core.StandardHost.start(StandardHost.java:614) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343) at org.apache.catalina.core.StandardService.start(StandardService.java:388) at org.apache.catalina.core.StandardServer.start(StandardServer.java:506) at org.apache.catalina.startup.Catalina.start(Catalina.java:781) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
IIS/Tomcat - Error: The specified module could not be found.
Hello, I'm a newcomer to Tomcat. I have installed v3.3a on Win2k w/ the isapi_redirect.dll. I have followed the IIS HowTo to the letter. I have the green up arrow indicating the filter is working, but something must be amiss elsewhere and I'm at wits end -- I'm sure it's something simple and I apologize if this has been answered here before. Any ideas? Thanks! Shawn -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Help Preventing VM Tomcat Crash
Looks like you are using the JDBC-ODBC bridge (maybe to an MS Access or MS SQL Server database?), which is not thread-safe and is not intended for use in production environments. My guess is that one thread (the current thread servicing the Thumbnail servlet) has a db connection open, and the next request (the user clicking the thumbnail) opens another db connection. This guess is based on these lines in your exception: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : unknown exception code occurred at PC=0x77fb16cc Function name=RtlTraceDatabaseEnumerate Library=C:\WINNT\System32\ntdll.dll If this is the case, try finding a pure Java (type 4) JDBC driver for your database. Shawn -Original Message- From: Kennedy Clark [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 23, 2002 5:36 AM To: [EMAIL PROTECTED] Subject: Help Preventing VM Tomcat Crash I'm working on a servlet that shrinks JPEG photos on the fly to create thumbnails. When the user selects the thumbnail page, a JSP generates HTML that results in many calls to the thumbnail servlet. If the user is patient and waits for all of the thumbnails to load, everything works great -- they can click on a thumbnail to see the full-size version of that JPEG. However, if the use clicks on a photo while they are still loading, I get the exception dump and crash shown at the bottom. Any help greatly appreciated! Regards, Kennedy Here is my thumbnail servlet: /* * Note: JPEG manipulation code comes from Sun: * http://developer.java.sun.com/developer/TechTips/1999/tt1021.html#tip1 */ package gallery.servlet; import java.io.*; import java.text.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import java.awt.Image; import java.awt.Graphics2D; import java.awt.geom.AffineTransform; import java.awt.image.BufferedImage; import javax.swing.ImageIcon; import com.sun.image.codec.jpeg.JPEGCodec; import com.sun.image.codec.jpeg.JPEGImageEncoder; /** * Return a thumbnail of the image specified in the name parameter */ public class Thumbnail extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType(image/jpeg); File f = new File(request.getParameter(name)); if (!f.exists()) return; OutputStream os = response.getOutputStream(); createThumbnail(request.getParameter(name), os, 150); } /** * Reads an image in a file and creates a thumbnail to the output stream * * @param orig The name of image file. * @param thumb The name of thumbnail file. * Will be created if necessary. * @param maxDim The width and height of the thumbnail must * be maxDim pixels or less. */ public static void createThumbnail(String orig, OutputStream os, int maxDim) { try { // Get the image from a file. Image inImage = new ImageIcon(orig).getImage(); // Determine the scale. double scale = (double)maxDim/(double)inImage.getHeight(null); if (inImage.getWidth(null) inImage.getHeight(null)) { scale = (double)maxDim/(double)inImage.getWidth(null); } // Determine size of new image. // One of them should equal maxDim. int scaledW = (int)(scale*inImage.getWidth(null)); int scaledH = (int)(scale*inImage.getHeight(null)); // Create an image buffer in which to paint on. BufferedImage outImage = new BufferedImage(scaledW, scaledH, BufferedImage.TYPE_INT_RGB); // Set the scale. AffineTransform tx = new AffineTransform(); // If the image is smaller than //the desired image size, // don't bother scaling. if (scale 1.0d) { tx.scale(scale, scale); } // Paint image. Graphics2D g2d = outImage.createGraphics(); g2d.drawImage(inImage, tx, null); g2d.dispose(); // JPEG-encode the image and write to file. //OutputStream os = new FileOutputStream(thumb); JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(os); encoder.encode(outImage); //os.close(); } catch (IOException e) { e.printStackTrace(); } } } And here is the exception/crash: java.io.IOException: reading encoded JPEG Stream at sun.awt.image.codec.JPEGImageEncoderImpl.writeJPEGStream(Native Method) at sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:47 5) at sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:23 1
RE: Help Preventing VM Tomcat Crash
So much for that theory. However, your guess is pretty close. I found something which you might find interesting. This is a known bug, which you can check out here: http://developer.java.sun.com/developer/bugParade/bugs/4502892.html The problem occurs when the socket is prematurely closed. The workaround is to buffer the output via ByteArrayOutputStream, isolating the native method from stream disconnections. The evaluation of the bug I will include here for convenience: *** The JPEG library is not MT-safe. In particular, there is a definition of a global variable struct error_mgr ek_err which is used by all threads for error handling -- including a setjmp buffer. Consequently, when an error does occur while more than one thread is executing in the native library, it is common for that thread to longjmp to another thread's state. It then uses the wrong JNIEnv pointer and trashes the VM. x@x 2001-10-09 This bug has indeed been fixed in merlin-rc1, but its associated regression test (JPEGMultithread.java) is confusing and potentially misleading. This is addressed by another bug (4546112 - Reg-test JPEGMultithread.java Failing). The regression test currently throws exceptions endlessly if bug 4502892 is not present, and hangs or crashes the VM if bug 4502892 is present. This is bad behavior for a regression test, so it will be updated in accordance with 4546112. x@x 2001-12-19 *** Hope this helps more, Shawn -Original Message- From: Kennedy Clark [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 23, 2002 2:32 PM To: Tomcat Users List Subject: RE: Help Preventing VM Tomcat Crash Hi Shawn, Many thanks for the note the suggestion! I am using MySQL as my Db and MM.MySQL is my driver (mm.mysql-2.0.11-bin.jar). Given that this is a Type 4 driver, I don't think I should be getting a native code crash involving database access, right? I could be missing something, but it seems that the sun.awt.image.codec.JPEGImageEncoderImpl.writeJPEGStream() method (which is native code) is trying to write to my output stream and running into trouble. I assume this is because the user has clicked on an image serving as a link to another web page and now Tomcat is off trying to handle the new page. My best guess is that in the process of doing so, the output streams used by writeJPEGStream() are being torn down, but the native code doesn't know this and it's causing the VM to puke. Does anyone think my logic makes sense? Better yet, does anyone know a way to prevent it? :-) Regards, Kennedy At 09:02 AM 2/23/2002 -0600, Shawn Church wrote: Looks like you are using the JDBC-ODBC bridge (maybe to an MS Access or MS SQL Server database?), which is not thread-safe and is not intended for use in production environments. My guess is that one thread (the current thread servicing the Thumbnail servlet) has a db connection open, and the next request (the user clicking the thumbnail) opens another db connection. This guess is based on these lines in your exception: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : unknown exception code occurred at PC=0x77fb16cc Function name=RtlTraceDatabaseEnumerate Library=C:\WINNT\System32\ntdll.dll If this is the case, try finding a pure Java (type 4) JDBC driver for your database. Shawn -Original Message- From: Kennedy Clark [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 23, 2002 5:36 AM To: [EMAIL PROTECTED] Subject: Help Preventing VM Tomcat Crash I'm working on a servlet that shrinks JPEG photos on the fly to create thumbnails. When the user selects the thumbnail page, a JSP generates HTML that results in many calls to the thumbnail servlet. If the user is patient and waits for all of the thumbnails to load, everything works great -- they can click on a thumbnail to see the full-size version of that JPEG. However, if the use clicks on a photo while they are still loading, I get the exception dump and crash shown at the bottom. Any help greatly appreciated! Regards, Kennedy Here is my thumbnail servlet: /* * Note: JPEG manipulation code comes from Sun: * http://developer.java.sun.com/developer/TechTips/1999/tt1021.html#tip1 */ package gallery.servlet; import java.io.*; import java.text.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import java.awt.Image; import java.awt.Graphics2D; import java.awt.geom.AffineTransform; import java.awt.image.BufferedImage; import javax.swing.ImageIcon; import com.sun.image.codec.jpeg.JPEGCodec; import com.sun.image.codec.jpeg.JPEGImageEncoder; /** * Return a thumbnail of the image specified in the name parameter */ public class Thumbnail extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType(image/jpeg); File f = new File
RE: Help Preventing VM Tomcat Crash
One more thing. There is a fix in jdk1.4.0 which addresses this problem, where the native code exception is handled correctly. With this version, the IOExceptions may be caught and treated as normal behavior. Here's the fix: http://developer.java.sun.com/developer/bugParade/bugs/4546112.html Shawn -Original Message- From: Shawn Church [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 23, 2002 3:32 PM To: Tomcat Users List Subject: RE: Help Preventing VM Tomcat Crash So much for that theory. However, your guess is pretty close. I found something which you might find interesting. This is a known bug, which you can check out here: http://developer.java.sun.com/developer/bugParade/bugs/4502892.html The problem occurs when the socket is prematurely closed. The workaround is to buffer the output via ByteArrayOutputStream, isolating the native method from stream disconnections. The evaluation of the bug I will include here for convenience: *** The JPEG library is not MT-safe. In particular, there is a definition of a global variable struct error_mgr ek_err which is used by all threads for error handling -- including a setjmp buffer. Consequently, when an error does occur while more than one thread is executing in the native library, it is common for that thread to longjmp to another thread's state. It then uses the wrong JNIEnv pointer and trashes the VM. x@x 2001-10-09 This bug has indeed been fixed in merlin-rc1, but its associated regression test (JPEGMultithread.java) is confusing and potentially misleading. This is addressed by another bug (4546112 - Reg-test JPEGMultithread.java Failing). The regression test currently throws exceptions endlessly if bug 4502892 is not present, and hangs or crashes the VM if bug 4502892 is present. This is bad behavior for a regression test, so it will be updated in accordance with 4546112. x@x 2001-12-19 *** Hope this helps more, Shawn -Original Message- From: Kennedy Clark [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 23, 2002 2:32 PM To: Tomcat Users List Subject: RE: Help Preventing VM Tomcat Crash Hi Shawn, Many thanks for the note the suggestion! I am using MySQL as my Db and MM.MySQL is my driver (mm.mysql-2.0.11-bin.jar). Given that this is a Type 4 driver, I don't think I should be getting a native code crash involving database access, right? I could be missing something, but it seems that the sun.awt.image.codec.JPEGImageEncoderImpl.writeJPEGStream() method (which is native code) is trying to write to my output stream and running into trouble. I assume this is because the user has clicked on an image serving as a link to another web page and now Tomcat is off trying to handle the new page. My best guess is that in the process of doing so, the output streams used by writeJPEGStream() are being torn down, but the native code doesn't know this and it's causing the VM to puke. Does anyone think my logic makes sense? Better yet, does anyone know a way to prevent it? :-) Regards, Kennedy At 09:02 AM 2/23/2002 -0600, Shawn Church wrote: Looks like you are using the JDBC-ODBC bridge (maybe to an MS Access or MS SQL Server database?), which is not thread-safe and is not intended for use in production environments. My guess is that one thread (the current thread servicing the Thumbnail servlet) has a db connection open, and the next request (the user clicking the thumbnail) opens another db connection. This guess is based on these lines in your exception: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : unknown exception code occurred at PC=0x77fb16cc Function name=RtlTraceDatabaseEnumerate Library=C:\WINNT\System32\ntdll.dll If this is the case, try finding a pure Java (type 4) JDBC driver for your database. Shawn -Original Message- From: Kennedy Clark [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 23, 2002 5:36 AM To: [EMAIL PROTECTED] Subject: Help Preventing VM Tomcat Crash I'm working on a servlet that shrinks JPEG photos on the fly to create thumbnails. When the user selects the thumbnail page, a JSP generates HTML that results in many calls to the thumbnail servlet. If the user is patient and waits for all of the thumbnails to load, everything works great -- they can click on a thumbnail to see the full-size version of that JPEG. However, if the use clicks on a photo while they are still loading, I get the exception dump and crash shown at the bottom. Any help greatly appreciated! Regards, Kennedy Here is my thumbnail servlet: /* * Note: JPEG manipulation code comes from Sun: * http://developer.java.sun.com/developer/TechTips/1999/tt1021.html#tip1 */ package gallery.servlet; import java.io.*; import java.text.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import java.awt.Image; import java.awt.Graphics2D; import java.awt.geom.AffineTransform; import java.awt.image.BufferedImage
RE: always getting 403 Forbidden pages
-Original Message- Usually a directory permission problem. Do you have the files marked a world-readable and the directory to +rx? Try doing a chmod 755 on the directories where you have the files and chmod 644 on the files. -- Jason -Original Message- From: Peter Matulis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 27, 2001 11:35 AM To: Tomcat-User (E-mail) Subject: always getting 403 Forbidden pages I keep getting 403 pages when trying to access the test or example jsp's or servlets. What can be causing this? I'm using TC322 on Red Hat 7.1 Peter Matulis -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat 4.0.7b and lib help (FIXED)
I don't know about everyone else, but I got my Oracle classes12.zip in my lib and it wouldn't work so after looking at my code, wondering what I messed up (4 hours), I decided to change it to *.jar. OMG it decided to work... might want to have TomCat be able to do both zip jar's in the lib just my 2 cents. Shawn - Original Message - From: Jonathan Eric Miller [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Evans, Shawn [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 12:52 PM Subject: Re: Tomcat 4.0.7b and lib help My guess is that this may be the same problem that I ran into while trying to use JDBCRealm. I think you have to put the .jar file in TOMCAT_HOME/server/lib instead of TOMCAT_HOME/lib for low-level .jar files that get used by Tomcat itself? I'm not an expert, that just seemed to be experience that I had. Jon - Original Message - From: Shawn Evans [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 11:45 AM Subject: Tomcat 4.0.7b and lib help I have a servlet FBJServlet that uses a DB connection pool, and I have the JDBC driver for Oracle installed as well in the /lib/classes12.jar... I open the jar and see OracleDataSource... but I get the error below. Root Cause: java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource at com.sterling.util.db.pooling.DBPoolManager.init(DBPoolManager.java:110) at com.sterling.util.db.pooling.DBPoolManager.(DBPoolManager.java:17) at com.sterling.util.db.pooling.DBPoolManager.getInstance(DBPoolManager.java:23 ) at com.sterling.ForceBrowserJ.FBJServlet.init(FBJServlet.java:15) at javax.servlet.GenericServlet.init(GenericServlet.java:366) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:833) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:602) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:214) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:215) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 1000) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093 ) at java.lang.Thread.run(Thread.java:484)
Re: Tomcat 4.0.7b and lib help (FIXED)
Understand I am an idiot... but oh well... just a suggestion then for people like me that read... in Developing Applications with Tomcat, in 4.1 Directory Structure... in the lib/ portions, just put a note... 'JAR's only (No zips)'... I know it says 'JAR files' but I thought zips and jars were interchangeable... :-) - Original Message - From: Dmitri Colebatch [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Shawn Evans [EMAIL PROTECTED] Sent: Friday, August 24, 2001 9:26 AM Subject: Re: Tomcat 4.0.7b and lib help (FIXED) This has come up before... tomcat follows the spec - loading all jars in WEB-INF/lib... no mention of zips (o: On Fri, 24 Aug 2001, Shawn Evans wrote: I don't know about everyone else, but I got my Oracle classes12.zip in my lib and it wouldn't work so after looking at my code, wondering what I messed up (4 hours), I decided to change it to *.jar. OMG it decided to work... might want to have TomCat be able to do both zip jar's in the lib just my 2 cents. Shawn - Original Message - From: Jonathan Eric Miller [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Evans, Shawn [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 12:52 PM Subject: Re: Tomcat 4.0.7b and lib help My guess is that this may be the same problem that I ran into while trying to use JDBCRealm. I think you have to put the .jar file in TOMCAT_HOME/server/lib instead of TOMCAT_HOME/lib for low-level .jar files that get used by Tomcat itself? I'm not an expert, that just seemed to be experience that I had. Jon - Original Message - From: Shawn Evans [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 11:45 AM Subject: Tomcat 4.0.7b and lib help I have a servlet FBJServlet that uses a DB connection pool, and I have the JDBC driver for Oracle installed as well in the /lib/classes12.jar... I open the jar and see OracleDataSource... but I get the error below. Root Cause: java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource at com.sterling.util.db.pooling.DBPoolManager.init(DBPoolManager.java:110) at com.sterling.util.db.pooling.DBPoolManager.(DBPoolManager.java:17) at com.sterling.util.db.pooling.DBPoolManager.getInstance(DBPoolManager.java:23 ) at com.sterling.ForceBrowserJ.FBJServlet.init(FBJServlet.java:15) at javax.servlet.GenericServlet.init(GenericServlet.java:366) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:833) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:602) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:214) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:215) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 1000) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093 ) at java.lang.Thread.run(Thread.java:484)
Tomcat 4.0.7b and lib help
I have a servlet FBJServlet that uses a DB connection pool, and I have the JDBC driver for Oracle installed as well in the /lib/classes12.jar... I open the jar and see OracleDataSource... but I get the error below. Root Cause: java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource at com.sterling.util.db.pooling.DBPoolManager.init(DBPoolManager.java:110) at com.sterling.util.db.pooling.DBPoolManager.(DBPoolManager.java:17) at com.sterling.util.db.pooling.DBPoolManager.getInstance(DBPoolManager.java:23 ) at com.sterling.ForceBrowserJ.FBJServlet.init(FBJServlet.java:15) at javax.servlet.GenericServlet.init(GenericServlet.java:366) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:833) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:602) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:214) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:215) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 1000) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093 ) at java.lang.Thread.run(Thread.java:484)
Tomcat, JSP, BEAN, /lib
I have a connectionpool bean that I am using in myapp. I added connectionpool.jar to /lib. I added this to the beginning of my jsp. jsp:useBean id=pool scope=application class=com.sterling.util.db.connectionpool / Here is what I get when I access it... any ideas what I have done wrong? http://localhost:8080/ForceBrowserJ/index.jsp org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 8 in the jsp file: /index.jsp Generated servlet error: D:\webserver\Tomcat-4.0.7\work\localhost\ForceBrowserJ\_0002findex_jsp.java: 75: Class com.sterling.util.db.connectionpool not found. com.sterling.util.db.connectionpool pool = null; ^ An error occurred at line: 8 in the jsp file: /index.jsp Generated servlet error: D:\webserver\Tomcat-4.0.7\work\localhost\ForceBrowserJ\_0002findex_jsp.java: 78: Class com.sterling.util.db.connectionpool not found. pool= (com.sterling.util.db.connectionpool) ^ An error occurred at line: 8 in the jsp file: /index.jsp Generated servlet error: D:\webserver\Tomcat-4.0.7\work\localhost\ForceBrowserJ\_0002findex_jsp.java: 83: Class com.sterling.util.db.connectionpool not found. pool = (com.sterling.util.db.connectionpool) java.beans.Beans.instantiate(this.getClass().getClassLoader(), com.sterling.util.db.connectionpool); ^ 3 errors at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:528) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458) at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:215) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 1000) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093 ) at java.lang.Thread.run(Thread.java:484)
Problem with JSP... Tomcat 4.0.7
I probally done something wrong here... but the error is at the end [error]... here is the [JSP]... I have 2 classes in a jar file in the lib lib/connectionpool.jar ConnectionPool.class PooledConnection.class [JSP] html body %@ page errorPage=errorpage.jsp % %@ page import=java.util.* % %@ page import=java.sql.* % %-- jsp:useBean id=pool scope=application class=com.sterling.util.db.connectionpool / --% % Connection con = null; try { // The pool is not initialized if ( pool.getDriver() == null ) { // initialize the pool // FileInputStream inStream = new FileInputStream(ForceBrowserJDB.properties); // properties.load(inStream); pool.setDriver=oracle.jdbc.driver.OracleDriver pool.setURL=jdbc:oracle:thin:@216.174.11.54:1521:warf pool.setSize=10 pool.Username=warfighter pool.setPassword=srcv3000 pool.initializePool(); } [.] [error] 2001-08-21 15:27:20 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:543) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458) at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:215) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 1000) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093 ) at java.lang.Thread.run(Thread.java:484) - Root Cause - java.lang.NumberFormatException: oracle at java.lang.Integer.parseInt(Integer.java:414) at java.lang.Integer.parseInt(Integer.java:463) at org.apache.jasper.compiler.Compiler.getJspLineErrors(Compiler.java:321) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:280) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:528) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458) at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at
Re: Tomcat port 8080, Apache port 80, jsp?
No error messages in the Apche or tomcat logs - Original Message - From: Pier P. Fumagalli [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 16, 2001 5:29 PM Subject: Re: Tomcat port 8080, Apache port 80, jsp? Shawn Evans at [EMAIL PROTECTED] wrote: I read Installing mod_webapp and using it with Apache 1.3 written by you, and I have been unsuccessful in getting it to work. Here is my configuration: Win NT4.0 sp6 Apache 1.3.20 d:\webserver\Apache Tomcat 4.0.7b d:\webserver\Tomcat-4.0.7 First, I copied 'mod_webapp.so' and 'libapr.dll' to my apache\modules, then I added this to my httpd.conf [...] #AddModule mod_actions.c mod_setenvif.c mod_isapi.c AddModule mod_webapp.c [...] #LoadModule usertrack_module modules/mod_usertrack.so LoadModule webapp_module modules/mod_webapp.so [...] WebAppConnection conn warp localhost:8008 WebAppDeploy examples conn /examples WebAppInfo /webapp-info [...] I kick Apache off as a service (Tomcat is already running as a service) and here is the error that I get Error 2140:An internal Windows NT error occurred... I am able to run Tomcat 4.0.7 as a service without Apache... and Apache runs fine when I comment out the 5 lines I added above, but I need to get them working in sequence with one another. Nothing in your error_log? That's pretty weird... What about starting it from the console? Pier
mod_webapp -- NT4, Tomcat 4.0.7, Apache 1.3.20, JDK 1.3.1
I read Installing mod_webapp and using it with Apache 1.3 written in mod_webapp, and I have been unsuccessful in getting it to work. Here is my configuration: Win NT4.0 sp6 Apache 1.3.20 d:\webserver\Apache Tomcat 4.0.7b d:\webserver\Tomcat-4.0.7 First, I copied 'mod_webapp.so' and 'libapr.dll' to my apache\modules, then I added this to my httpd.conf [...] #AddModule mod_actions.c mod_setenvif.c mod_isapi.c AddModule mod_webapp.c [...] #LoadModule usertrack_module modules/mod_usertrack.so LoadModule webapp_module modules/mod_webapp.so [...] WebAppConnection conn warp localhost:8008 WebAppDeploy examples conn /examples WebAppInfo /webapp-info [...] I kick Apache off as a service (Tomcat is already running as a service) and here is the error that I get Error 2140:An internal Windows NT error occurred... I am able to run Tomcat 4.0.7 as a service without Apache... and Apache runs fine when I comment out the 5 lines I added above, but I need to get them working in sequence with one another. Plus, there are no error messages in the log files. Shawn
Working: mod_webapp -- NT4, Tomcat 4.0.7, Apache 1.3.20, JDK 1.3.1
Sorry if it seems as if I reposted it, I was having trouble with the office machine, so I sent it out under a new subject, since it was different than the one I posted before... when I ran Apache from the command line with the webapp modified conf here is what I get. D:\webserver\ApacheApache Syntax error on line 176 of d:/webserver/apache/conf/httpd.conf: Cannot add module via name 'mod_webapp.c': not in list of loaded modules took that line out and it works... I can see webapp-info and IT WORKS ... INSTALL.txt [..] *- Another note for Windows: copy also the libapr.dll file with the module, or your Apache 1.3 web server will refuse to start reporting that the WebApp module cannot be loaded. Once you have done that, edit your httpd.conf configuration file and add a few lines to load that module at startup (Windows users, read above, you have to replace libexec with modules - I'm paranoid, sorry): LoadModule webapp_module libexec/mod_webapp.so and AddModule mod_webapp.c [ DO NOT ADD THIS TO WINDOWS ] -* Thanks for the help Shawn - Original Message - From: Pier P. Fumagalli [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 17, 2001 12:47 PM Subject: Re: mod_webapp -- NT4, Tomcat 4.0.7, Apache 1.3.20, JDK 1.3.1 Since Apache 1.3.20 also under windows modules are called .so and not .dll (it was confusing!) Pier David Oxley at [EMAIL PROTECTED] wrote: Isn't the .so file only for unix. You need mod_webapp.dll Dave -Original Message- From: Shawn Evans [mailto:[EMAIL PROTECTED]] Sent: 17 August 2001 15:12 To: [EMAIL PROTECTED] Subject: mod_webapp -- NT4, Tomcat 4.0.7, Apache 1.3.20, JDK 1.3.1 I read Installing mod_webapp and using it with Apache 1.3 written in mod_webapp, and I have been unsuccessful in getting it to work. Here is my configuration: Win NT4.0 sp6 Apache 1.3.20 d:\webserver\Apache Tomcat 4.0.7b d:\webserver\Tomcat-4.0.7 First, I copied 'mod_webapp.so' and 'libapr.dll' to my apache\modules, then I added this to my httpd.conf [...] #AddModule mod_actions.c mod_setenvif.c mod_isapi.c AddModule mod_webapp.c [...] #LoadModule usertrack_module modules/mod_usertrack.so LoadModule webapp_module modules/mod_webapp.so [...] WebAppConnection conn warp localhost:8008 WebAppDeploy examples conn /examples WebAppInfo /webapp-info [...] I kick Apache off as a service (Tomcat is already running as a service) and here is the error that I get Error 2140:An internal Windows NT error occurred... I am able to run Tomcat 4.0.7 as a service without Apache... and Apache runs fine when I comment out the 5 lines I added above, but I need to get them working in sequence with one another. Plus, there are no error messages in the log files. Shawn