How to disable PUT, DELETE http methods etc if not using container managed security?
Is there a way to prevent PUT or DELETE http methods if you're not using container managed security? If so, how? I already have this to force the use of https: Protected Context /* CONFIDENTIAL What changes are needed? I tried this but it didn't seem to work: Protected Context /* HEAD <-- PUT<-- DELETE <-- TRACE<-- OPTIONS <-- CONFIDENTIAL Inserting these statements seems to turn off the automatic enforcement of https which was achieved with the first version. Any ideas? Thanks
Re: Arabic encoding
I use oracle 7 database, and the NLS language is American_America.US7ASCII, and it is not easy to change it to utf-8. Beside, the question is, a servlet work fine on tomcat 4.0.6 why it stopped with the new versions, what changes made to the encoding of tomcat?? do I need tomcat-i18n-ar.jar? and if so, from where to get it? I can't determine where is the problem, is it from the new Java or the new tomcat. thanks in advanced - Original Message - From: "Benson Margulies" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Wednesday, February 23, 2005 11:26 PM Subject: RE: Arabic encoding What database? Do you have the database set up to deliver Unicode, or CP1256, correctly? Note that not all Arabic fits into CP1256, you might really be better off with UTF-8. - 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: SV: Cluster: will session listeners got called again after replication?
there is a difference between a "crashed" tomcat and a "shutdown" tomcat. Filip Filip Hanik - Dev Lists wrote: there is a flag you can set so that listeners don't get called, its optional its called notifyListenersOnReplication, see server.xml for example, default is true Filip Jesper Ekberg wrote: Hello! My first mail to this list. :) I have read it for a long time tho. We have a tried to cluster 3 Tomcat 5.5.7 machines and I found that HttpSessionBindingListener will be notified when the session is replicated and the machine crashes. I think this must be a bug?? The scenario: 3 Tomcat 5.5.7 machines on Windows 2003 Server (I know, not my fault ;)). JK2 Connector for load balancing. I log on and session is created and is replicated correctly to all machines. I shut down the server that I'm working on. The session is destroyed and method valueUnbound is called on the "crashed" machine. It seems odd to me that the method valueUnbound is called when the session is replicated, the session "still lives" on the other Tomcat machines. Sorry for my sometimes bad English ;) //Jesper -Ursprungligt meddelande- Från: Joseph Lam [mailto:[EMAIL PROTECTED] Skickat: den 24 februari 2005 08:44 Till: Tomcat Users List Ämne: Cluster: will session listeners got called again after replication? Anyone knows when a session is replicated to other nodes, will the HttpSessionBindingListener and HttpSessionAttributeListener objects be notified again? On the receiver nodes, how can I detect when a session from the sender node comes in so that I can do something with it? Joseph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.7 hangs on startup
Thanks for the reply. I'd love to get a thread dump but I'm not getting a pid for the jvm. -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED] Sent: Friday, February 25, 2005 6:01 PM To: Tomcat Users List Subject: Re: Tomcat 5.5.7 hangs on startup On Fri, 25 Feb 2005 17:13:41 -0500, Curtis, John G <[EMAIL PROTECTED]> wrote: > Having a problem getting Tomcat 5.5.7 to start. The configuration is > basicly the default except for some trival changes to the > tomcat-user.xml. The catalina.out leads me to believe it's a problem > with the ajp, but that's just my best guess 'cause it hangs just prior > to starting the connector: > > tail catalina.out > Feb 25, 2005 5:10:10 PM org.apache.catalina.core.ApplicationContext log > INFO: ContextListener: contextInitialized() > Feb 25, 2005 5:10:10 PM org.apache.catalina.core.ApplicationContext log > INFO: SessionListener: contextInitialized() > Feb 25, 2005 5:10:12 PM org.apache.catalina.core.ApplicationContext log > INFO: ContextListener: contextInitialized() > Feb 25, 2005 5:10:12 PM org.apache.catalina.core.ApplicationContext log > INFO: SessionListener: contextInitialized() > Feb 25, 2005 5:10:15 PM org.apache.coyote.http11.Http11Protocol start > INFO: Starting Coyote HTTP/1.1 on http-8080 > Hangs here forever. > > OS is Solaris 8 > Java is version 1.5 > > I have the same configuration working fine on a Windows 2000 and Windows > XP box. If Tomcat is hung, always try to get a thread dump. I suppose the problem occurs when binding the server socket. -- x Rémy Maucherat Developer & Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cluster: Is session's lastAccessedTime got replicated?
unless the session is primary, the last accessed time wont matter, when the session becomes primary, the last access time gets set immediately. Filip Joseph Lam wrote: Found that only when a replication is explicitly triggered by set/removeAttribute(), the other nodes' session.getLastAccessedTime() will be synchronized. Joseph On Thu, 24 Feb 2005, Joseph Lam wrote: Hi, It seems that in my 4-node cluster (TC 5.5.8), the session.getLastAccessedTime() only returns the last accessed time in each particular node only. Is this normal? How can I get the last accessed time of a session across the whole cluster? Regards, Joseph Lam - 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: SV: Cluster: will session listeners got called again after replication?
there is a flag you can set so that listeners don't get called, its optional its called notifyListenersOnReplication, see server.xml for example, default is true Filip Jesper Ekberg wrote: Hello! My first mail to this list. :) I have read it for a long time tho. We have a tried to cluster 3 Tomcat 5.5.7 machines and I found that HttpSessionBindingListener will be notified when the session is replicated and the machine crashes. I think this must be a bug?? The scenario: 3 Tomcat 5.5.7 machines on Windows 2003 Server (I know, not my fault ;)). JK2 Connector for load balancing. I log on and session is created and is replicated correctly to all machines. I shut down the server that I'm working on. The session is destroyed and method valueUnbound is called on the "crashed" machine. It seems odd to me that the method valueUnbound is called when the session is replicated, the session "still lives" on the other Tomcat machines. Sorry for my sometimes bad English ;) //Jesper -Ursprungligt meddelande- Från: Joseph Lam [mailto:[EMAIL PROTECTED] Skickat: den 24 februari 2005 08:44 Till: Tomcat Users List Ämne: Cluster: will session listeners got called again after replication? Anyone knows when a session is replicated to other nodes, will the HttpSessionBindingListener and HttpSessionAttributeListener objects be notified again? On the receiver nodes, how can I detect when a session from the sender node comes in so that I can do something with it? Joseph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.7 hangs on startup
On Fri, 25 Feb 2005 17:13:41 -0500, Curtis, John G <[EMAIL PROTECTED]> wrote: > Having a problem getting Tomcat 5.5.7 to start. The configuration is > basicly the default except for some trival changes to the > tomcat-user.xml. The catalina.out leads me to believe it's a problem > with the ajp, but that's just my best guess 'cause it hangs just prior > to starting the connector: > > tail catalina.out > Feb 25, 2005 5:10:10 PM org.apache.catalina.core.ApplicationContext log > INFO: ContextListener: contextInitialized() > Feb 25, 2005 5:10:10 PM org.apache.catalina.core.ApplicationContext log > INFO: SessionListener: contextInitialized() > Feb 25, 2005 5:10:12 PM org.apache.catalina.core.ApplicationContext log > INFO: ContextListener: contextInitialized() > Feb 25, 2005 5:10:12 PM org.apache.catalina.core.ApplicationContext log > INFO: SessionListener: contextInitialized() > Feb 25, 2005 5:10:15 PM org.apache.coyote.http11.Http11Protocol start > INFO: Starting Coyote HTTP/1.1 on http-8080 > Hangs here forever. > > OS is Solaris 8 > Java is version 1.5 > > I have the same configuration working fine on a Windows 2000 and Windows > XP box. If Tomcat is hung, always try to get a thread dump. I suppose the problem occurs when binding the server socket. -- x Rémy Maucherat Developer & Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trying to understand exceptions and
From: "Mike Curwen" <[EMAIL PROTECTED]> > I've successfully caught 'all other' exceptions (which I suppose must > include ServletExceptions), by using one error-page declaration that catches > 500, and then multiple 's to > catch more specific exception types. Thanks, that's a great idea. :) I didn't think of using both and . Actually most of my 'regular' exceptions are configured in struts-config.xml, but I've been unsuccessful in catching the really horribly bad ones, and I'd rather not show stack traces if I can avoid it. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.7 hangs on startup
Having a problem getting Tomcat 5.5.7 to start. The configuration is basicly the default except for some trival changes to the tomcat-user.xml. The catalina.out leads me to believe it's a problem with the ajp, but that's just my best guess 'cause it hangs just prior to starting the connector: tail catalina.out Feb 25, 2005 5:10:10 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Feb 25, 2005 5:10:10 PM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Feb 25, 2005 5:10:12 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Feb 25, 2005 5:10:12 PM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Feb 25, 2005 5:10:15 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Hangs here forever. OS is Solaris 8 Java is version 1.5 I have the same configuration working fine on a Windows 2000 and Windows XP box. Thanks in advance
Re: Hyperthreading and Java (was RE: Tale of two servers)
Peter Crowther wrote: >>From: Graham Reeds [mailto:[EMAIL PROTECTED] >>Also disable HyperThreading in the BIOS on the new Dell. HT >>and Java is not a happy combination. Interesting... do you have any recommended reading on that, Graham? Love these urban-legend types of warnings ("don't flash your headlights..."). I think Graham is referring to a bug in the 1.4.2 line of JVMs where under certain circumstances, the HotSpot compiler trips over the garbage collector, and causes mysterious VM aborts. I believe there have been fixes in 1.4.2_06 and 1.4.2_07, and also in 1.5.0_01. It's triggered more easily in an HT or MP machine, but the important thing is that it can also be tripped on non-HT, single-processor machines (though much more rarely). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Volunteers for translation
Tomcat users - The "web" is becoming multi-channel. Are you interested in knowing how speech applications are authored? Are you good at translating from English to another language? If so, this might be a good volunteer opportunity to contribute to a fledging jakarta taglibs sandbox tag library. I'm working on the Reusable Dialog Components (RDC) tag library listed here: http://jakarta.apache.org/taglibs/sandbox/doc/rdc-doc/intro.html As we begin to work on internationalization for the RDC taglib, we are looking for help in translating a set of speech grammars we have (written in English) to other languages. You don't need to know the grammar syntax, you will pick it up along the way. If you want to take a look at the grammars, you can download the jakarta taglibs sandbox source available here: http://jakarta.apache.org/builds/jakarta-taglibs-sandbox/nightly/src/ and go to: /rdc/src/.grammar/ If interested, please send me an email (probably off the list, but I leave that to you). You will receive credit according to the usual norm for translators. -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JK2 Failover Problem
I'm having trouble with the failover functionality of JK2. I have apache connected to two back-end tomcat engines running on separate machines. The failover works just fine when a tomcat engine dies. The node is not given any requests and the webapp continues to function normally. However, when an individual webapp dies I get problems. Apache continues to send requests to the non-functioning webapp, even if the app is not even deployed on that tomcat instance. I was under the impression that jk2 would take this into account, but it appears that it either doesn't or I don't have it set up to do this. any help would be greatly appreciated. Thanks, Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Parse/read an XML doc with encoding Shift_JIS adds characters (2nd email)
I am using a GetDictionary.jsp script to parse an XML document containing simple Japanese phrases encoded with Shift_JIS. What I observe is that after reading a phrase into a java.util.HashMap bean the phrase becomes longer and modified (really, corrupted). This (corrupted) phrase sent in an HTTP reply, is modified again inside the packet. Example: 1. the original phrase (in binary), from the XML doc: be dd c0 b8 bc c3 b8 c0 de bb b2 2e 2e 2e 2. the phrase (1) logged from a HashMap object: efbf bd efbf bd 38 efbf bd c3 b8 efbf bd de bb efbf bd 2e 2e 2e 3. the phrase (2) in an HTTP reply: 21 29 21 29 38 21 29 21 29 21 29 21 29 21 29 2e 2e 2e It appears as if two transformations were going on, beyond the GetDictionary.jsp control. Interestingly the last three characters 2e 2e 2e (='...') are preserved all the way. Another script Send.jsp that sends a reply has the following page declarations: <%@ page pageEncoding="Shift_JIS"%> <%@ page contentType="text/xml; charset=Shift_JIS"%> The situation is the same bad if only one declaration is in the Send.jsp: <%@ page contentType="text/xml; charset=Shift_JIS"%> Does anyone have a suggestion what am I doing wrong? Especially - while is there a 'transformation' from the XML doc to the HashMap? And then, why is there a second 'transformation' into a packet? Thanks, Jerry. [By the way, the same GetDictionary.jsp works fine if the parsed/read XML document is utf-8 encoded, or ISO-8859-1 encoded, or ascii. The phrase in the HashMap object is binary identical with the original phrase from the XML doc. Then it is the same in the reply packet (sent with a script having declared a corresponding charset).] - 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: Trying to understand exceptions and
Part of the spec says "if no error-page declaration containing an exception-type fits using the class-heirarchy match, and the exception thrown is a ServletException or subclass thereof, the container extracts the wrapped exception..." So supposing for a minute that Tomcat internals "ignore" any error-page that has exception-type 'ServletException', it would then proceed to unwrap the exception to get down to your DAOException. Which you've already proved that you *can* catch. I've successfully caught 'all other' exceptions (which I suppose must include ServletExceptions), by using one error-page declaration that catches 500, and then multiple 's to catch more specific exception types. This is all on TC5.0.28 (TC4.x seemed a bit flakey on exceptions and errorpages, but that could have been PEBKAC) > -Original Message- > From: Wendy Smoak [mailto:[EMAIL PROTECTED] > Sent: Friday, February 25, 2005 11:27 AM > To: Tomcat Users List > Subject: Trying to understand exceptions and > > > With nothing configured for errors, I get a Tomcat error page: > > HTTP Status 500 - > type Exception report > message > description The server encountered an internal error () that > prevented it from fulfilling this request. exception > javax.servlet.ServletException: > org.xml.sax.SAXParseException: blah, blah... ... root cause > com.example.DAOException: org.xml.sax.SAXParseException: > blah, blah... ... Caused by: org.xml.sax.SAXParseException: > blah, blah... > > The code that causes it looks like this: > > try { > ... > } catch ( Exception ex ) { > throw new DAOException( ex ); > } > > Can someone explain why, if I put this in web.xml, > > > javax.servlet.ServletException > /WEB-INF/jsp/error/exception.jsp > > > it does NOT display the .jsp and instead shows the same thing > as above with all the stack traces? > > I also tried configuring it for java.lang.Exception, but no > luck there, either. > > I _can_ get a good error page if I configure it for the 'root > cause' DAOException, I'm just confused as to why I can't trap > the ServletException. > > Thank you, > Wendy Smoak http://wiki.wendysmoak.com/cgi-bin/wiki.pl?TomcatErrorPage > > > - > 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]
Trying to understand exceptions and
With nothing configured for errors, I get a Tomcat error page: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: org.xml.sax.SAXParseException: blah, blah... ... root cause com.example.DAOException: org.xml.sax.SAXParseException: blah, blah... ... Caused by: org.xml.sax.SAXParseException: blah, blah... The code that causes it looks like this: try { ... } catch ( Exception ex ) { throw new DAOException( ex ); } Can someone explain why, if I put this in web.xml, javax.servlet.ServletException /WEB-INF/jsp/error/exception.jsp it does NOT display the .jsp and instead shows the same thing as above with all the stack traces? I also tried configuring it for java.lang.Exception, but no luck there, either. I _can_ get a good error page if I configure it for the 'root cause' DAOException, I'm just confused as to why I can't trap the ServletException. Thank you, Wendy Smoak http://wiki.wendysmoak.com/cgi-bin/wiki.pl?TomcatErrorPage - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fwd: Your Harvard Business Review Customer Service Request]
Jeanne Case wrote: This is the spam I keep getting. It happens whenever I post. Is there something the keepers of the list can do about this? I suspect it's just someone's out-of-office message. Presumably someone can shut down that account temporarily. Or permanently. -- Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Fwd: Your Harvard Business Review Customer Service Request]
This is the spam I keep getting. It happens whenever I post. Is there something the keepers of the list can do about this? -J --- Begin Message --- Your customer service request has been received by Harvard Business Review. You should receive an email response in 2-3 business days. --- End Message --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Service automatically shuts down on Windows Server 2003
John Najarian wrote: I had a similar problem on winblows 2000 server a while ago, I had installed tomcat to ...\Tomcat 4.1\ and I had to reinstall it to ...\Tomcat_4.1\ and all worked fine. On winblows, spaces in variables in CLASSPATH, PATH... tend to cause problems and the killer is, not on every installation of the same version of winblows. Try reinstalling to a path containing no spaces and reset your env vars. Like the following: Instead of your path: "C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin\tomcat.exe try something like: "C:\Program Files\Apache_Software_Foundation\Tomcat 5.0\bin\tomcat.exe Okay, thanks. We'll try that too... Who am I kidding? We'll try *anything*! :-) Thank you for your help. -- Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Service automatically shuts down on Windows Server 2003
Mladen Turk wrote: Scott Sauyet wrote: "The Apache Tomcat service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performace Logs and Alerts service." I'm not finding anything in the Tomcat logs, which makes me suspect that Tomcat is not in fact actually starting, but I don't know how to tell for sure. Yes, the Tomcat was not started. There can be two reasons. Java is wrongly installed (missing jre from Registry?) Account used for running Tomcat as service has no access to Tomcat folder. Java seems to be okay. I'm going to have some network folks check out the latter. Thanks for your help. -- Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Someone is using Tomcat for spreading spam?
Yes, -J Behrang Saeedzadeh wrote: Hi I get spam message from Tomcat's mailing list? Is anybode else having this problem either? I just recieved a message that had the same title as my last message with a Re: appended to it. Does anybody else also recieved this message? It's something from Harvard whatever... bla bla... Regards, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Service automatically shuts down on Windows Server 2003
Hi, I had a similar problem on winblows 2000 server a while ago, I had installed tomcat to ...\Tomcat 4.1\ and I had to reinstall it to ...\Tomcat_4.1\ and all worked fine. On winblows, spaces in variables in CLASSPATH, PATH... tend to cause problems and the killer is, not on every installation of the same version of winblows. Try reinstalling to a path containing no spaces and reset your env vars. Like the following: Instead of your path: "C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin\tomcat.exe try something like: "C:\Program Files\Apache_Software_Foundation\Tomcat 5.0\bin\tomcat.exe All because winblows sux -Original Message- From: Scott Sauyet <[EMAIL PROTECTED]> Sent: Feb 25, 2005 7:19 AM To: Tomcat Users List Subject: Re: Service automatically shuts down on Windows Server 2003 Jason Bainbridge wrote: > On Fri, 25 Feb 2005 09:23:29 -0500, Scott Sauyet <[EMAIL PROTECTED]> wrote: >>We've had Tomcat 5.0.19 working on a number of Windows machines for a >>while, running on Win2K and WinXP under j2sdk1.4.2_04 Yesterday we had >>to install it on a Windows Server 2003 machine, and it's not working as >>a service. If we run it from the shell, it works fine, but when we try >>to start it as a service, it starts up and shuts right back down with a >>Windows message that some services don't stay running if they have no >>work to do. > > That usually happens when there is something wrong with the directory > paths, there could be a space somewhere causing problems or something > similar so have a look at the properties of the service and se eif > it's pointing to the right spot. Thanks, but that doesn't seem to be it. The service is looking at "C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin\tomcat.exe //RS//Tomcat5" which is correct. I don't know what the parameter "//RS//Tomcat5" is for but it matches what's working on other machines. Also the JAVA_HOME and CATALINA_HOME enviroment variables are correct. The actual text of the error message is "The Apache Tomcat service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performace Logs and Alerts service." I'm not finding anything in the Tomcat logs, which makes me suspect that Tomcat is not in fact actually starting, but I don't know how to tell for sure. Cheers, -- Scott - 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: Apache 1.3 + mod_jk: Segmentation fault
Rodrigo Avila wrote: On Fri, 25 Feb 2005 16:19:23 +0100, Mladen Turk <[EMAIL PROTECTED]> wrote: Do you have ForwardDirectories enabled? Remove 'JkOptions ForwardDirectories' and there shouldn't be segfaults any more. This has been fixed in the cvs, and will not be present in next release scheduled for next month. Yes, I have... I remove it, and the problem was gone... but, now is displayed the Java code, not the page... why? Like said. It's a bug reflected only on 1.3. Map your applications in a different way like webapps, and the source will disappear. BTW, that's the preferred way. Do not mix apache and tomcat web space, unless for static content. Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache 1.3 + mod_jk: Segmentation fault
On Fri, 25 Feb 2005 16:19:23 +0100, Mladen Turk <[EMAIL PROTECTED]> wrote: > Do you have ForwardDirectories enabled? > Remove 'JkOptions ForwardDirectories' and there shouldn't > be segfaults any more. > This has been fixed in the cvs, and will not be present in > next release scheduled for next month. Yes, I have... I remove it, and the problem was gone... but, now is displayed the Java code, not the page... why? Thanks the attention!! -- Rodrigo de Avila [EMAIL PROTECTED] http://www.avila.eti.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Service automatically shuts down on Windows Server 2003
Scott Sauyet wrote: Jason Bainbridge wrote: "The Apache Tomcat service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performace Logs and Alerts service." I'm not finding anything in the Tomcat logs, which makes me suspect that Tomcat is not in fact actually starting, but I don't know how to tell for sure. Yes, the Tomcat was not started. There can be two reasons. Java is wrongly installed (missing jre from Registry?) Account used for running Tomcat as service has no access to Tomcat folder. I suspect it's the later. Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Service automatically shuts down on Windows Server 2003
Jason Bainbridge wrote: On Fri, 25 Feb 2005 09:23:29 -0500, Scott Sauyet <[EMAIL PROTECTED]> wrote: We've had Tomcat 5.0.19 working on a number of Windows machines for a while, running on Win2K and WinXP under j2sdk1.4.2_04 Yesterday we had to install it on a Windows Server 2003 machine, and it's not working as a service. If we run it from the shell, it works fine, but when we try to start it as a service, it starts up and shuts right back down with a Windows message that some services don't stay running if they have no work to do. That usually happens when there is something wrong with the directory paths, there could be a space somewhere causing problems or something similar so have a look at the properties of the service and se eif it's pointing to the right spot. Thanks, but that doesn't seem to be it. The service is looking at "C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin\tomcat.exe //RS//Tomcat5" which is correct. I don't know what the parameter "//RS//Tomcat5" is for but it matches what's working on other machines. Also the JAVA_HOME and CATALINA_HOME enviroment variables are correct. The actual text of the error message is "The Apache Tomcat service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performace Logs and Alerts service." I'm not finding anything in the Tomcat logs, which makes me suspect that Tomcat is not in fact actually starting, but I don't know how to tell for sure. Cheers, -- Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache 1.3 + mod_jk: Segmentation fault
Rodrigo Avila wrote: Hi! [...] child pid 6645 exit signal Segmentation fault (11) It only happen when I use mod_jk 1.2.8 compiled by me I use Apache 1.3.33 (slackware package found at www.linuxpackages.net) and Tomcat 5.0.28 (binary distribution). Do you have ForwardDirectories enabled? Remove 'JkOptions ForwardDirectories' and there shouldn't be segfaults any more. This has been fixed in the cvs, and will not be present in next release scheduled for next month. Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Service automatically shuts down on Windows Server 2003
On Fri, 25 Feb 2005 09:23:29 -0500, Scott Sauyet <[EMAIL PROTECTED]> wrote: > I apologize for not doing as much homework as usual before posting a > question. Google turned up nothing helpful, the mailing list archive > search isn't working right now, and we're (of course) in a hurry. > > We've had Tomcat 5.0.19 working on a number of Windows machines for a > while, running on Win2K and WinXP under j2sdk1.4.2_04 Yesterday we had > to install it on a Windows Server 2003 machine, and it's not working as > a service. If we run it from the shell, it works fine, but when we try > to start it as a service, it starts up and shuts right back down with a > Windows message that some services don't stay running if they have no > work to do. > > Is there something obvious I should be doing? Or something less than > obvious? Even something obscure? :-) I've never had any Tomcat > problems; it's a great tool that has always just worked for me. But > that means I don't really even know where to begin looking to solve this. That usually happens when there is something wrong with the directory paths, there could be a space somewhere causing problems or something similar so have a look at the properties of the service and se eif it's pointing to the right spot. Regards, -- Jason Bainbridge http://kde.org - [EMAIL PROTECTED] Personal Site - http://jasonbainbridge.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Service automatically shuts down on Windows Server 2003
I apologize for not doing as much homework as usual before posting a question. Google turned up nothing helpful, the mailing list archive search isn't working right now, and we're (of course) in a hurry. We've had Tomcat 5.0.19 working on a number of Windows machines for a while, running on Win2K and WinXP under j2sdk1.4.2_04 Yesterday we had to install it on a Windows Server 2003 machine, and it's not working as a service. If we run it from the shell, it works fine, but when we try to start it as a service, it starts up and shuts right back down with a Windows message that some services don't stay running if they have no work to do. Is there something obvious I should be doing? Or something less than obvious? Even something obscure? :-) I've never had any Tomcat problems; it's a great tool that has always just worked for me. But that means I don't really even know where to begin looking to solve this. Are others successfully running Tomcat on Windows Server 2003? Thanks, -- Scott Sauyet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SSL Client authentication against MemoryRealm
Hi, The SSL client authentication doesn't work agains MemoryRealm, because the authentication mechanism passes the DN of the client certificate to the realm after validation for role assignement, but the memory realm don't allow usernames that contains "," or "=" characters. Because the DN contains these characters, the user can't get authenticated. I haven't tested this with other Realms, but it's important to fix it on MemoryRealm, used primarily for testing purposes. The tomcat version with I'm using is 5.0.16. Greetings -- Jesus De Oliveira Consultor IT Baysystem Consultores C.A. Tlf: (0212) 339.06.96 (0414) 300.06.46 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Starting up Tomcat when the Linux starts up
There should be an example tomcat5.sh with your distribution of jsvc. If not, download the most recent release from the Commons Daemon project at jakarta.apache.org and get a copy from there. Customize it with the options you use and you should be good to go. Splitting out put between console and log: check your linux man pages for the tee command. It's designed to split output between standard out and a file. --David Behrang Saeedzadeh wrote: Thanks for the response. BTW - I'm new to Linux :-) and don't know much about it... On Thu, 24 Feb 2005 15:13:09 -0500, David Smith <[EMAIL PROTECTED]> wrote: Depends on your flavor of linux. Mandrake (I've heard RH is similar) I'm using Ubuntu which is a Debian based distro. stores the init script in /etc/init.d with a sym link in /etc/rc[runlevel-here].d. I know that, for example, init scripts of MySQL and Samba are stored in /etc/init.d. I actually installed MySQL and Samba using apt and it took care of the rest of the progess... For example, if your script is tomcat5, then Do I have to create this script by myself? Should the contents of it be the same as the command that I write to run Tomcat using JSVC? tomcat5 would be stored /etc/init.d w/ a sym link to it from /etc/rc5.d. 5 being the runlevel where X is started and run. The name of the sym link is S[some-priority-number]tomcat5. Take a look at your linux docs and other services for more info. Low numbers are started first, high numbers last. Can you help me a bit more? Tomcat's console output is usually redirected to logs/catalina.out. How can I both print it to the terminal and logs/catalina.out like in Windows? Best Regards, Behrang. --David Behrang Saeedzadeh wrote: Hi How can I startup Tomcat when Linux starts up? I've successfully compiled JSVC and have started Tomcat 5.5.7 using it for several times... BTW - Why I can't see the console output of Tomcat in Linux like Windows (i.e. warnings, infos, messages, ...)? Best Regards, - 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: Very Straneg problem with MySQL-Connector
Thank you very much for the explanation ! I am starting to understand it much better. Thank you everybody - Original Message - From: "Parsons Technical Services" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Friday, February 25, 2005 1:20 AM Subject: Re: Very Straneg problem with MySQL-Connector > For networking localhost=127.0.0.1=monkinetwork > > But when you attach to the database it sends the machine name in Linux and > under MySQL localhost<>127.0.0.1<>monkinetwork and so you have to put in the > location that is identified. When your app talks to MySQL, it tells MySQL it > is calling from machine X, in your case the machine name is monkinetwork. > Had you not named the machine it would have sent localhost if it was bound > to the loopback address. And if that was not bound it would have sent the > 127.0.0.1. You may also want to watch that if you bind Tomcat to an IP it > may send that IP to MySQL if the machine name is not available. When you go > across the network it will also use the IP of the machine. The easy way to > tell is from the error. > > "Access denied for user 'root'@'monkinetwork' (using password: YES)" > > You were running Tomcat as root and the machine name is monkinetwork. > > Hope this helps. > > Doug > > > - Original Message - > From: "monkiboy" <[EMAIL PROTECTED]> > To: "Tomcat Users List" > Sent: Thursday, February 24, 2005 5:04 PM > Subject: Re: Very Straneg problem with MySQL-Connector > > > > Thank you for trying to help me everybody ! > > I read carefully your answer and it look like I have problem with > > privileges. My problem is resolved ! > > The first thing I did is : > > Comment this line on "my.cnf" file : # bind 127.0.0.1 > > Then the second thing that I made (with your advice) : is to try to > > connect > > on MySQL with User and not with the root. > > > > GRANT ALL PRIVILEGES ON testdb.* to 'test'@'localhost' IDENTIFIED BY > > 'test'; > > Doesn't work but when I did that : > > GRANT ALL PRIVILEGES ON testBDD.* to 'test'@'monkinetwork' IDENTIFIED BY > > 'test'; > > It's worked. > > It's look like I had to grant privilege on monkinetwork... It's very > > strange > > and I can't understand, I don't know why I had to do that... > > > > Best Regards. > > monkiboy > > > >> OK, the problem normally does not come from the driver, just try this: > >> from your freshly installed MySQL database, remove the test database and > >> also the test user from the database permissions table and from any > >> global user definitions, then flush-privileges and you should be ready > >> to go. > >> > >> Drew. > >> > >> > >> On Thu, 2005-02-24 at 03:01, monkiboy wrote: > >> > Hi everybody! > >> > I have a weird problem to use the MySQL-connector under Linux (Debian). > > I heard it can come from Tomcat. > >> > I have no problem in windows XP, all is working fine ! > >> > But under Linux when I try to connect to mysql throught mysql-connector > > wrote in a Servlet I have this message : > >> > > >> > Message: Invalid authorization specification message from server: > > "Access denied for user 'root'@'monkinetwork' (using password: YES)" > >> > SQLState: 28000 > >> > ErrorCode: 1045 > >> > > >> > I am Using : Tomcat 5.0.28 > >> > MySQL-Connector version is : mysql-connector-java-3.0.15-ga-bin.jar > >> > > >> > JDK Version : 1_5_0_01. Servlet-Examples and JSP works fine! So I don't > > think the problem come from JDK. > >> > > >> > MySQL version : MySQL-SERVER-4.1.9-2 : All is working under console > >> > mode > > ! > >> > > >> > Here's My Servlet TESt1.java: > >> > > >> > > >> > Code: > >> > > >> > > >> > import java.io.*; > >> > import javax.servlet.*; > >> > import javax.servlet.http.*; > >> > import java.sql.*; > >> > import java.sql.DriverManager; > >> > > >> > public class TEST1 extends HttpServlet { > >> > public void doGet(HttpServletRequest request, HttpServletResponse > > response) > >> > throws ServletException, IOException { > >> > > >> > response.setContentType("text/html"); > >> > PrintWriter out = response.getWriter(); > >> > > >> >String url = "jdbc:mysql://localhost:3306/HeroDB"; > >> >String user = "root"; > >> >String password = "password"; > >> > > >> > try{ > >> > Class.forName("com.mysql.jdbc.Driver"); > >> > out.println(" DRIVERS JDBC : OK!"); > >> > Connection connection = > > DriverManager.getConnection(url,user,password); > >> > > >> > out.println(" Database connection : OK!"); > >> > > >> > } > >> > catch (ClassNotFoundException e) > >> > { > >> > out.println("Error with JDBC Drivers !"); > >> > } > >> > catch(SQLException ex) { > >> > > >> > > >> > out.println(" ERROR MESSAGE "); > >> >while (ex != null) { > >> > > >> > out.println("Message: " + ex.getMessage ()); > >> > > >> > out.println("SQLState: " + ex.getSQLState ()); > >> > > >> > out.println("ErrorCode: " + ex.getErrorCode ()); > >> > > >> >
Apache 1.3 + mod_jk: Segmentation fault
Hi! Does anyone see this error in Apache error_log? [...] child pid 6645 exit signal Segmentation fault (11) It only happen when I use mod_jk 1.2.8 compiled by me (./configure--with=apxs=/usr/sbin/apxs; make; make install), using the instructions at http://jakarta.apache.org/tomcat/connectors-doc/index.html. I use Apache 1.3.33 (slackware package found at www.linuxpackages.net) and Tomcat 5.0.28 (binary distribution). Thanks the atention! -- Rodrigo de Avila [EMAIL PROTECTED] http://www.avila.eti.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to send hidden variables to next page
I dont know but looks like you are doing somethings wrong... hidden fildes are a great choice... better them use GET method... About the table think... use Iframe and do a submit to it... Whem you submit you use normal submit button or javascript??? If you are submiting with normal button try to use Javascript is much better! Example: function submitform() { // FOR LOCAL FORM... where the form name is "myform" Âdocument.myform.submit(); //OR FOR IFRAME FORM... where the IFRAME name is myframe and the FORM name is "myform1" window.frames.myframe.document.myform1.submit(); } SUBMIT HERE!!! You can also make MANY variations on it... like pass values in the function from the external frame to a filed on iframe. Example: function submitform(val1) { //CHANGE THE VALUE OF A FIELD ON IFRAME... where myfield is the name of the filed... window.frames.myframe.document.myform1.myfield.value=val1; //FOR IFRAME FORM... where the IFRAME name is myframe and the FORM name is "myform1" window.frames.myframe.document.myform1.submit(); } SUBMIT HERE I make some dynamic tables based on users choies! Works very well. Best Regards, -- David da Guia Carvalho Animus Tecnologia da InformaÃÃo Tel.: (21) 3525-8800 Fax: (21) 3525-8801 http://www.animus-ti.com.br On Feb 25, 2005 03:44 AM, U K Laxmi <[EMAIL PROTECTED]> wrote: >Thanks David for the info. Sure to do some reading. I >could able to pass the hidden variables to next page. >It's just i'm using one hidden variable named >'package' which was doing all the problem. I just >changed it to something else and now it's working. > >Still table issue not solved. I'm gooling ... for the >solution. > >--- David Smith <[EMAIL PROTECTED]> wrote: > >>This is getting into territory where you'd be better >>off doing some >>googling or buying a good javascript cookbook. I >>havn't bought any of >>those books recently although I've had good >>experience with subjects >>from Wrox Publishing and O'Reilly Associates in the >>past. Visit >>Amazon. They even support a rating scheme where >>people can voice their >>opinion. >> >>On the Delete issue, you could do a server-side >>rewrite of a link that >>invokes an action to delete a row as in: >>> >href="http://localhost:8080/mywebapp/deleteRow.do?recordNum=10";>Delete >> >>Me >> >>That's just a basic GET form request. >> >>Again, find a good book, do some reading. >> >>--David >> >>U K Laxmi wrote: >> >>>Thanks David for the solution. To be frank, i >>really >>>don't know how to code it. Will you give a sample >>code >>>snippet? I'm using apache2, tomcat 5.5.7 on Win 2K >>>machine. >>> >>>One more problem. I've a form and also submit >>button. >>>I've number of text fields in it. On entering some >>>data and focus losts from that field, i call a >>>javascript function, i set number of hidden values >>and >>>call a JSP using location.href of Javascript. But >>>hidden values are not getting passed to jsp.I'm >>>getting null. Why? How to overcome this? Pls help. >>> >>>One more requirement what i've is: >>>i'VE A FORM WITH FORM ELEMENTS IN IT AND A 'aDD' >>>BUTTON. After filling theform, if the user clicks >>on >>>'Add' button, the contents gets added aas row into >>a >>>HTML table located below that form. That way user >>can >>>add n number of rows to the bottom table. In the >>>table, i need a 'Delete' button. After selecting >>any >>>row, if the user clicks on 'Delete' button, it >>should >>>get deleted from the table. I guess it can be >>>possible. But it's a big challenge to me as i know >>>only ABCD of HTML & Javascript. >>> >>>If anybody can direct me to a good HTML/Javascritp >>>forum also fine. If i get a solution directly, it's >>>wonderful. >>> >>>Thanks a lot. Sorry again if it's not the right >>place >>>to post this. >>> >>> >>>--- David Smith <[EMAIL PROTECTED]> wrote: >>> >>> >>> The best advice I can offer -- have a javascript that does the submit for you on the event the drop-down changes state. Then let a servlet handle storing your form data in the session and passing updated data to the next page. Outside of something like that, I think you'll need to incorporate a submit button. --David U K Laxmi wrote: >Thanks for the answers Shakeel. > >My problem is, i've a page that doesn't have >>submit >button. I need to send the hidden variables in >>that >HTML page to next HTML page. Here the hidden >>value > > is >set based on the type of option selected from > > 'select' >drpo down box in HTML. To put it in session, i >>need > > to >identify the selected option and assign it to >>java >varialbe. I don't think it's possible to assign a >javascript variable to java variable. Pls help to >solve this problem. > > >--- Shakeel Ahmad <[EMAIL P
Multiple mappings to same servlet query
Hi I know that if I have multiple mappings to the same servlet, then I get two seperate objects instantiated. However, where does the engine instantiate the copy from? For example, I want to run two copies of the same servlet with different URLs, one in test mode, one in live mode. I was planning on configuring a different set of parameters for the two cases in my web.xml file but I need to be sure that I will get two instances, each with its own set parameters rather than the engine "cloning" a copy of the servlet it has already loaded. Regards Roger __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to send hidden variables to next page
laxmi, For the table issue you need to use DHTML along with Javascript. there will be some sample code available in the net. else hit about.javascript.com BVK On Thu, 24 Feb 2005 22:44:15 -0800 (PST), U K Laxmi <[EMAIL PROTECTED]> wrote: > Thanks David for the info. Sure to do some reading. I > could able to pass the hidden variables to next page. > It's just i'm using one hidden variable named > 'package' which was doing all the problem. I just > changed it to something else and now it's working. > > Still table issue not solved. I'm gooling ... for the > solution. > > --- David Smith <[EMAIL PROTECTED]> wrote: > > > This is getting into territory where you'd be better > > off doing some > > googling or buying a good javascript cookbook. I > > havn't bought any of > > those books recently although I've had good > > experience with subjects > > from Wrox Publishing and O'Reilly Associates in the > > past. Visit > > Amazon. They even support a rating scheme where > > people can voice their > > opinion. > > > > On the Delete issue, you could do a server-side > > rewrite of a link that > > invokes an action to delete a row as in: > > > > href="http://localhost:8080/mywebapp/deleteRow.do?recordNum=10";>Delete > > > > Me > > > > That's just a basic GET form request. > > > > Again, find a good book, do some reading. > > > > --David > > > > U K Laxmi wrote: > > > > >Thanks David for the solution. To be frank, i > > really > > >don't know how to code it. Will you give a sample > > code > > >snippet? I'm using apache2, tomcat 5.5.7 on Win 2K > > >machine. > > > > > >One more problem. I've a form and also submit > > button. > > >I've number of text fields in it. On entering some > > >data and focus losts from that field, i call a > > >javascript function, i set number of hidden values > > and > > >call a JSP using location.href of Javascript. But > > >hidden values are not getting passed to jsp.I'm > > >getting null. Why? How to overcome this? Pls help. > > > > > >One more requirement what i've is: > > >i'VE A FORM WITH FORM ELEMENTS IN IT AND A 'aDD' > > >BUTTON. After filling theform, if the user clicks > > on > > >'Add' button, the contents gets added aas row into > > a > > >HTML table located below that form. That way user > > can > > >add n number of rows to the bottom table. In the > > >table, i need a 'Delete' button. After selecting > > any > > >row, if the user clicks on 'Delete' button, it > > should > > >get deleted from the table. I guess it can be > > >possible. But it's a big challenge to me as i know > > >only ABCD of HTML & Javascript. > > > > > >If anybody can direct me to a good HTML/Javascritp > > >forum also fine. If i get a solution directly, it's > > >wonderful. > > > > > >Thanks a lot. Sorry again if it's not the right > > place > > >to post this. > > > > > > > > >--- David Smith <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > >>The best advice I can offer -- have a javascript > > >>that does the submit > > >>for you on the event the drop-down changes state. > > >>Then let a servlet > > >>handle storing your form data in the session and > > >>passing updated data to > > >>the next page. Outside of something like that, I > > >>think you'll need to > > >>incorporate a submit button. > > >> > > >>--David > > >> > > >>U K Laxmi wrote: > > >> > > >> > > >> > > >>>Thanks for the answers Shakeel. > > >>> > > >>>My problem is, i've a page that doesn't have > > submit > > >>>button. I need to send the hidden variables in > > that > > >>>HTML page to next HTML page. Here the hidden > > value > > >>> > > >>> > > >>is > > >> > > >> > > >>>set based on the type of option selected from > > >>> > > >>> > > >>'select' > > >> > > >> > > >>>drpo down box in HTML. To put it in session, i > > need > > >>> > > >>> > > >>to > > >> > > >> > > >>>identify the selected option and assign it to > > java > > >>>varialbe. I don't think it's possible to assign a > > >>>javascript variable to java variable. Pls help to > > >>>solve this problem. > > >>> > > >>> > > >>>--- Shakeel Ahmad <[EMAIL PROTECTED]> > > >>> > > >>> > > >>wrote: > > >> > > >> > > >>> > > >>> > > >>> > > >>> > > Wel this might help... > > > > // You write following two lines in first JSP > > > > > > >>page. > > >> > > >> > > String name = "Java";// This might be your > > hidden > > field. > > session.setAttribute("HiddenName", name); > > > > > > //Then you get the name on next page as follows. > > > > String userName = > > (String)session.getAttribute("HiddenName"); > > > > > > The "name" attribute will be available throught > > > > > > >>the > > >> > > >> > > session life, unless we > > remove it explicitly or restart Tomcat. > > We can use it on any page once it is placed > > properly. > > > > Best Regards, > > S H A K E E L A H M A D > > > > > > > >>>http://members.fortunecity.com/javaclub/shakeel.htm > > >>> >
Tomcat 5.5.7 using builtin JDBC connection pool, can't access 'real' connection - accessToUnderlyingConnectionAllowed=true
Hi there, did anybody manage to access the underlying 'real' database connection? I have got to use the PostgreSQL LargeObject API and therefore I need access to the delegated connection. But after several hours of trial and error I lost my motivation ... It seems like: - doesn't do anything: - always returns 'false': org.apache.tomcat.dbcp.dbcp.PoolingDriver.isAccessToUnderlyingConnectionAllowed() . - doesn't do anything: org.apache.tomcat.dbcp.dbcp.PoolingDriver.setAccessToUnderlyingConnectionAllowed(true); - also doesn't do anything: dataSource.setAccessToUnderlyingConnectionAllowed(true) At last I found some kind of workaround, which is indeed not really desirable ... Accessing an org.postgresql.PGConnection via a statement works ... Maybe someone can help me. Bye, Bernd. code snippet: import org.apache.tomcat.dbcp.dbcp.PoolingDriver; import org.apache.tomcat.dbcp.dbcp.BasicDataSource; import org.apache.tomcat.dbcp.dbcp.DelegatingConnection; import org.apache.tomcat.dbcp.dbcp.DelegatingStatement; import org.postgresql.PGConnection; ... logger.debug("PoolingDriver.isAccessToUnderlyingConnectionAllowed: "+PoolingDriver.isAccessToUnderlyingConnectionAllowed()); PoolingDriver.setAccessToUnderlyingConnectionAllowed(true); BasicDataSource dataSource = (BasicDataSource)envContext.lookup("jdbc/website"); logger.debug("dataSource.isAccessToUnderlyingConnectionAllowed: "+dataSource.isAccessToUnderlyingConnectionAllowed()); dataSource.setAccessToUnderlyingConnectionAllowed(true); logger.debug("getting delegating connection"); DelegatingConnection connection = (DelegatingConnection)dataSource.getConnection(); logger.debug("getting 'real' connection"); logger.debug("connection.getDelegate(): " + connection.getDelegate()); logger.debug("connection.getInnermostDelegate(): " + connection.getInnermostDelegate()); // for some reason this works: DelegatingStatement stmt = (DelegatingStatement)connection.createStatement(); PGConnection pgCon = (PGConnection)stmt.getDelegate().getConnection(); stmt.close(); logger.debug(pgCon); .. corresponding output: "PoolingDriver.isAccessToUnderlyingConnectionAllowed: false" "dataSource.isAccessToUnderlyingConnectionAllowed: false" "getting delegating connection" "getting 'real' connection" "connection.getDelegate(): null" "connection.getInnermostDelegate(): null" "[EMAIL PROTECTED]" my configuration: " server.xml: - no pooling stuff in here - WEB-INF/web.xml: ... DB Connection jdbc/website javax.sql.DataSource Container ... META-INF/context.xml: ... java 1.4.2_07 tomcat 5.5.7 PostgreSQL 8.01 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to harden tomcat?
Hi, One thing to look out for would be the use of JNI i.e. native calls. I'm not sure if there is a way of preventing someone from packaging a .so in a WAR and then loading it in to the app via code to bypass the lack of LD_LIBRARY_PATH (on *nix). didn't try it myself, but I guess /tomcat/conf/catalina.policy and it's java.security settings are the right place to look for these remaining problems. Cheers, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Hyperthreading and Java (was RE: Tale of two servers)
> From: Graham Reeds [mailto:[EMAIL PROTECTED] > Also disable HyperThreading in the BIOS on the new Dell. HT > and Java is not a happy combination. Interesting... do you have any recommended reading on that, Graham? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Howto get Port in HttpServlet#init(ServletConfig)?
Hey Tomcat Fans, is there a programmatically way to get the Http-Port in the HttpServlet#init(ServletConfig) method? Kind Regards, Patrick Wunderlich (Germany) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]