Running Tomcat standalone on Linux
We are running Tomcat as a standalone server on Linux. We aren't using Apache for a front-end b/c we feel we don't need it. One nice thing that Apache did offer was that it would start as root, bind to port 80 and then drop privileges. Is this possible with Tomcat as well? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WINXP + TOMCAT + apache
What kind of errors are you having? I was able to configure 2.0.47 with Tomcat 4.1.24 and 5.0.6 (load-balanced) on Win2K with no problems. I don't have a WinXP box to try this on, but I'm fairly confident it would work (I have 2.0.47 with 4.1.27 working at home on XP). Here's the doc I used to set it up: http://raibledesigns.com/tomcat/index.html HTH, Matt -Original Message- From: David O'Sullivan [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 9:50 AM To: [EMAIL PROTECTED] Subject: WINXP + TOMCAT + apache Hey I'm new to this list and apache and tomcat I'm trying to run apache 2.0.47 with tomcat 5.0 on xp i know there are issues witht his but i don't know how to fix them any help? Regards, David O'Sullivan __ Join Freeserve http://www.freeserve.com/time/ Winner of the 2003 Internet Service Providers' Association awards for Best Unmetered ISP and Best Consumer Application. - 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: Where can I find mod_jk-2.0.47.so?
I couldn't find it anywhere so I build a Red Hat 9, Apache 2.0.47 version. You can get it at: http://raibledesigns.com/tomcat/mod_jk-2.0.47.so And I updated my Apache+Tomcat HowTo accordingly: http://raibledesigns.com/tomcat/index.html Now a new question: Does anyone know if it's possible to secure the entire Tomcat server with Apache? I tried using .htaccess files, but I'm sending all (/*) requests to Tomcat, so I'm guessing I have to a Tomcat Realm. Is it possible to change something in server.xml to secure all apps? Thanks, Matt -Original Message- From: Raible, Matt Sent: Wednesday, August 06, 2003 10:18 AM To: '[EMAIL PROTECTED]' Subject: Where can I find mod_jk-2.0.47.so? Anyone know where I can download mod_jk-2.0.47.so for Apache 2.0.47 on RH 9? The closest I could find was 2.0.46 for RH 7.2 at: http://tinyurl.com/j6hf Thanks, Matt - 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]
Where can I find mod_jk-2.0.47.so?
Anyone know where I can download mod_jk-2.0.47.so for Apache 2.0.47 on RH 9? The closest I could find was 2.0.46 for RH 7.2 at: http://tinyurl.com/j6hf Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.0.4 fails to serve form-login-error page properly
I have the following in my web.xml and it works fine for me on 5.0.4: login-config auth-methodFORM/auth-method form-login-config form-login-page/login.jsp/form-login-page form-error-page/login.jsp?error=true/form-error-page /form-login-config /login-config A couple changes that I've noticed though: When I'm routed to the login page, the browser's address bar says the URL I requested, rather than /login.jsp - very cool! Also, I found that request.getRequestURL() does show me the page I requested. This was not the case in 4.1.24. This is awesome IMO b/c now users will not bookmark /login.jsp. And even if they do type it in (ctx/login.jsp), my 400 error page routes them to index.jsp which goes to the main menu. All of this did not work in 4.1.24 and now it does in 5.0.4. Happy day. Matt -Original Message- From: Oleg S. Estehin [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 8:39 AM To: [EMAIL PROTECTED] Subject: Tomcat 5.0.4 fails to serve form-login-error page properly Hi I am porting my application from Tomcat 4.1.24 to Tomcat 5.0.4 (i.e. porting from Servlets 2.3/JSP 1.2 to Servlets 2.4/JSP 2.0). I have a servlet mapped to /auth that produces the page with login form. Form based authentication is set with the following fragment of the deployment descriptor: login-config auth-methodFORM/auth-method form-login-config form-login-page/auth/form-login-page form-error-page/auth?action=error/form-error-page /form-login-config /login-config When the servlet is called with ?action=error query string it displays additional warning besides the login form. It was working perfectly in Tomcat 4.1.24 but it works in Tomcat 5.0.4 only in half: When user tries to access protected page he is presented with login page. If he enters valid login/password then he receives access to the resourse. But if the user enters invalid login/password then instead of form-error-page Tomcat displays HTTP Status 405 - HTTP method POST is not supported by this URL error with URL http://myhost.here/j_security_check;. I have tried to set up AccessLogValve and RequestDumpValve and to set debug attribute on every element in servlet.xml and my context.xml (where applicable) in order to try to understand what is going on inside Tomcat 5, but no luck so far - request damp just shows that 1) there was request to protected resourse 2) Tomcat returned form-login-page 3) user sent it back with invalid login/password 4) Tomcat returned error 405. I had expected that there should be output from Realm between 3) and 4) but there is not. So, at the moment the conclusion is that the code that worked perfectly in Tomcat 4.1.24 doesn't work in Tomcat 5.0.4 and i don't know why but i would be delighted if somebody will help me to find this out :) - 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.0 w/ JSPX and TAGX
Maybe this will help: tags:xhtmlbasic xmlns:tags=urn:jsptagdir:/WEB-INF/tags xmlns:jsp=http://java.sun.com/JSP/Page; xmlns:fmt=http://java.sun.com/jstl/fmt_rt; xmlns=http://www.w3.org/1999/xhtml; jsp:directive.page contentType=text/html / -Original Message- From: Ammai.com [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2003 12:12 PM To: [EMAIL PROTECTED] Subject: Tomcat 5.0 w/ JSPX and TAGX Hi there, I'm using Tomcat 5.0.4 and I think it is the best Tomcat release to date. Everything works fine and it seems faster than the 4.x series. Anyways, I was testing JSP 2.0 by writing a sample JSP Document (JSPX) and everything worked fine. Then I tried to use a tag file by writing a xhtmlstrict.tag file and used it in the JSPX document and everything worked fine again. However, if I change the extension of the .tag to .tagx (so that it is a Tag XML document, just like JSP XML document), Tomcat's giving an exception: org.apache.jasper.JasperException: null(4,-1) Undeclared prefix in name: jsp:doBody. This is what's in the xhtmlstrict.tagx file: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en jsp:doBody/ /html It seems like Tomcat isn't recognizing the jsp prefix. Is there any way to fix that? Thanks, Vinu. - 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: SSL configuration for Apache HTTP server
http://raibledesigns.com/tomcat/ssl-howto.html HTH, Matt -Original Message- From: Sudhir Kumar [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 16, 2003 6:46 AM To: [EMAIL PROTECTED] Subject: SSL configuration for Apache HTTP server hello, How to configure SSL in apache HTTP server. Apache and tomcat are integrated. please help thanks and regards Sushir - 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]
JSP 2.0 in Tomcat 5.0.4
It's my understanding that JSTL is an integral part of any JSP 2.0-compliant container. To me, this means that I shouldn't have to include jstl.jar/standard.jar in my app's WEB-INF/lib folder. I would also assume that I don't need to declare the JSTL tags as a directive: %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % %@ taglib uri=http://java.sun.com/jstl/fmt; prefix=fmt % However, this doesn't seem to be the case with JSP 2.0 in the jsp-examples that ship with Tomcat 5.0.4: 1. WEB-INF/lib contains jstl.jar and standard.jar 2. If I don't have a taglib declaration, c:if is not interpreted in a JSP in this project. Please fill me on on what I need to do for a JSP 2.0-compliant app. Do I need to include jstl.jar and standard.jar in WEB-INF/lib? Do I need to declare the taglibs when using fmt and c:...? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSP 2.0 in Tomcat 5.0.4
Understood - thanks for the clear, and to the point error. Doesn't that mean that the following should work? c:set var=bodyId scope=request tiles:getAsString name=body.id ignore=true/ /c:set body id=${requestScope.bodyId}? Or just body id=${bodyId} Because it doesn't work for me. Do I have to use the 2.4 in web.xml to make this work? Thanks, Matt -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Thursday, July 17, 2003 7:27 AM To: Tomcat Users List Subject: Re: JSP 2.0 in Tomcat 5.0.4 EL is integral to the jsp2 spec. Not jstl. EL is based off of jstl. From a quick glance at the spec, I see in Section 4: References to JSTL are informational - this library is not required by the JSP 2.0 specification. If you search for JSTL in the spec, its seems clear that if you want JSTL: you still need the classes and taglib declarations. The difference with JSP2 is you can now do this syntax without needing JSTL: Hello ${someVariable} (woohoo, no c:out needed!) I think you can also do this now too .. mytag myattr=${elExpression}/ But to do a loop (c:foreach) - you still need JSTL. You'll even see the taglib declarations for the JSTL core taglib in the examples in the spec. -Tim Raible, Matt wrote: It's my understanding that JSTL is an integral part of any JSP 2.0-compliant container. To me, this means that I shouldn't have to include jstl.jar/standard.jar in my app's WEB-INF/lib folder. I would also assume that I don't need to declare the JSTL tags as a directive: %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % %@ taglib uri=http://java.sun.com/jstl/fmt; prefix=fmt % However, this doesn't seem to be the case with JSP 2.0 in the jsp-examples that ship with Tomcat 5.0.4: 1. WEB-INF/lib contains jstl.jar and standard.jar 2. If I don't have a taglib declaration, c:if is not interpreted in a JSP in this project. Please fill me on on what I need to do for a JSP 2.0-compliant app. Do I need to include jstl.jar and standard.jar in WEB-INF/lib? Do I need to declare the taglibs when using fmt and c:...? Thanks, Matt - 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: JSP 2.0 in Tomcat 5.0.4
I meant clear and to the point *answer* not error. ;-) -Original Message- From: Raible, Matt Sent: Thursday, July 17, 2003 7:52 AM To: 'Tomcat Users List' Subject: RE: JSP 2.0 in Tomcat 5.0.4 Understood - thanks for the clear, and to the point error. Doesn't that mean that the following should work? c:set var=bodyId scope=request tiles:getAsString name=body.id ignore=true/ /c:set body id=${requestScope.bodyId}? Or just body id=${bodyId} Because it doesn't work for me. Do I have to use the 2.4 in web.xml to make this work? Thanks, Matt -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Thursday, July 17, 2003 7:27 AM To: Tomcat Users List Subject: Re: JSP 2.0 in Tomcat 5.0.4 EL is integral to the jsp2 spec. Not jstl. EL is based off of jstl. From a quick glance at the spec, I see in Section 4: References to JSTL are informational - this library is not required by the JSP 2.0 specification. If you search for JSTL in the spec, its seems clear that if you want JSTL: you still need the classes and taglib declarations. The difference with JSP2 is you can now do this syntax without needing JSTL: Hello ${someVariable} (woohoo, no c:out needed!) I think you can also do this now too .. mytag myattr=${elExpression}/ But to do a loop (c:foreach) - you still need JSTL. You'll even see the taglib declarations for the JSTL core taglib in the examples in the spec. -Tim Raible, Matt wrote: It's my understanding that JSTL is an integral part of any JSP 2.0-compliant container. To me, this means that I shouldn't have to include jstl.jar/standard.jar in my app's WEB-INF/lib folder. I would also assume that I don't need to declare the JSTL tags as a directive: %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % %@ taglib uri=http://java.sun.com/jstl/fmt; prefix=fmt % However, this doesn't seem to be the case with JSP 2.0 in the jsp-examples that ship with Tomcat 5.0.4: 1. WEB-INF/lib contains jstl.jar and standard.jar 2. If I don't have a taglib declaration, c:if is not interpreted in a JSP in this project. Please fill me on on what I need to do for a JSP 2.0-compliant app. Do I need to include jstl.jar and standard.jar in WEB-INF/lib? Do I need to declare the taglibs when using fmt and c:...? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cannot load db driver in Tomcat 5.0.4
I'm trying to upgrade to Tomcat 5.0.4 and I'm getting the lovely error that I love so much: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cannot load db driver in Tomcat 5.0.4
I'm trying to upgrade to Tomcat 5.0.4 and I'm getting the lovely error that I love so much: java.sql.SQLException: Cannot load JDBC driver class 'null' This app works beautifully in Tomcat 4.1.24 and I can put the exact same directory, app.xml and jdbc driver in common/lib and it works. Has anything changed configuration-wise in 5.0.4? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cannot load db driver in Tomcat 5.0.4
I found that adding log4j.jar to $CATALINA_HOME/common/lib solved my problem, but now I get the following error when I start Tomcat and there is no logging to catalina.out: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded). log4j:WARN Please initialize the log4j system properly. Any help is appreciated. Matt -Original Message- From: Raible, Matt Sent: Tuesday, July 15, 2003 2:53 PM To: '[EMAIL PROTECTED]' Subject: cannot load db driver in Tomcat 5.0.4 I'm trying to upgrade to Tomcat 5.0.4 and I'm getting the lovely error that I love so much: java.sql.SQLException: Cannot load JDBC driver class 'null' This app works beautifully in Tomcat 4.1.24 and I can put the exact same directory, app.xml and jdbc driver in common/lib and it works. Has anything changed configuration-wise in 5.0.4? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cannot load db driver in Tomcat 5.0.4
I figured it out. It looks like the context.xml file must now go in $CATALINA_HOME/conf/Catalina/localhost, rather than $CATALINA_HOME/webapps. Doh! Now I have to figure out a way to modify my setup-tomcat task to detect and deploy appropriately for Tomcat 5. Here is the relevant part: echo level=infoCopying ${webapp.name}.xml to ${tomcat.home}/webapps/echo copy tofile=${tomcat.home}/webapps/${webapp.name}.xml file=metadata/web/tomcat-context.xml / Matt -Original Message- From: Raible, Matt Sent: Tuesday, July 15, 2003 3:17 PM To: '[EMAIL PROTECTED]' Subject: RE: cannot load db driver in Tomcat 5.0.4 I found that adding log4j.jar to $CATALINA_HOME/common/lib solved my problem, but now I get the following error when I start Tomcat and there is no logging to catalina.out: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded). log4j:WARN Please initialize the log4j system properly. Any help is appreciated. Matt -Original Message- From: Raible, Matt Sent: Tuesday, July 15, 2003 2:53 PM To: '[EMAIL PROTECTED]' Subject: cannot load db driver in Tomcat 5.0.4 I'm trying to upgrade to Tomcat 5.0.4 and I'm getting the lovely error that I love so much: java.sql.SQLException: Cannot load JDBC driver class 'null' This app works beautifully in Tomcat 4.1.24 and I can put the exact same directory, app.xml and jdbc driver in common/lib and it works. Has anything changed configuration-wise in 5.0.4? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: dbcp connection and database restart
Try adding a validation query, for example: parameter namevalidationQuery/name valueSELECT * FROM USER_TABLE/value /parameter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 6:46 AM To: [EMAIL PROTECTED] Subject: dbcp connection and database restart I've configured my jdbc datasource connection pool(using dbcp) in Tomcat 4.1.18 server.xml file. here is an extract of it. ResourceParams name=jdbc/intranetMail parameternameusername/namevalueXXX/value/parameter parameternamepassword/namevalueXXX/value/parameter parameternamedriverClassName/name valuecom.sybase.jdbc2.jdbc.SybDriver/value/parameter parameternameurl/name valuejdbc:sybase:Tds:s198000SGD1:5000/intranet_mail/value/parameter /ResourceParams Everything works fine. But when our database server is restarted, I have to restart Tomcat too in order to aquire connections from my defined pool. I wonder if there is a manner to avoid restarting Tomcat when the database server is restarted. I have added the parameters below to my pool config. parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter I recognize ,I've added that quite blindly. Can someone confirm me if this is a cure to my problem ? any suggestion is greatly appreciated. Meissa L'integrite de ce message n'etant pas assuree sur internet, Natexis Banques Populaires ne peut etre tenu responsable de son contenu. Toute utilisation ou diffusion non autorisee est interdite. Si vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur. The integrity of this message cannot be guaranteed on the Internet. Natexis Banques Populaires can not therefore be considered responsible for the contents.Any unauthorized use or dissemination is prohibited. If you are not the intended recipient of this message, then please delete it and notify the sender. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Réf. : RE: dbcp connection and database restart
Yes. http://www.mail-archive.com/[EMAIL PROTECTED]/msg91560.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 8:31 AM To: Tomcat Users List Cc: 'Tomcat Users List' Subject: Réf. : RE: dbcp connection and database restart Matt, do you think the validation query wille re initialize my pool ? Raible, Matt [EMAIL PROTECTED] 09/07/2003 14:49 Veuillez répondre à Tomcat Users List Pour : 'Tomcat Users List' [EMAIL PROTECTED] cc : Objet : RE: dbcp connection and database restart Try adding a validation query, for example: parameter namevalidationQuery/name valueSELECT * FROM USER_TABLE/value /parameter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 6:46 AM To: [EMAIL PROTECTED] Subject: dbcp connection and database restart I've configured my jdbc datasource connection pool(using dbcp) in Tomcat 4.1.18 server.xml file. here is an extract of it. ResourceParams name=jdbc/intranetMail parameternameusername/namevalueXXX/value/parameter parameternamepassword/namevalueXXX/value/parameter parameternamedriverClassName/name valuecom.sybase.jdbc2.jdbc.SybDriver/value/parameter parameternameurl/name valuejdbc:sybase:Tds:s198000SGD1:5000/intranet_mail/value/parameter /ResourceParams Everything works fine. But when our database server is restarted, I have to restart Tomcat too in order to aquire connections from my defined pool. I wonder if there is a manner to avoid restarting Tomcat when the database server is restarted. I have added the parameters below to my pool config. parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter I recognize ,I've added that quite blindly. Can someone confirm me if this is a cure to my problem ? any suggestion is greatly appreciated. Meissa L'integrite de ce message n'etant pas assuree sur internet, Natexis Banques Populaires ne peut etre tenu responsable de son contenu. Toute utilisation ou diffusion non autorisee est interdite. Si vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur. The integrity of this message cannot be guaranteed on the Internet. Natexis Banques Populaires can not therefore be considered responsible for the contents.Any unauthorized use or dissemination is prohibited. If you are not the intended recipient of this message, then please delete it and notify the sender. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] L'integrite de ce message n'etant pas assuree sur internet, Natexis Banques Populaires ne peut etre tenu responsable de son contenu. Toute utilisation ou diffusion non autorisee est interdite. Si vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur. The integrity of this message cannot be guaranteed on the Internet. Natexis Banques Populaires can not therefore be considered responsible for the contents.Any unauthorized use or dissemination is prohibited. If you are not the intended recipient of this message, then please delete it and notify the sender. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts in welcome-file-list
As part of the servlet 2.2/2.3 spec, you are not allowed to use a servlet/action as a welcome-file - only .html or .jsp (I think). This is changing in the servlet 2.4 spec. Matt -Original Message- From: Jeroen Breedveld [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 8:28 AM To: [EMAIL PROTECTED] Subject: Struts in welcome-file-list Hi all, I tried to get a page from my Struts application as default page in the welcome file list (see below) but it doesn't work, it keeps going to index.html. Am I doing something wrong or is it simply not possible? I did this: welcome-file-list welcome-filestart.do/welcome-file welcome-fileindex.html/welcome-file /welcome-file-list I also tried just start and /start.do , both didn't work either. Thanks and regards, Jeroen - 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: ServletContextListener problem
You have 2.2 in the first part of your DTD: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/dtd/web-app_2_3.dtd; Change it to: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; HTH, Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, June 27, 2003 12:17 PM To: Tomcat Users List Subject: ServletContextListener problem Hello people. I am trying to use a ServletContextListener but Tomcat 4.1.24 does not like my web.xml :-) The file follows below. I have no idea what's wrong! The error messages are: 27/06/2003 15:16:25 org.apache.commons.digester.Digester error SEVERE: Parse Error at line 9 column 14: Element type listener must be declared. org.xml.sax.SAXParseException: Element type listener must be declared. 27/06/2003 15:16:25 org.apache.commons.digester.Digester error SEVERE: Parse Error at line 10 column 23: Element type listener-class must be declared. org.xml.sax.SAXParseException: Element type listener-class must be declared. Please, help! :-) = ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app listener listener-class br.com.info.fomezero.bootstrap.BootStrapInvoker /listener-class /listener !-- Action Servlet Configuration -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- The Welcome File List -- welcome-file-list welcome-filesearch.jsp/welcome-file /welcome-file-list !-- Struts Tag Library Descriptors -- taglib taglib-uri/WEB-INF/struts-bean.tld/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-html.tld/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-logic.tld/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-template.tld/taglib-uri taglib-location/WEB-INF/struts-template.tld/taglib-location /taglib /web-app == === Augusto Cesar Guagliano [EMAIL PROTECTED] Project Manager +55 19 9106.9024 Infosoftware Consulting http://www.infosoftware.com.br === Esta mensagem pode conter informação confidencial e/ou privilegiada. Se você não for o destinatário ou a pessoa autorizada a receber esta mensagem, não pode usar, copiar ou divulgar as informações nela contidas ou tomar qualquer ação baseada nessas informações. Se você recebeu esta mensagem por engano, por favor avise imediatamente o remetente, respondendo o e-mail e em seguida apague-o. Agradecemos sua cooperação. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat's Ant Tasks
I'm having trouble using Tomcat's Ant Tasks. I've written up a wiki page on how I'm using them and the problems I'm experiencing. Any help is appreciated. http://raibledesigns.com/wiki/Wiki.jsp?page=TomcatAntTasks Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can JDBCrealm ... be in META-INF/context.xml file?
Here's my realm from Tomcat 4.1.x Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://localhost:3306/appfuse?autoReconnect=true connectionName=test connectionPassword=test userTable=app_user userNameCol=username userCredCol=password userRoleTable=user_role roleNameCol=role_name / -Original Message- From: Jim Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2003 2:20 PM To: Tomcat Users List Subject: Re: Can JDBCrealm ... be in META-INF/context.xml file? Thanks, I'm making progress. I found samples of three different versions of the realm descriptor. JDBCRealm ... realm ... and Realm JDBCRealm and Realm both behave the same. When I use them with: connectionURL=jdbc:mysql://localhost/authority?user=jimpassword=jim I get an error message upon deployment: FAIL - Encountered exception java.io.IOException: org.xml.sax.SAXParseException: The reference to entity password must end with the ';' delimiter. Adding a ; to the end of the password doesn't help. However changing it to: connectionURL=jdbc:mysql://localhost/authority?user=jim;password=jim does fix the problem, however when I attempt to log in, it fails. There are no entries in the mysql.log file so I'm pretty sure it isn't actually getting logged in. Here is part of the localhost_log.2003-06-19.txt file: I apologize for the wrap... 2003-06-19 16:02:09 StandardWrapper[/resources:default]: Loading container servlet default 2003-06-19 16:02:09 StandardWrapper[/resources:invoker]: Loading container servlet invoker 2003-06-19 16:02:09 StandardContext[/resources]: Starting completed 2003-06-19 16:02:31 Authenticator[/resources]: Security checking request GET /resources 2003-06-19 16:02:31 Authenticator[/resources]: Checking constraint 'SecurityConstraint[resources]' against GET -- true 2003-06-19 16:02:31 Authenticator[/resources]: Subject to constraint SecurityConstraint[resources] 2003-06-19 16:02:31 Authenticator[/resources]: Calling checkUserData() 2003-06-19 16:02:31 Authenticator[/resources]: User data constraint has no restrictions 2003-06-19 16:02:31 Authenticator[/resources]: Calling authenticate() 2003-06-19 16:02:31 Authenticator[/resources]: Failed authenticate() test 2003-06-19 16:02:31 Authenticator[/resources]: Security checking request GET /resources 2003-06-19 16:02:31 Authenticator[/resources]: Checking constraint 'SecurityConstraint[resources]' against GET -- true 2003-06-19 16:02:31 Authenticator[/resources]: Subject to constraint SecurityConstraint[resources] 2003-06-19 16:02:31 Authenticator[/resources]: Calling checkUserData() 2003-06-19 16:02:31 Authenticator[/resources]: User data constraint has no restrictions 2003-06-19 16:02:31 Authenticator[/resources]: Calling authenticate() 2003-06-19 16:02:31 Authenticator[/resources]: Failed authenticate() test 2003-06-19 16:02:33 Authenticator[/resources]: Security checking request GET /resources 2003-06-19 16:02:33 Authenticator[/resources]: Checking constraint 'SecurityConstraint[resources]' against GET -- true 2003-06-19 16:02:33 Authenticator[/resources]: Subject to constraint SecurityConstraint[resources] 2003-06-19 16:02:33 Authenticator[/resources]: Calling checkUserData() 2003-06-19 16:02:33 Authenticator[/resources]: User data constraint has no restrictions 2003-06-19 16:02:33 Authenticator[/resources]: Calling authenticate() 2003-06-19 16:02:33 Authenticator[/resources]: Failed authenticate() test I can't find anything in the log as a result of the debug setting in the realm . Here's my whole context.xml file: Context className=org.apache.catalina.core.StandardContext cachingAllowed=true charsetMapperClass=org.apache.catalina.util.CharsetMapper cookies=true crossContext=false debug=9 displayName=resources docBase=/usr/local/jakarta-tomcat-4.1.24/webapps/resources mapperClass=org.apache.catalina.core.StandardContextMapper path=/resources privileged=false reloadable=false swallowOutput=false useNaming=true wrapperClass=org.apache.catalina.core.StandardWrapper JDBCRealm classname=org.apache.catalina.realm.JDBCRealm debug=9 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://localhost/authority?user=jimpassword=jim userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name / /Context Anyone see what might be wrong? I've logged into the mysql database with the user/pw and accessed the tables so I'm sure that is working. Besides, if he attempted to log in, it would show up in the mysql.log. The application I'm trying to protect is accessing mysql fine, so I know the .jar file is working. THanks, Jim. Shapira, Yoav wrote: Howdy, As the Realm configuration document says: You may nest a Realm inside any Catalina container Engine,
RE: Can JDBCrealm ... be in META-INF/context.xml file?
All you can get is their username - using request.getRemoteUser(). To get the rest of their information, you'll have to query the database with handwritten code. Matt -Original Message- From: Jim Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2003 3:06 PM To: Tomcat Users List Subject: Re: Can JDBCrealm ... be in META-INF/context.xml file? Now that I can log in, the next question is how do I obtain the user login information from within my servlet? THanks, Jim. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: display tag
Try this: requestURI='%= request.getContextPath() + /results.do%' You should probably ask these display tag related questions on the display tag user list: http://lists.sourceforge.net/lists/listinfo/displaytag-user Matt -Original Message- From: Mark F [mailto:[EMAIL PROTECTED] Sent: Monday, June 16, 2003 9:15 AM To: Tomcat Users List Subject: display tag Why can I not do the following: display:table name=results width=55% pagesize=15 cellpadding=3 cellspacing=0 border=0 requestURI=%= request.getContextPath() %/results.do summary=Table summary blah blah ? Am I doing something wrong, what other option would I have besides hard-coding in the path. -Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Upgrading to Tomcat 5
I attempted to upgrade my Tomcat 4.1.24-based application to Tomcat 5.0.2 this morning and found a few issues: 1. I had to put mail.jar and activation.jar into common/lib so my log4j's SMTPAppender would work. 2. I had to copy log4-*.jar into common/lib to workaround this error: Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava. lang.Class;@1d33a6b for org.apache.commons.logging.impl.Log4JLogger at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI mpl.java:432) 3. In one of my JSP's, I have: %@ page import=org.apache.struts.Globals % c:remove var=%=Globals.ERROR_KEY% scope=request/ This works in Tomcat 4.1.x, but fails in Tomcat 5. Is this a bug in 4.1.x or 5.x? org.apache.jasper.JasperException: /common/messages.jsp(12,4) According to TLD or attribute directiv e in tag file, attribute var does not accept any expressions 4. None of my logging configuration in mywebapp/WEB-INF/classes/log4j.properties file is picked up. Even moving it to $CATALINA_HOME/common/lib does not seem to help. Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: webapps stopped à startup
You can stop contexts in the manager app (/manager/html) with Tomcat 4.1.x. -Original Message- From: BOULAY Arnaud [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 9:44 AM To: [EMAIL PROTECTED] Subject: webapps stopped à startup small tip please : How can I tell Tomcat that I don't want any web app (say /web4 among /webN) don't start while tomcat start ? thanks, Arno - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to setup JAASRealm in Tomcat 4.x.x
Here's how to setup Tomcat with a JAASRealm to talk to an NT Domain - maybe this will help: http://tinyurl.com/e5tp Matt -Original Message- From: Loyd Bacani [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 11:50 AM To: Tomcat Users List Subject: Re: How to setup JAASRealm in Tomcat 4.x.x As I mentioned below, I found most of these information about JAAS using Google (googling). But couldn't find the document(s) or information which would help me setup JAASRealm in Tomcat 4.1.x. Basically, what setup procedures nneds to be followed to enable JAASRealm in Tomcat 4.1.x. I know where to set it up (in tc/conf/server.xml) but what are the other things that I need to tie it all together. I hope this makes my question a bit clearer... I'm praying Craig is listening... HELP. Jacob Kjome [EMAIL PROTECTED] wrote: How about this: http://free.tagish.net/jaas/ or http://www.simind.com/ or http://www.cafesoft.com/ And, of course, Tomcat's documentation... http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/valve.html#Single %20Sign%20On%20Valve http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Single% 20Sign%20On http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/org/ap ache/catalina/authenticator/SingleSignOn.html See Java j2sdk1.4.x docs on JAAS http://java.sun.com/products/jaas/index-14.html See a Java Forums discussion about JAAS http://forum.java.sun.com/thread.jsp?thread=131056forum=60message=3452 78 Here's a Tech-tips article on JAAS http://developer.java.sun.com/developer/JDCTechTips/2001/tt0727.html Here's an O'Reilly tutorial on JAAS http://www.oreillynet.com/pub/d/861 Here's some DevX resources on JAAS http://www.devx.com/getHelpOn/Article/9915/0/page/1 The Tomcat Security Handbook also covers JASS http://www.bookpool.com/.x/txi8wch9x8/sm/1861008309 BTW, most of this was all found within a few minutes on Google. Jake At 07:04 AM 6/12/2003 -0700, you wrote: I've been googling for days now looking for documentation on how to setup JAASRealm in Tomcat 4.x.x. I am new to JAAS and I am currently on a project which requires the use of Tomcat and JAAS. Unfortunately, I have NOT found any documentation or steps that will accomplish this. Would it be possible to share that information Tomcat and JAAS experts? I'll be more than happy to document and post it back to this thread after a successful implementation. Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: can i send emails using servlets to yahoo or hotmail addresses
How about a code sample: http://tinyurl.com/e61q -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 12:49 PM To: Tomcat Users List Subject: RE: can i send emails using servlets to yahoo or hotmail addresses Howdy, See the JavaMail Sessions section of the Tomcat JNDI How-To here: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.htm l Or you could just read the JavaMail API/tutorial and do it yourself. Yoav Shapira Millennium ChemInformatics -Original Message- From: bilal sulehri [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 2:47 PM To: [EMAIL PROTECTED] Subject: can i send emails using servlets to yahoo or hotmail addresses I m beginner in servlets, and i don't know how can i send emails using servlets, can any one help me? _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Auto Login Using Form Based Authentication
1) Your Filter will not get called, since authentication happens before Filters (you'd need to use a Valve, but then you are locked into Tomcat). In my experience, and my current working app, this is not the case. The following code works for me in a filter (mapped to /*) to auto-login a user: snip if ((request.getRequestURL().indexOf(login)) { // Check to see if we should automatically login the user // container is routing user to login page, check for remember me cookie Cookie userCookie = RequestUtil.getCookie(request, username); String username = (passCookie != null) ? URLDecoder.decode(userCookie.getValue(), UTF-8) : null; if ((rememberMe != null) (password != null)) { // authenticate user without displaying login page String route = request.getContextPath() + /j_security_check?j_username= + username + j_password= + StringUtil.decodeString(password); if (log.isDebugEnabled()) { log.debug(I remember you ' + username + ', attempting authentication...); } response.sendRedirect(response.encodeRedirectURL(route)); return; } } Matt /snip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Display Tag, Tiles and Paging
Here's what I do as a workaround for this. I'm sure you could easily enhance this to convert all your request parameters into a URL with name/value pairs. %@ include file=/common/taglibs.jsp% %@ page import=org.apache.struts.util.MessageResources, org.apache.struts.Globals% % MessageResources resources = (MessageResources) request.getAttribute(Globals.MESSAGES_KEY); String searchTerm = ; String action = request.getParameter(action); if (search.equalsIgnoreCase(action)) { if (request.getParameter(searchBy) != null) { searchTerm = amp;searchBy=+request.getParameter(searchBy); } } % %-- For linking to edit screen --% bean:struts id=thisURL forward=searchChangeRequests/ bean:struts id=editURL forward=editChangeRequest/ display:table name=userCrList cellpadding=0 cellspacing=0 requestURI='%=request.getContextPath()+thisURL.getPath()+searchTerm%' scope=request pagesize=20 styleClass=list HTH, Matt -Original Message- From: Mark F [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 1:25 PM To: Tomcat Users List Subject: Display Tag, Tiles and Paging I have an ArrayList that is a collection of JavaBeans containing three attributes id, name, ssn. It is working well with the display column like this: div display:table name=results width=45% pagesize=10 cellpadding=3 cellspacing=0 border=0 requestURI=/SearchForm.do summary=Table summary - Listing of medical records contained in docbase for the given name display:column property=name title=Name sort=true / display:column property=ssn title=SSN sort=true autolink=true paramId=rid paramProperty=id href=/GetObjectByRid / display:setProperty name=sort.behavior value=list / display:setProperty name=paging.banner.include_first_last value=true / /display:table /div The paging and sorting do not work. It seems that I need to give it a requestURI parameter, but this causes the app to loose the request scoped values (the name that was searched on). It appends on some new URI parameters (page, order and sort). I found some examples on the developers site that allowed me to get this far but nothing on what needs to be in place before-hand to make this work. Also tiles definitions do not work in the requestURI parameter. Thanks, -Mark - 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: Auto Login Using Form Based Authentication
You could put a filter on /* in your app, and if the user is routed to the login page (check the URL for an indexOf(login.jsp)) - then set a request variable containing the parameter you want to save. Matt -Original Message- From: Val T. [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 12:46 PM To: Tomcat Users List Subject: Auto Login Using Form Based Authentication Hi, I have an atypical situation in that I am trying to auto login users from another system (a Lotus Domino system) when they connect to my JSP application. I am using Tomcat 4.1.18 and have form based authentication working on it. I would prefer if the users did not have to explicitly login, because, as far as they are concerned, it's all part of the same application. Here is what I was hoping to be able to do: The user, who is already logged in on the Domino system, clicks on the link to my application. The link contains the user's UserID, as a parameter. The page they are linking to is in a restricted area, so Tomcat serves up the login page, which takes the UID parameter, retrieves the related password from the database, and logs the user in onload. I have it all working beautifully, EXCEPT that I can't seem to be able to retrieve the parameter from the URL. I suspect that it is lost when, instead of serving up the destination page, Tomcat serves up the login page instead. Is there a way to pass a parameter to the login page? I think the issue is the fact that you can't just call the login page directly. Does anyone see a way around this? I was thinking that maybe I'd have to link to an index page first, and then write a cookie, which I'd have to access from the login page. That seems like such a round-about way to go, when it would be so much simpler to just grab a parameter from the URL. Thanks in advance for any advice. Val - 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: Struts Framework
Ever heard of Google? http://www.google.com/search?q=struts -Original Message- From: Anitha K Rao [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 4:12 AM To: Tomcat Users List Subject: Struts Framework Hi, Whats This Struts Framework?Kindly give me info in this domain. Ciao - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Auto login using a cookie
I have a way that's been working for me - see it at: http://raibledesigns.com/training/index.jsp?topic=rememberMe HTH, Matt -Original Message- From: Joël Wijngaarde [Us Media] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 6:14 AM To: Tomcat Users List Subject: Re: Auto login using a cookie Hi Tim, Thanks for the reply. I will take a lok at your suggestion, however using a valve would make the login structure Tomcat specific. Most Servlet-Containers supply someway of doing the authentication through LDAP / JDBC / FILE... and thus using this scheme is quite safe. But is there als a 'standard' way of using an auto login feature without breaking the Container independence. - Joel On Tue, 2003-06-03 at 13:38, Tim Funk wrote: I think you'd need to use a valve instead of a filter. The filters are invoked after any security check is done (i believe). As a starting reference, look at the SingleSignOn valve. -Tim Joël Wijngaarde [Us Media] wrote: Hi, I was wondering if there is a standard way of creating automatic login functionality in tomcat. What I mean is that a user can set a tik a box saying 'Automatically Log me in the next time I visit'. This is a common functionality on low security sites and improves user experience a lot. We now use the JDBC Realm for authentication of the users. Of course we can 9implement our own security filter checking for the necessary credentials, but it would be great if we could use the web.xml file to define the security constraints. Any suggestions or references? Regards, Joel - 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] -- Us Media Stadhouderskade 115 1073 AX Amsterdam t: +31 20 428 6868 f: +31 20 470 6905 w: http://www.usmedia.nl - 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: Container Managed Authentication
form ... method=post ... -Original Message- From: Vinh Tran [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 12:04 PM To: [EMAIL PROTECTED] Subject: Container Managed Authentication All: I am using CMA with Tomcat4/Apache1.3. I have a form-based login page pointed at j_security_check. When a user submits the form the username and password is shown in the statusbar of the browser. Also, there is a log entry in the Apache logs that display this same URL that with username/password information. Is there anyway to avoid the URL being displayed, and more importantly, is there a way to not log the login request? Thanks, Vinh. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How we solved our tomcat/oracle connectivity issues
A while back, I e-mailed this list regarding Tomcat - Oracle connectivity issues across a firewall. Basically, the firewall would kill connection pool-based connections after 90 minutes. We finally figured out a solution (rather than workarounds) - and the best news is - it's from the Oracle side, not on the Tomcat/application side. Read more here: http://tinyurl.com/d9cv HTH, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: What is the maximum session handling capability
It's all relative to CPU and RAM IMO. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, May 29, 2003 9:19 AM To: [EMAIL PROTECTED] Subject: What is the maximum session handling capability In the past, I've used Tomcat for very small projects. But, now I may be using Apache/Tomcat for an actual business-related project. I've been looking in the documentation, but haven't found this answer just yet. I'm sure this has been asked several times (I did a search in the archives, but didn't find the answer). How many concurrent sessions can Tomcat handle? How many concurrent sessions can Apache handle? Thanks, Kevin - 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: Alternate password encyption code?
Here's how I do it - and I generally use SHA as my algorithm: /** * Encode a string using algorithm specified in web.xml and return the * resulting encrypted password. If exception, the plain credentials * string is returned * * @param password Password or other credentials to use in authenticating *this username * @param algorithm Algorithm used to do the digest * * @return encrypted password */ public static String encodePassword(String password, String algorithm) { byte[] unencodedPassword = password.getBytes(); MessageDigest md = null; try { // first create an instance, given the provider md = MessageDigest.getInstance(algorithm); } catch (Exception e) { log.error(Exception: + e); return password; } md.reset(); // call the update method one or more times // (useful when you don't know the size of your data, eg. stream) md.update(unencodedPassword); // now calculate the hash byte[] encodedPassword = md.digest(); StringBuffer buf = new StringBuffer(); for (int i = 0; i encodedPassword.length; i++) { if (((int) encodedPassword[i] 0xff) 0x10) { buf.append(0); } buf.append(Long.toString((int) encodedPassword[i] 0xff, 16)); } return buf.toString(); } -Original Message- From: Jeff Sexton [mailto:[EMAIL PROTECTED] Sent: Thursday, May 29, 2003 4:25 PM To: [EMAIL PROTECTED] Subject: Alternate password encyption code? I need to use my own bit of java to encrypt passwords for a JDBCRealm. I have no idea what approach is best to take with this, anyone have any suggestions? Thanks Jeff Sexton The ODS Companies [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: placement of properties files
I'd recommend WEB-INF/classes - then it's in the classpath. -Original Message- From: Schwartz, David (CHR) [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 6:57 AM To: 'Tomcat Users List' Subject: RE: placement of properties files I think web-inf folder - since tomcat wont serve files contained therein. -Original Message- From: Timothy Stone [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 8:55 AM To: Tomcat Users Subject: placement of properties files Q: where is the proper place for [props].properties files? such as something that might store username and password pairs. Not the best practice, but if one wanted to. Thanks, Tim - 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]
java.io.IOException: Not owner - when using Netfiler
We've recently tried moving our home directories from each individual Unix (Solaris) server to a netfiler that we can map as an NT drive. It emulates NTFS (so we can map drives from our Win2K machines), and also behaves just like a Unix home directory. I have tomcat installed in my home directory, and I keep getting the following errors - the JAR in this case is irrelevant - it happens on a different jar for each webapp I have running (full stacktrace below): java.io.IOException: Not owner at java.io.UnixFileSystem.createFileExclusively(Native Method) I have full control over all the files (as an NT user) and I'm also the owner (according to Unix), but it appears that something on the netfiler is causing the problems. Any ideas are appreciated. Thanks, Matt 2003-05-28 15:16:09 ContextConfig[/cct]: Scanning JAR at resource path '/WEB-INF/lib/hibernate.jar' 2003-05-28 15:16:09 ContextConfig[/cct] Exception processing JAR at resource path /WEB-INF/lib/hibernate.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/hibernate.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3567) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8 21) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer. java:700) 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.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252) at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260) at org.apache.commons.digester.Rule.end(Rule.java:276) at org.apache.commons.digester.Digester.endElement(Digester.java:1064) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc her.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1562) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j ava:385) at org.apache.catalina.core.StandardHost.install(StandardHost.java:803) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:442 ) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:399) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:358) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196) 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:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) 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(DelegatingMethodAccessorImpl .java:25) at
RE: STRUTS in Tomcat?
The 4.1.x version of Tomcat has an Administration app that's written using Struts. -Original Message- From: Chin, Ed [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 2:29 PM To: 'Tomcat Users List' Subject: STRUTS in Tomcat? Is STRUTS included in the distribution of Tomcat? That's what the documentation for Struts installation leads me to believe. -Edward - 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: URGENT: java.lang.OutOfMemoryError
I experienced lots of OutOfMemoryError's with 4.1.18. I don't think I've seen any since upgrading to 4.1.24. HTH, Matt -Original Message- From: Galbayar Dorjgotov [mailto:[EMAIL PROTECTED] Sent: Saturday, March 29, 2003 6:26 PM To: Tomcat Users List Subject: URGENT: java.lang.OutOfMemoryError I'm running Tomcat 4.1.18 on Linux 7.3+jdk 1.4 and installed few webapps. I think one application leaks memory but i can't detect what one leaks memory? Tomcat reports(catalina.out) Mar 29, 2003 11:34:25 PM org.apache.tomcat.util.log.CommonLogHandler log SEVERE: Exception in acceptSocket java.lang.OutOfMemoryError java.lang.OutOfMemoryError How do i detect which application leaks memory? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4.1.24- do not follow symbolic link- works finein4.0 .6
You must do it for your test context - not the example context. Please post these messages to the list rather than to me directly - you'll get better support from the list. Matt -Original Message- From: Ajay Agrawal [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 11:04 AM To: Raible, Matt Subject: RE: Tomcat 4.1.24- do not follow symbolic link- works fine in4.0 .6 Hi Matt, I tried your suggestion as follows but still symbolic link is not working. !-- Tomcat Examples Context -- Context path=/examples docBase=examples debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_examples_log. suffix=.txt timestamp=true/ Resources className=org.apache.naming.resources.FileDirContext allowLinking=true caseSensitive=true/ Ejb name=ejb/EmplRecord type=Entity home=com.wombat.empl.EmployeeRecordHome remote=com.wombat.empl.EmployeeRecord/ Also tried !-- Tomcat Examples Context -- Context path=/examples docBase=examples debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_examples_log. suffix=.txt timestamp=true/ Resources className=org.apache.naming.resources.FileDirContext allowLinking=true docBase=/ Ejb name=ejb/EmplRecord type=Entity home=com.wombat.empl.EmployeeRecordHome remote=com.wombat.empl.EmployeeRecord/ Please let me know if you see any problem with my defnition. Thanks in advance for any input, Ajay -Original Message- From: Raible, Matt [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 1:53 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1.24- do not follow symbolic link- works fine in4.0 .6 Context path= docBase=ROOT debug=0 Resources className=org.apache.naming.resources.FileDirContext allowLinking=true caseSensitive=true / ... -Original Message- From: Ajay Agrawal [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 2:38 PM To: Tomcat Users List Subject: Tomcat 4.1.24- do not follow symbolic link- works fine in 4.0.6 Hi, I have installed Tomcat 4.1.24 and having problem with symbolic link. It does not recognise symbolic link directory. Lets say I have created a symbolic link directory test in webapps/ROOT = and trying to access page by http://server:8080/test give me error desciption The requested =resource (/test/) is not available But same works fine tomcat 4.0.4. Please Advice? Any input would be highly appreciated. Thanks in Advance, Ajay - 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]
JDBCRealm Timeout
I have an issue where my db connection (to Oracle 9i) times out after 90 minutes of inactivity due to a firewall. I've found a workaround by scheduling a cron job that pings my datasource. However, it only pings my connection pool, but my JDBCRealm. For my connection pool, my JDBC Driver is: oracle.jdbc.pool.OracleConnectionPoolDataSource I tried to use this in my JDBCRealm as the driverName, but no dice. WARN [main] SessionFactoryImpl.init(163) | Could not obtain connection metadata java.sql.SQLException: Cannot load JDBC driver class 'null' The only thing I seem to be able to use is: oracle.jdbc.driver.OracleDriver Therefore, my realm is timeing out, whereas my pool stays active. I can't login to verify this, but it is my suspicion, especially since my DBPing can still be run, and it hits the same table as the JDBCRealm. Any ideas? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: connection pool
I've seen this same issue and I'm interested in a solution as well. Thanks, Matt -Original Message- From: Salina Cheung [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 9:00 AM To: [EMAIL PROTECTED] Subject: connection pool Hi, When tomcat reloads class files, it also reinitialize the context and the connection pool. But if there are users hitting the site, the connections dont get closed property. These connections still connects to the DB server, but not usable in the newly intialized connection pool. I tried to close the connections in detroy method of servlet, but it is too later by the time destroy method of servlet is called. Please help. I have tomcat 4.1.18, a cluster of 15 instances. Each instance has max active connection of 55. This bug causes total number of connections to the DB exceeds total number of connections a dB server can take. Salina __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Anygood Howto on Multiple Virtual Hosts Apache, mod_jk andTo mcat
http://raibledesigns.com/tomcat/index.html Step 6: Configuring Private JVMs. HTH, Matt -Original Message- From: Richie Chauhan [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 10:31 AM To: Tomcat Subject: Anygood Howto on Multiple Virtual Hosts Apache, mod_jk and Tomcat Hi All, With the help of everyone here - I have managed to tie together all the bits and pieces to get apache mod_jk tomcat to work together. What I am now having problems with however is the following: I have 1 box running Solaris 9 with 3 ip addresses 192.161.1.3 jupiter (actual hostname) 192.161.1.10 dev 192.161.1.11 stage I want the sites to be on DEV and STAGE through the apache_mod_jk_tomcat (Virtual Hosts). I am however confused as to how to map apache virtual hosts configurations to tomcat virtual host configurations. OR I might be making this whole thing too complicated and there may be a simple way to achieve the above configuration. Thanks Richie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4.1.24- do not follow symbolic link- works fine in4.0 .6
Context path= docBase=ROOT debug=0 Resources className=org.apache.naming.resources.FileDirContext allowLinking=true caseSensitive=true / ... -Original Message- From: Ajay Agrawal [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 2:38 PM To: Tomcat Users List Subject: Tomcat 4.1.24- do not follow symbolic link- works fine in 4.0.6 Hi, I have installed Tomcat 4.1.24 and having problem with symbolic link. It does not recognise symbolic link directory. Lets say I have created a symbolic link directory test in webapps/ROOT = and trying to access page by http://server:8080/test give me error desciption The requested =resource (/test/) is not available But same works fine tomcat 4.0.4. Please Advice? Any input would be highly appreciated. Thanks in Advance, Ajay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4.1.24- do not follow symbolic link- works finein4.0 .6
In server.xml - where you define the context for your application or at the global level next to similar Resources entries. HTH, Matt -Original Message- From: Ajay Agrawal [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 3:16 PM To: Raible, Matt Subject: RE: Tomcat 4.1.24- do not follow symbolic link- works fine in4.0 .6 Thanks for your quick response. I am fairly new to this tomcat and JAVA world. Please point me where I can make your suggested changes. Thanks Again, Ajay -Original Message- From: Raible, Matt [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 1:53 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1.24- do not follow symbolic link- works fine in4.0 .6 Context path= docBase=ROOT debug=0 Resources className=org.apache.naming.resources.FileDirContext allowLinking=true caseSensitive=true / ... -Original Message- From: Ajay Agrawal [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 2:38 PM To: Tomcat Users List Subject: Tomcat 4.1.24- do not follow symbolic link- works fine in 4.0.6 Hi, I have installed Tomcat 4.1.24 and having problem with symbolic link. It does not recognise symbolic link directory. Lets say I have created a symbolic link directory test in webapps/ROOT = and trying to access page by http://server:8080/test give me error desciption The requested =resource (/test/) is not available But same works fine tomcat 4.0.4. Please Advice? Any input would be highly appreciated. Thanks in Advance, Ajay - 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: Admin is incomplete
Just so 4.1.24 doesn't get a bad rap - I'm having awesome success with it over 4.1.18. I'm not using the LE version, but I am running it on JDK 1.4.1. I used to get OutOfMemory errors all the time with 4.1.18, but haven't had any since the upgrade. The admin app doesn't work (details at http://tinyurl.com/87q7), but I never use it, so I don't mind at all. Matt -Original Message- From: Richard Dunn [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 12:59 PM To: Tomcat Users List Subject: Re: Admin is incomplete On Wednesday 26 March 2003 12:50, Herbert G. Fischer wrote: Hi again, I'm getting very angry with Tomcat 4.1.24... It's half made... There's a lot of classes missing!!! I have not used the LE edition of Tomcat, but is it possible the problems you are having is because the Light Edition does not include the classes you are trying to use? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Contract Work Hourly Rates
In this economy, I usually ask the client how much they're willing to spend. Usually they will fess up and then you can decide from there. Telling them how much you (truly) want will usually result in yeah, right. Matt -Original Message- From: Micael [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 2:44 PM To: Tomcat Users List Subject: [OT] Contract Work Hourly Rates I have a job offer to do contract work coding websites. I am well versed in most of the areas required, and wonder what is a good hourly rate to ask for? I know Java (certified programmer), Tomcat, Struts, Ant, blah, blah, as well as scripting, Red Hat, etc. Thanks for any assistance. LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Contract Work Hourly Rates
Most clients seem to want to pay b/w 30 and 50, from what I've seen. When I've asked for more than that - I don't get any returned e-mails or phone calls. In Florida, where I've been hoping to find my next job, it's more like 20-40/hour. :( Matt -Original Message- From: Micael [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 3:26 PM To: Tomcat Users List Subject: RE: [OT] Contract Work Hourly Rates Do you have a ballpark, since I was asked? At 03:15 PM 3/26/03 -0700, you wrote: In this economy, I usually ask the client how much they're willing to spend. Usually they will fess up and then you can decide from there. Telling them how much you (truly) want will usually result in yeah, right. Matt -Original Message- From: Micael [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 2:44 PM To: Tomcat Users List Subject: [OT] Contract Work Hourly Rates I have a job offer to do contract work coding websites. I am well versed in most of the areas required, and wonder what is a good hourly rate to ask for? I know Java (certified programmer), Tomcat, Struts, Ant, blah, blah, as well as scripting, Red Hat, etc. Thanks for any assistance. LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Contract Work Hourly Rates
Currently, I live in Denver, Colorado and hope to be living in West Palm Beach in the next 6 months. -Original Message- From: Micael [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 4:32 PM To: Tomcat Users List Subject: RE: [OT] Contract Work Hourly Rates Where are you located, Matt? At 03:45 PM 3/26/03 -0700, you wrote: Most clients seem to want to pay b/w 30 and 50, from what I've seen. When I've asked for more than that - I don't get any returned e-mails or phone calls. In Florida, where I've been hoping to find my next job, it's more like 20-40/hour. :( Matt -Original Message- From: Micael [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 3:26 PM To: Tomcat Users List Subject: RE: [OT] Contract Work Hourly Rates Do you have a ballpark, since I was asked? At 03:15 PM 3/26/03 -0700, you wrote: In this economy, I usually ask the client how much they're willing to spend. Usually they will fess up and then you can decide from there. Telling them how much you (truly) want will usually result in yeah, right. Matt -Original Message- From: Micael [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 2:44 PM To: Tomcat Users List Subject: [OT] Contract Work Hourly Rates I have a job offer to do contract work coding websites. I am well versed in most of the areas required, and wonder what is a good hourly rate to ask for? I know Java (certified programmer), Tomcat, Struts, Ant, blah, blah, as well as scripting, Red Hat, etc. Thanks for any assistance. LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 4.1.24 and Coyote JK2 Connector
I've upgraded this morning to Tomcat 4.1.24 from 4.1.18. On 4.1.18, I was connecting to Apache using the following configuration in server.xml: Connector className=org.apache.ajp.tomcat4.Ajp13Connector acceptCount=10 bufferSize=2048 connectionLinger=-1 connectionTimeout=-1 debug=0 enableLookups=false maxProcessors=75 minProcessors=5 port=11009 redirectPort=-1 scheme=http secure=false tomcatAuthentication=true I tried moving to the newer connector for Tomcat 4.1.24: !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ But I get the following message in my log file. If this is not an issue (which I don't think it is b/c it's an INFO), how do I turn this log message off? Mar 24, 2003 10:42:40 AM org.apache.jk.common.ChannelSocket processConnection INFO: connection timeout reached Do I just set the connectionTimeout to -1? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Custom JDBCRealm
Why not just add a filter that has the same url-pattern as your protected resource. I do this, and if there's not a user object in the session, I populate it from a database. Example at http://tinyurl.com/7xb1 HTH, Matt -Original Message- From: awc [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2003 2:42 PM To: 'Tomcat Users List' Subject: Custom JDBCRealm Hi, I want to add more stuff to user session while user logs in. The only way I see to do this is to write custom JDBCRealm class which extnds org.apache.catalina.realm.JDBCRealm or implement org.apache.catalina.realm.RealmBase class. This custom class will have more initializing parameters too. Any thoughts on this from one who already did sort of thing?? I am going to use this one with securityFilere from www.securityfilter.org. Thank you in advance for any replies. .anil - 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 JDBCRealm
Nope, I just use form-based authentication - the realm is irrelevant. I call request.getRemoteUser() to get the user's information and then look it up in a database (could be ldap). Tomcat does the authorization for me. -Original Message- From: awc [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2003 3:06 PM To: Tomcat Users List Subject: Re: Custom JDBCRealm may be this is dumb question. So do you run two filters? one for authticate and to check authorization and other to load the customo objects?? Thanks Matt.. .anil // user authenticated, empty user object if ((username != null) (userForm == null)) { ses = getSession(); UserManager mgr = new UserManagerImpl((String) ctx.getAttribute(Constants.DAO_TYPE)); UserForm user = mgr.getUser(ses, username); session.setAttribute(Constants.USER_KEY, user); Raible, Matt wrote: Why not just add a filter that has the same url-pattern as your protected resource. I do this, and if there's not a user object in the session, I populate it from a database. Example at http://tinyurl.com/7xb1 HTH, Matt -Original Message- From: awc [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2003 2:42 PM To: 'Tomcat Users List' Subject: Custom JDBCRealm Hi, I want to add more stuff to user session while user logs in. The only way I see to do this is to write custom JDBCRealm class which extnds org.apache.catalina.realm.JDBCRealm or implement org.apache.catalina.realm.RealmBase class. This custom class will have more initializing parameters too. Any thoughts on this from one who already did sort of thing?? I am going to use this one with securityFilere from www.securityfilter.org. Thank you in advance for any replies. .anil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Custom JDBCRealm
I mean to say - the type of realm is irrelevant. I've tested this strategy using a JNDIRealm with LDAP, a MemoryRealm with tomcat-users.xml, a JDBCRealm with MySQL/Oracle, and even a JAASRealm that talks to NT - works fine with all and should be portable to other appservers. If you extend a Tomcat class and create your own authenticator - you'll have to add tomcat jars to your project. HTH, Matt -Original Message- From: Raible, Matt Sent: Friday, March 21, 2003 4:12 PM To: 'Tomcat Users List' Subject: RE: Custom JDBCRealm Nope, I just use form-based authentication - the realm is irrelevant. I call request.getRemoteUser() to get the user's information and then look it up in a database (could be ldap). Tomcat does the authorization for me. -Original Message- From: awc [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2003 3:06 PM To: Tomcat Users List Subject: Re: Custom JDBCRealm may be this is dumb question. So do you run two filters? one for authticate and to check authorization and other to load the customo objects?? Thanks Matt.. .anil // user authenticated, empty user object if ((username != null) (userForm == null)) { ses = getSession(); UserManager mgr = new UserManagerImpl((String) ctx.getAttribute(Constants.DAO_TYPE)); UserForm user = mgr.getUser(ses, username); session.setAttribute(Constants.USER_KEY, user); Raible, Matt wrote: Why not just add a filter that has the same url-pattern as your protected resource. I do this, and if there's not a user object in the session, I populate it from a database. Example at http://tinyurl.com/7xb1 HTH, Matt -Original Message- From: awc [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2003 2:42 PM To: 'Tomcat Users List' Subject: Custom JDBCRealm Hi, I want to add more stuff to user session while user logs in. The only way I see to do this is to write custom JDBCRealm class which extnds org.apache.catalina.realm.JDBCRealm or implement org.apache.catalina.realm.RealmBase class. This custom class will have more initializing parameters too. Any thoughts on this from one who already did sort of thing?? I am going to use this one with securityFilere from www.securityfilter.org. Thank you in advance for any replies. .anil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: configuring j_security_check in Tomcat
You have to configure form-based authentication and try to access a protected resource for this to work. Matt -Original Message- From: Lanto Randriamiharisoa [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2003 1:34 AM To: [EMAIL PROTECTED] Subject: configuring j_security_check in Tomcat Hi all, I'm new to Tomcat (especially for advanced configuration like JNDI or security management) I've heared about using the security mechanism j_security_check and I'd like to use it. However, I don't know how to configure it in Tomcat. Complementary informations : I'm using JBuilder 8 which includes in its distribution Tomcat 4.0.6-LE. And when I try to call the j_security_servlet in my login page, I get an error j_security_check not found (or something like this). It sounds like that j_security_check is not included in this distribution. So the second question is : must I use a tomcat distribution which is not a LE to use j_security_check Thanks -- Lanto - 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: remember password HOW-TO?
I've been able to implement Remember Me functionality using form-based authentication and cookies on Tomcat 4.1.18. http://www.mail-archive.com/[EMAIL PROTECTED]/msg86636.html An example app (requires Ant 1.5.1 to build and J2EE_HOME to be set) is available at: http://raibledesigns.com/downloads/security-example-1.0.zip (10MB) HTH, Matt -Original Message- From: Will Hartung [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 3:06 PM To: Tomcat Users List Subject: Re: remember password HOW-TO? From: David Reed [EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:46 PM Subject: remember password HOW-TO? I am a relative newbie to servlet programming and I'm not really sure how to best solve a problem I am having. I am trying to implement a save my password feature on my web site. I am using Tomcat 4.1.18. I am using form-based authentication and I am using the Tomcat provided userdatabase to store my usernames, passwords and roles. If you're using container based authentication (which you are), then you can not implement a remember me facility within the Servlet API, there's simply no mechanism for it exposed by the container. Of course, you're welcome to beat on Tomcat itself to provide this non-portable functionality, but there's no way to do it solely within your web app. The only other solution is to implement all security using standard mechanisms with Servlets et al, but that's a big wheel to re carve out of stone. Regards, Will Hartung ([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: remember password HOW-TO?
Actually, it *is* using form-based security. I just do a redirect to j_security_check to mimic how a form's action submits to action=j_security_check. The user can choose to remember password by checking a checkbox and then a cookie is set for their username and password. So it's optional remember me functionality. So, IMO - this is a way to implement remember me with container managed authentication. It's working like a charm for me in 2 production apps. Of course, they both are running on Tomcat, but it *should* work on any container. Matt -Original Message- From: Will Hartung To: Tomcat Users List Sent: 3/5/2003 4:11 PM Subject: Re: remember password HOW-TO? From: Raible, Matt [EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 2:36 PM Subject: RE: remember password HOW-TO? I've been able to implement Remember Me functionality using form-based authentication and cookies on Tomcat 4.1.18. http://www.mail-archive.com/[EMAIL PROTECTED]/msg86636.html To be pedantic, this is simply security implemented with Servlets and Filters, and has nothing to do with the container based Form Based Security. I'm sure it works fine and does the job, I'm not questioning its quality or functionality, and David may well be able to lift it and use it straighaway. I'm just pointing out that this does not interact in any way with the Container provided security infrastructure. FYI Regards, Will Hartung ([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: remember password HOW-TO?
I have a filter that has a url-pattern/*/url-pattern and a security contraint of url-pattern*.do/url-pattern, so the filter is hit even when the container detects a security constraint and redirects to the login screen. My login-config is as follows: login-config auth-methodFORM/auth-method form-login-config form-login-page/login.jsp/form-login-page form-error-page/login.jsp?error=true/form-error-page /form-login-config /login-config The filter checks for request.getRequestURL().indexOf(login.jsp) and if it's there, it checks for the cookies and redirects to j_security_check?j_username=cookieUsernamej_password=cookiePassword - just like the form does. Here's the code for the filter: http://tinyurl.com/6jn8 It also checks for the form-error-page's URL and if that's there, it deletes the cookies, so the user is routed to the form-error-page without attempting a login. This might not work in containers that do a forward to the login.jsp - making it invisible (??) to the filter. But if you're using Tomcat, this is awesome and has sped up my development time considerably as I never have to login anymore! Matt -Original Message- From: Will Hartung To: Tomcat Users List Sent: 3/5/2003 6:56 PM Subject: Re: remember password HOW-TO? From: Raible, Matt [EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 4:36 PM Subject: RE: remember password HOW-TO? Actually, it *is* using form-based security. I just do a redirect to j_security_check to mimic how a form's action submits to action=j_security_check. Really? That certainly is crafty, and I'd like to think that it would work, but I'm a bit puzzled. Perhaps someone can clarify these points. My understanding is that the basic problems with interacting with Container based authentication are two fold. One is that the Servlet API provides no way for a Servlet to actually set the UserPrincipal, a Servlet can only access it. As seen by a Servlet, the UserPrincipal is an attribute of the Request, not of the Session. Your technique sort of mitigates this by directing to the container specific parts so it can Do Its Thing. However, my understanding of the path of a request is something like this: Request - Mapper (determines where this URL should go, servlet, jsp, etc) - Container Security (if Mapper points to protected resource, Security kicks in) - Filters - Servlets I'm under the impression that the Container Security layer is ABOVE the Filter layer. So, if you have a Container Security Managed resource that is also a Filtered Resource, then the Security will hit first before the Filter has a chance to do anything (in this example check a cookie and redirect). Now, this data flow is not enumerated at all within the spec, at least not in a nice blocky diagram. Filters can easily come before the Container Security, but I would think not as the filter may be doing something (say an Access Log filter) for a request that is later denied by Container Security, and then the user is passed on to either HTTP or Form based authentication. This would also be horribly nasty if for some silly reason the Filter had already started committing the response (which it's allowed to do). So, for simply sanity I'd think all of the Container Security would be done far before the Filters start firing. And I don't know how Container Security interacts with RequestDispatcher. If a unsecured request tries a .include or .foreward call. I'm guessing not at all. But, all of this tells me that Container Security is really just a thin veneer hammered in place between the original request and the rest of the Container. Anyway, I'm not saying your implementation does not work, obviously it does, or you wouldn't be using it. However I would be curious to see your security-contraint tags and filter-mapping tags. Regards, Will Hartung ([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: [ANN] Tomcat 5.0.1 Alpha released - where's JSTL
I attempted to migrate my application to 5.0.1 today for kicks. I know that c:out value=${...}/ has been replaced by ${...}, but what about c:forEach .. - how do I use this with JSP 2.0? Isn't it the same as using JSTL? Thanks, Matt -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2003 5:18 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [ANN] Tomcat 5.0.1 Alpha released Tomcat 5.0.1 Alpha is now available for testing. This is actually the first real milestone of Tomcat 5, as Tomcat 5.0.0 did not include any new feature over 4.1.x other than the support for Servlet API 2.4 drafts and JSP 2.0 drafts. Tomcat 5.0.1 includes: - improved performance (with additional improvements planned) - complete montoring capabilities through JMX, with JSR 77 support - clustering capabilities (not included with that build as a binary) - JMX configuration capabilities - with a lot more to come in later milestones Downloads: http://jakarta.apache.org/builds/jakarta-tomcat/release/v5.0.1-alpha/ Remy - 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: realm getRole() method ?
request.isUserInRole(rolename) ?? -Original Message- From: laurent marot [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 9:02 AM To: Tomcat Users List Subject: realm getRole() method ? hi all, using realm authentication is there a method to get remoteUser role without sending a datbase request ? thanks for your help - 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: HTTP Status 500 Error
web.xml - an example: error-page error-code500/error-code location/error.jsp?code=500/location /error-page -Original Message- From: Ravindra K. Bhat [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 1:24 PM To: Tomcat Users List Subject: HTTP Status 500 Error Hello how do I replace HTTP Status 500 error page with my own page? Thanks Ravi - 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: LDAP Authentication
Here's what I have in my context to make it work: Realm className=org.apache.catalina.realm.JNDIRealm debug=99 connectionName=cn=Manager,dc=raibledesigns,dc=com connectionPassword=secret connectionURL=ldap://drevil:389; userPassword=userPassword userPattern=uid={0},ou=people,dc=raibledesigns,dc=com roleBase=ou=groups,dc=raibledesigns,dc=com roleName=cn roleSearch=(uniqueMember={0}) / -Original Message- From: Marcelino Cruz [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 7:13 AM To: 'Tomcat Users List' Subject: LDAP Authentication Hello: Does anyone here has LDAP authentication set up through a JNDIRealm in server.xml and could send me a sample server.xml for me to look at? Thanks! MC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Authentication and Roles - case sensitivity
I have the following security role in my web.xml file: security-role descriptionRole to allow authentication/description role-nameAdministrator/role-name /security-role In my JDBCRealm, I have role_name defined for the user as: USERID ROLENAME - tomcat ADMINISTRATOR You can see that the role's case does not match. If I add the following to one of my filters: log.debug(isUserInRole('Administrator'): + request.isUserInRole(Administrator)); log.debug(isUserInRole('administrator'): + request.isUserInRole(administrator)); log.debug(isUserInRole('ADMINISTRATOR'): + request.isUserInRole(ADMINISTRATOR)); I get: isUserInRole('Administrator'): false isUserInRole('administrator'): false isUserInRole('ADMINISTRATOR'): true The reason I ask this is b/c I'm developing a menu application that filters on roles and hides/shows menus based on a role name. What should I do to mimic Tomcat's behavior? Should I do an toUpperCase on the rolename and database role? What does Tomcat do? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Authentication and Roles - case sensitivity
Tomcat is case sensitive everywhere except where the servlet spec says it is explicitly not case sensitive (such as request.getHeader()). That includes things like matching role names. So you're saying that matching role names is NOT case sensitive. I'm guessing this from my own experience on 4.1.18. However, since request.isUserInRole() IS case sensitive, how can I do matching in a NON case sensitive way. Too bad there isn't a request.isUserInRoleIgnoreCase() ;-) Thanks for any tips. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Form based security and Remember Me
Here's how I've done it - First of all, I don't use j_security_check as my action, but rather auth/ which maps to a LoginServlet. That servlet does some other things, but here's the relevant code. The StringUtil.encodeString(password) method changes to cookie to be base64 encrypted. Not a very good encryption, but better than nothing. LoginServlet.java = String username = request.getParameter(j_username).toLowerCase(); String password = request.getParameter(j_password); if (request.getParameter(rememberMe) != null) { response = RequestUtil.setCookie(response, rememberMe, true, false); response = RequestUtil.setCookie(response, password, StringUtil.encodeString(password), false); } String req = j_security_check?j_username= + RequestUtils.encodeURL(username) + j_password= + RequestUtils.encodeURL(password); response.sendRedirect(response.encodeRedirectURL(req)); Then I have a filter mapped to /* and it has the following code: Cookie rememberMe = RequestUtil.getCookie(request, rememberMe); Cookie passCookie = RequestUtil.getCookie(request, password); String password = (passCookie != null) ? URLDecoder.decode(passCookie.getValue(), UTF-8) : null; // form-error-page/login.jsp?error=true/form-error-page boolean authFailed = StringUtils.equals(request.getParameter(error), true); // check to see if the user is logging out, if so, remove the // rememberMe cookie and password Cookie if ((request.getRequestURL().indexOf(logout) != -1) || authFailed) { if (log.isDebugEnabled()) { log.debug(deleting rememberMe-related cookies); } response = RequestUtil.deleteCookie(response, RequestUtil.getCookie(request, rememberMe)); response = RequestUtil.deleteCookie(response, passCookie); } if ((request.getRequestURL().indexOf(login) != -1) !authFailed) { // Check to see if we should automatically login the user // container is routing user to login page, check for remember me cookie Cookie userCookie = RequestUtil.getCookie(request, username); String username = (passCookie != null) ? URLDecoder.decode(userCookie.getValue(), UTF-8) : null; if ((rememberMe != null) (password != null)) { // authenticate user without displaying login page String route = j_security_check?j_username= + username + j_password= + StringUtil.decodeString(password); if (log.isDebugEnabled()) { log.debug(I remember you ' + username + ', attempting authentication...); } response.sendRedirect(response.encodeRedirectURL(route)); return; } } chain.doFilter(req, resp); This has been working great for me, but I've only tested it on Tomcat. HTH, Matt -Original Message- From: John Trollinger [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 20, 2003 1:12 PM To: [EMAIL PROTECTED] Subject: Form based security and Remember Me I seached the archive and only saw one message pertaining to this. Is anyone doing this at all? And if so how? Thanks, John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do i get the URL ... ?
request.getRequestURL() if you're using Servlet 2.3. -Original Message- From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] Sent: Friday, February 21, 2003 2:21 AM To: Tomcat List Subject: How do i get the URL ... ? Hi, Lets say I have a Welcome.jsp page. How can i get the completely URL to this page from within the Welcome.jsp page ? Welcome.jsp could be under http://mydomain.ding.com/blah/bloop/Welcome.jsp OR http://yourdomain.dong.com/yum/dum/Welcome.jsp So how do i access what URL was used to access Welcome.jsp from within Welcome.jsp ? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ant deploy task?
for the tasks defined in catalina-ant.jar. Does anyone know where they are? http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/sample/build.xml - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Hosting Services?
Servlets.com has user-submitted reviews on their ISP Reviews page: http://www.servlets.com/isps/servlet/ISPViewAll I use www.kgbinternet.com and it's worked great for me, cheap too! Matt -Original Message- From: Steven J. Owens [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 4:37 PM To: [EMAIL PROTECTED] Subject: Tomcat Hosting Services? Folks, I need to host a JSP/servlet application, with MySQL database. I know there are pages at java.sun.com and at servlets.com that list known JSP/Servlet hosting services. I've looked at them, but the lists don't really tell me about quality of service, reliability, etc. Does anybody have any recommendations, positive or negative? Steven J. Owens [EMAIL PROTECTED] I'm going to make broad, sweeping generalizations and strong, declarative statements, because otherwise I'll be here all night and this document will be four times longer and much less fun to read. Take it all with a grain of salt. - Me at http://darksleep.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Form based security
Here's how I solved your issue: http://tinyurl.com/5s4e HTH, Matt -Original Message- From: Sloan Seaman [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 8:32 AM To: Tomcat Users List Subject: Re: Form based security Ok, I figured most of the things out. My next question (along the same lines) is this: I have a link to the login.jsp which is now in a security-constraint area. When they use the login.jsp successfully it complains about: Invalid direct reference to form login page How do I use the login page and define a page for a successful login? Thanks! -- Sloan - Original Message - From: Sloan Seaman [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, February 13, 2003 10:01 AM Subject: Re: Form based security I have a filter set up so that if they don't go to the index.jsp or login.jsp it will redirect them to the login.jsp. (is that the best way?) So basically they either go to the index.jsp or login.jsp page. How do I list a page as secure? Do I have to wirte code for the j_security_check or is this something within tomcat? - Original Message - From: Barney Hamish [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Thursday, February 13, 2003 9:50 AM Subject: RE: Form based security Are you going directly to the login page? If so then you need to go to a page in that's listed as being secure. You will then be forwarded to the login page. When you've logged in successfully then you will be forwarded to the page you originally requested. Hamish -Original Message- From: Sloan Seaman [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 3:48 PM To: [EMAIL PROTECTED] Subject: Form based security I'm attempting to do form based security and I keep getting a 404 error when I click the submit button. I'm guessing I'm missing some type of configuration in the server.xml. The form I am using is: form method=POST action=j_security_check input type=text name=j_username/ input type=password name=j_password/ input type=submit value=Submit /form And I have the following in my web.xml login-config auth-methodFORM/auth-method form-login-config form-login-page/login.jsp/form-login-page form-error-page/login-error.jsp/form-error-page /form-login-config /login-config Can anyone help me out here? -- Sloan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: startup script
Here's how I've done it: http://tinyurl.com/5s4x HTH, Matt -Original Message- From: Jon Roberts [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 8:55 AM To: Tomcat Users Subject: startup script Does anybody have an /etc/init.d style startup script for tomcat? Ideally, I'd like it to export the _HOME variables and start under a non-root user. TIA. Jon Roberts - 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: Form based security
Struts can hook into container-managed security - it has support for roles in it's logic:present ... tag, in a roles attribute on it's action mappings, and also in Tiles for displaying different pages based on roles. It really does nothing special - just hooks into what's already there. If you're using form-based authentication - Struts will play nicely with it. HTH, Matt -Original Message- From: Sloan Seaman [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 8:52 AM To: Tomcat Users List Subject: Re: Form based security Ok, I've got it now... Thanks for the information. Now my manager is saying he wasnted it all done in Struts and that Struts has a security model that I should be using. Is he wrong? I though struts was just tag libs and an MVC for hitting business logic. Time for me to learn struts now I guess... -- Sloan - Original Message - From: Barney Hamish [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Thursday, February 13, 2003 10:33 AM Subject: RE: Form based security I think you've got the wrong idea about how the form-based security works. It is counter-intuitive I agree but anyway... Firstly the login form should not be in the secure area. Define as the default page something in the secure area. When the user tries to go to this default page tomcat will redirect them to the login page. After they've logged in successfully Tomcat wil redirect them to the page they originally asked for (i.e. the default page). You don't need a filter to do this. Tomcat does it automatically for you. Hamish -Original Message- From: Sloan Seaman [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 4:32 PM To: Tomcat Users List Subject: Re: Form based security Ok, I figured most of the things out. My next question (along the same lines) is this: I have a link to the login.jsp which is now in a security-constraint area. When they use the login.jsp successfully it complains about: Invalid direct reference to form login page How do I use the login page and define a page for a successful login? Thanks! -- Sloan - Original Message - From: Sloan Seaman [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, February 13, 2003 10:01 AM Subject: Re: Form based security I have a filter set up so that if they don't go to the index.jsp or login.jsp it will redirect them to the login.jsp. (is that the best way?) So basically they either go to the index.jsp or login.jsp page. How do I list a page as secure? Do I have to wirte code for the j_security_check or is this something within tomcat? - Original Message - From: Barney Hamish [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Thursday, February 13, 2003 9:50 AM Subject: RE: Form based security Are you going directly to the login page? If so then you need to go to a page in that's listed as being secure. You will then be forwarded to the login page. When you've logged in successfully then you will be forwarded to the page you originally requested. Hamish -Original Message- From: Sloan Seaman [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 3:48 PM To: [EMAIL PROTECTED] Subject: Form based security I'm attempting to do form based security and I keep getting a 404 error when I click the submit button. I'm guessing I'm missing some type of configuration in the server.xml. The form I am using is: form method=POST action=j_security_check input type=text name=j_username/ input type=password name=j_password/ input type=submit value=Submit /form And I have the following in my web.xml login-config auth-methodFORM/auth-method form-login-config form-login-page/login.jsp/form-login-page form-error-page/login-error.jsp/form-error-page /form-login-config /login-config Can anyone help me out here? -- Sloan - 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: Log4J and tomcat
I've never used a log4j.xml file, just a log4j.properties file. If your log4.xml file is in WEB-INF/classes and log4j.jar in WEB-INF/lib - I wouldn't know how to help you. I'd venture a guess that it has something to do with your logging configuration in your .xml file. HTH, Matt -Original Message- From: Sloan Seaman [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 11:03 AM To: Tomcat Users List Subject: Re: Log4J and tomcat I'll keep you posted if I ever figure something out. The problem prob. is that since the common-logging and log4j use a lot of static objects I'm getting what tomcat has already set up (this is a theory mind you) - Original Message - From: tomcat guy [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, February 13, 2003 12:57 PM Subject: Re: Log4J and tomcat Sloan, sorry can't help you out but if you find a solution I'd be interested in how you came up with the fix... Learnin about log4j it could help in the future - Original Message - From: Sloan Seaman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 12, 2003 3:23 PM Subject: Log4J and tomcat I'm deploying a war file using tomcat and I wish to use Apache's common logging api to log things (log4j behind the scenes). For some reason my configuration file seems to be getting ignored but my log.info msgs are showing up in the console window for Tomcat. Can someone tell me why this is happening? How do I get my app to use my log4j conf file? Thanks! -- Sloan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: MySql connection pool difficulties
parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter -Original Message- From: Tom O'Neil [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 2:25 PM To: [EMAIL PROTECTED] Subject: MySql connection pool difficulties After scouring the mailing list and a few forums, I'm still at a dead end attempting to get MySql connection pooling working with Tomcat. I'm running the following on Windows 2000: Tomcat 4.1.18 MySql 4.0.10 JDK 1.4.1 I've tried using both the MySql 3.0.5 and 2.0.14 drivers. I've placed these in [tomcat root]\common\lib (only one at a time - never both simultaenously). I know my code and web.xml are pretty solid, because I'm porting a funtional app from WebSphere 5.0. The relevant portion of server.xml is: Context path=/dsforecast docBase=c:\tomcat\webapps\dsforecast debug=5 reloadable=true crossContext=true Resource name=jdbc/raytheon auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/raytheon parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value5/value /parameter parameter namemaxIdle/name value2/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameusername/name valuemysql/value /parameter parameter namepassword/name valuemysql/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:mysql//localhost:3306/dsdemo?autoReconnect=true/value /parameter /ResourceParams /Context And the error I'm getting is: Cannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL 'jdbc:mysql//localhost:3306/dsdemo?autoReconnect=true' It seems that a fair amount of other folk have encountered this same problem, but I have to stumble across a solutions. Any help would be appreciated. Tom [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: BUG...? java.sql.SQLException: Cannot load JDBC driverclass 'nul l'
I filed a bug on this, but the error only occurs when I try to set my app as the root context (path=). http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16762 BTW, my app and db connection still works, just errors in the log. This bug includes a workaround - placing my app in the webapps/ROOT folder. HTH, Matt -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 06, 2003 9:54 AM To: 'Tomcat Users List' Subject: RE: BUG...? java.sql.SQLException: Cannot load JDBC driver class 'nul l' Can you post the Bugzilla URL for the bug? Null can be returned for all sorts of reasons, and in the last 6 or 8 months, the vast majority of messages I've seen on that error message on this list were pilot error, not bugs. I'm not questioning you, just curious to see what the dev team says. John -Original Message- From: Murray Furtado [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 06, 2003 11:50 AM To: '[EMAIL PROTECTED]' Subject: BUG...? java.sql.SQLException: Cannot load JDBC driver class 'nul l' From examining this list, it seems that a number of folk have tried setting up JNDI datasources as per the Tomcat HOWTOs, but have had this error returned. I've also noticed that it's been logged in Bugzilla as a bug. Does anyone know of a fix/workaround for the issue..? Can we expect it to be fixed in the next release of Tomcat? Regards, Murray - 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: BUG...? java.sql.SQLException: Cannot load JDBC driverclass 'nul l'
Yes. When it was in webapps/cct with a path of , it appeared that Tomcat was trying to load it twice. Once I configured 2 cct.xml files in webapps, one with path=/cct and one with path=, the problem went away. Matt -Original Message- From: Sean Dockery [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 06, 2003 1:28 PM To: Tomcat Users List Subject: RE: BUG...? java.sql.SQLException: Cannot load JDBC driver class 'nul l' Just out of curiosity, was your application previously deployed in the webapps folder when you were experiencing this error? At 10:12 2003-02-06 -0700, you wrote: I filed a bug on this, but the error only occurs when I try to set my app as the root context (path=). http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16762 BTW, my app and db connection still works, just errors in the log. This bug includes a workaround - placing my app in the webapps/ROOT folder. HTH, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Sean Dockery [EMAIL PROTECTED] Certified Java Web Component Developer Certified Delphi Programmer SBD Consultants http://www.sbdconsultants.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SendMailServlet - problem, debugging tips
Eclipse has a nice tomcat plugin that you can set breakpoints in servlets... works awesome for me. -Original Message- From: chris schild [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 06, 2003 5:38 PM To: tomcat Subject: SendMailServlet - problem, debugging tips Would anyone be able to provide some debugging tips for Tomcat servlets? Also, what would cause a servlet to be unavailable? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: form based authentication problem
If you map the filter to the same url-pattern as your protected resource, it will be called immediately after someone authenticates. HTH, Matt -Original Message- From: Ralf Lorenz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 6:59 AM To: Tomcat Users List Subject: Re: form based authentication problem thanks, that's exactly the solution i discussed right now with some other developers of my company. the question with the filter is whether it is called when the container forwards or redirects to the claimed resource after the authentication is done? theoretically i'd say yes but who knows? try and error i guess! ralf - Original Message - From: Barney Hamish [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, February 04, 2003 1:35 PM Subject: RE: form based authentication problem I did something like that using struts. I wrote a base action class which all my other action classes extended. The base class performs any initialization (initializing objects in the session etc) as required. If you don't want to use struts you might consider using a filter. Hamish -Original Message- From: Ralf Lorenz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 1:13 PM To: [EMAIL PROTECTED] Subject: form based authentication problem guess that was to much of description last time! next try can anybody tell me how to do some action, say put an object in the session or/and update a list in the servlet context directly after a user was logged in successfully via form-based authentication (context) with a jdbc-realm? ralf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [BUG?] Can't set my app as root app without errors
Moving my app to ROOT and changing my context's path to point to ROOT vs. appname fixed the problem. I believe this is a bug, so I'll enter it in bugzilla. Thanks, matt -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 5:19 PM To: Tomcat Users List Cc: Raible, Matt Subject: RE: [BUG?] Can't set my app as root app without errors looks like this conflicts with the ROOT context. hence it will get loaded twice. There are a couple of ways around it. I believe the path ROOT is hardcoded in the Tomcat code base. 1. Put your app in the ROOT directory under webapps/ROOT 2. hmm, just ran out of ideas :) Filip -Original Message- From: Raible, Matt [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 4:02 PM To: 'Tomcat Users List' Subject: RE: [BUG?] Can't set my app as root app without errors There's nothing really in my server.xml, but here it is: Server port=11005 shutdown=SHUTDOWN debug=0 !-- Define the Tomcat Stand-Alone Service -- Service name=Tomcat-Standalone !-- Define an AJP 1.3 Connector on port 8009 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=11009 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ !-- Define the top level container in our container hierarchy -- Engine name=Standalone defaultHost=localhost debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ !-- Because this Realm is here, an instance will be shared globally -- Realm className=org.apache.catalina.realm.MemoryRealm / !-- Define the default virtual host -- Host name=localhost debug=99 appBase=webapps unpackWARs=false autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=common/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ /Host /Engine /Service /Server If I use Context path=/cct... in the file below - everything works fine - it's only when I try to set my app as the root (default) context. Context path=/cct docBase=cct debug=99 Logger className=org.apache.catalina.logger.FileLogger prefix=cct_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=oracle.jdbc.driver.OracleDriver digest=SHA connectionURL=jdbc:oracle:thin:[EMAIL PROTECTED]: 1521:cctprd userTable=user_sys_access userNameCol=userid userCredCol=password userRoleTable=user_role roleNameCol=role_name/ Resource name=jdbc/cctdb auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/cctdb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Set to 0 for no limit. -- parameter namemaxActive/name value0/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. -- parameter namemaxIdle/name value0/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- Database username and password for connections -- parameter nameusername/name valuecct_tool/value /parameter parameter namepassword/name valuepassword/value /parameter !-- Class name for Oracle JDBC driver -- parameter namedriverClassName/name valueoracle.jdbc.pool.OracleConnectionPoolDataSource/value /parameter !-- The JDBC connection url for connecting to your db. -- parameter nameurl/name valuejdbc:oracle:thin:@10.31.41.14:1521:cctprd/value /parameter parameter namevalidationQuery/name valueSELECT 1 FROM DUAL/value /parameter /ResourceParams /Context -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 4:53 PM To: Tomcat Users List Subject: RE: [BUG?] Can't set my app as root app without errors are you sure
RE: debugging help
Here's an Ant task that can be very helpful in these situations: target name=start.tomcat java classname=org.apache.catalina.startup.Bootstrap fork=yes jvmarg value=-Dcatalina.home=${tomcat.home}/ arg value=start/ classpath fileset dir=${tomcat.home} include name=bin/bootstrap.jar/ include name=server/catalina.jar/ /fileset /classpath /java /target If you're not using Ant, you can use the following command line argument from your $CATALINA_HOME directory: java -cp bin/bootstrap.jar;server/catalina.jar org.apache.catalina.startup.Bootstrap start HTH, Matt -Original Message- From: Geoff Peters [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 6:52 AM To: [EMAIL PROTECTED] Subject: debugging help I am trying to configure a new realm for MySQL, and I am finding debuggin problems at this point is next to impossible and very frustrating. When I try to start Tomcat, the console window pops up for a second, an exception message is thrown and the window closes before I can read it. The log files do not show any of this output, so I am stuck with changing things one at a time to see if I can get Tomcat to fire up and generate logs! Any advice on how to get output to a log file when I can't start Tomcat??? Thanks, Geoff - 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: debugging help
Good tip Robert (much easier). Thanks! -Original Message- From: Robert Priest [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 7:10 AM To: 'Tomcat Users List' Subject: RE: debugging help the following is the help from 4.1.6, but I believe it still stands, correct? You could use catalina run as the command to start tomcat in the current window. Usage: catalina ( commands ... ) commands: debug Start Catalina in a debugger debug -security Debug Catalina with a security manager embedded Start Catalina in embedded mode jpda startStart Catalina under JPDA debugger run Start Catalina in the current window run -security Start in the current window with security manager start Start Catalina in a separate window start -security Start in a separate window with security manager stop Stop Catalina -Original Message- From: Raible, Matt [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 8:58 AM To: 'Tomcat Users List' Subject: RE: debugging help Here's an Ant task that can be very helpful in these situations: target name=start.tomcat java classname=org.apache.catalina.startup.Bootstrap fork=yes jvmarg value=-Dcatalina.home=${tomcat.home}/ arg value=start/ classpath fileset dir=${tomcat.home} include name=bin/bootstrap.jar/ include name=server/catalina.jar/ /fileset /classpath /java /target If you're not using Ant, you can use the following command line argument from your $CATALINA_HOME directory: java -cp bin/bootstrap.jar;server/catalina.jar org.apache.catalina.startup.Bootstrap start HTH, Matt -Original Message- From: Geoff Peters [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 6:52 AM To: [EMAIL PROTECTED] Subject: debugging help I am trying to configure a new realm for MySQL, and I am finding debuggin problems at this point is next to impossible and very frustrating. When I try to start Tomcat, the console window pops up for a second, an exception message is thrown and the window closes before I can read it. The log files do not show any of this output, so I am stuck with changing things one at a time to see if I can get Tomcat to fire up and generate logs! Any advice on how to get output to a log file when I can't start Tomcat??? Thanks, Geoff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Backward migration from Tomcat 4.1.18 to Tomcat 3.2.4
JSTL only works with JSP 1.2 - Tomcat 3.x only supports JSP 1.1. HTH, Matt -Original Message- From: Chad Pettit [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 9:00 AM To: [EMAIL PROTECTED] Subject: Backward migration from Tomcat 4.1.18 to Tomcat 3.2.4 I developed an application using Tomcat 4.1.18. It is nothing very difficult, it basically utilizes a single JSP script and one JAVA bean. However, in the script, I take full advantage of the core jstl (c:out, c:if, c:foreach, etc.). I am now trying to port my code to a machine running Tomcat 3.2.4 and cannot get the core jstl libraries to work correctly. I would love to simply upgrade Tomcat on this machine, but that is out of my control. I have tried copying the .jar files, for what I believe are the jstl libraries, to the lib directory directly off of the Tomcat base directory, but that does not appear to be working. Any help in this downgrade would be greatly appreciated. -- Chad E. Pettit Software Engineer XonTech, Inc. 2940 Presidential Dr. Suite 100 Dayton OH 45324 (937) 320-9140 Phone (937) 320-9143 Fax - 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: MySQL/Tomcat startup problem
Try using an amp; in place of the ; in your connectionURL: connectionURL=jdbc:mysql://javadev.logic.bm/steve?user=useramp;password=pa ssword -Original Message- From: Geoff Peters [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 11:08 AM To: [EMAIL PROTECTED] Subject: MySQL/Tomcat startup problem Hello again - I have spent most of the day on this and don't seem to be getting anywhere, searched the archives here and the java.sun.com forums to no avail. Running Tomcat 4.1.18 on my dev box Win2K Server, running MySQL 3.23.49 on the same network on a Redhat 7.3 install. I am simply trying to make a database connection, have 2 tables created with usernames and roles, usernames and passwords, and set the mysqladmin password to connect through the string. The systems guy sees my packets hitting the box, so it doesn't seem to be a network / firewall problem. Here is the realm tag (commented out the memory realm): Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://javadev.logic.bm/steve?user=user;p assword=password userTable=tblUsers userNameCol=user_name userCredCol=user_pass userRoleTable=tblUser_Role roleNameCol=role_name / Here is the output (no matter what I change the username / password to): Catalina.start: LifecycleException: Exception opening database connection: jav a.sql.SQLException: Communication link failure: java.io.IOException LifecycleException: Exception opening database connection: java.sql.SQLExcepti on: Communication link failure: java.io.IOException at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:681) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1173) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) - Root Cause - java.sql.SQLException: Communication link failure: java.io.IOException at com.mysql.jdbc.MysqlIO.init(Unknown Source) at com.mysql.jdbc.Connection.connectionInit(Unknown Source) at com.mysql.jdbc.jdbc2.Connection.connectionInit(Unknown Source) at com.mysql.jdbc.Driver.connect(Unknown Source) at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:616) at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:679) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1173) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Stopping service Tomcat-Standalone Catalina.stop: LifecycleException: Coyote connector has not been started LifecycleException: Coyote connector has not been started at org.apache.coyote.tomcat4.CoyoteConnector.stop(CoyoteConnector.java:1 075) at org.apache.catalina.core.StandardService.stop(StandardService.java:54 6) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:2224 ) at org.apache.catalina.startup.Catalina.start(Catalina.java:543) 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(Unknown Source) at
[BUG?] Can't set my app as root app without errors
I can't seem to set my application (cct) as the root application for Tomcat. If I use Context path= ..., my app appears to load fine, but then Tomcat seems to attempt to load it a second time, and I get the following error: WARN [main] JDBCExceptionReporter.logExceptions(35) | SQL Error: 0, SQLState: null ERROR [main] JDBCExceptionReporter.logExceptions(42) | Cannot load JDBC driver class 'null' WARN [main] SessionFactoryImpl.init(163) | Could not obtain connection metadata java.sql.SQLException: Cannot load JDBC driver class 'null' From this, I assumed that Tomcat was trying to load my app both at the root context path () and a context path that's the same as the directory (/cct). So I created a second xml file in webapps, and named it cct2.xml and changed the path to /cct. I don't get the error above, but the app does indeed load twice. I was hoping I could turn off this load-the-second-one behavior by changing unpackWARs and/or autoDeploy to false on my Host element, but no such luck. Is there a way to fix this? I can successfully use the app at http://localhost/, but I'd rather not see these errors, and I'd rather not see it load twice. I'm using Tomcat 4.1.18, JDK 1.4.1_01 on Win2K and RedHat 8.0. I can enter a bug in bugzilla if this is indeed a bug. Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [BUG?] Can't set my app as root app without errors
There's nothing really in my server.xml, but here it is: Server port=11005 shutdown=SHUTDOWN debug=0 !-- Define the Tomcat Stand-Alone Service -- Service name=Tomcat-Standalone !-- Define an AJP 1.3 Connector on port 8009 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=11009 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ !-- Define the top level container in our container hierarchy -- Engine name=Standalone defaultHost=localhost debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ !-- Because this Realm is here, an instance will be shared globally -- Realm className=org.apache.catalina.realm.MemoryRealm / !-- Define the default virtual host -- Host name=localhost debug=99 appBase=webapps unpackWARs=false autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=common/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ /Host /Engine /Service /Server If I use Context path=/cct... in the file below - everything works fine - it's only when I try to set my app as the root (default) context. Context path=/cct docBase=cct debug=99 Logger className=org.apache.catalina.logger.FileLogger prefix=cct_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=oracle.jdbc.driver.OracleDriver digest=SHA connectionURL=jdbc:oracle:thin:[EMAIL PROTECTED]:1521:cctprd userTable=user_sys_access userNameCol=userid userCredCol=password userRoleTable=user_role roleNameCol=role_name/ Resource name=jdbc/cctdb auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/cctdb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Set to 0 for no limit. -- parameter namemaxActive/name value0/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. -- parameter namemaxIdle/name value0/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- Database username and password for connections -- parameter nameusername/name valuecct_tool/value /parameter parameter namepassword/name valuepassword/value /parameter !-- Class name for Oracle JDBC driver -- parameter namedriverClassName/name valueoracle.jdbc.pool.OracleConnectionPoolDataSource/value /parameter !-- The JDBC connection url for connecting to your db. -- parameter nameurl/name valuejdbc:oracle:thin:@10.31.41.14:1521:cctprd/value /parameter parameter namevalidationQuery/name valueSELECT 1 FROM DUAL/value /parameter /ResourceParams /Context -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 4:53 PM To: Tomcat Users List Subject: RE: [BUG?] Can't set my app as root app without errors are you sure this has to do with your ROOT context? This looks like an error with your JDBC driver. It tries to load a class that isn't defined. why don't you post your server.xml Filip -Original Message- From: Raible, Matt [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 3:43 PM To: [EMAIL PROTECTED] Subject: [BUG?] Can't set my app as root app without errors I can't seem to set my application (cct) as the root application for Tomcat. If I use Context path= ..., my app appears to load fine, but then Tomcat seems to attempt to load it a second time, and I get the following error: WARN [main] JDBCExceptionReporter.logExceptions(35) | SQL Error: 0, SQLState: null ERROR [main] JDBCExceptionReporter.logExceptions(42) | Cannot load JDBC driver class 'null' WARN [main] SessionFactoryImpl.init(163) | Could not obtain connection metadata java.sql.SQLException: Cannot load JDBC driver class 'null' From this, I assumed that Tomcat was trying to load my app both at the root
RE: j_security_check problem
The problem is that your initial request is to the same page as your form-login-page. The initial request should be do a protected resource, then the user will be prompted for the login page, and then upon successful authentication - they will be routed to the initial request. I usually have an index.jsp that routes the user to a secured resource, and then I use the following in web.xml to ensure that they don't get the error below: error-page error-code400/error-code location/index.jsp/location /error-page The problem is that typically folks will see login.jsp as the first page in the app, and will bookmark it. I wish tomcat didn't display login.jsp, but rather the initial requested URL - then users wouldn't get the wrong bookmark. To get around this, I see two options: 1. Use index.jsp as a true welcome page, with a link to the secured resource. 2. Put a message on the login screen that says do not bookmark this page. I've opted for Number 2, and since all my users are IE, I have a link that adds a bookmark for them using Javascript. HTH, Matt -Original Message- From: Your Name [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 7:32 AM To: [EMAIL PROTECTED] Subject: j_security_check problem We are running Tomcat 4.1... and are trying to get xreporter to run. We have installed everything and when we go to test the login it gives us this error (which is a http 400 error).. type: Status report message: Invalid direct reference to form login page description: The request sent by the client was syntactically incorrect (Invalid direct reference to form login page). I have looked around and people are suggesting that it is a tomcat config problem. The form submits to j_security_check. Has anyone ran into this problem and does anyone know how to fix the problem. Any help would be great. Thanks Ahead of time, Fred - 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 the JNDI Connection Pool re-connect after failure?
I've discovered that this problem is related to a 90-minute timeout on our firewall. Tomcat sits outside of the firewall, and Oracle resides inside. Since there's no activity for 90 minutes, it closes the connection. Anyone know of a workaround (+ sample code) for this? I'm assuming a ping of some sort using the database connection pool would work. Thanks, Matt -Original Message- From: Ryan Cornia [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 29, 2003 10:03 AM To: [EMAIL PROTECTED] Subject: RE: Can the JNDI Connection Pool re-connect after failure? I don't have any timeout settings set. I'm also not using the driver from Oracle. I'm using a third party driver from inetsoftware.de. If it's not working in 24 hours, I'll let your know. Ryan [EMAIL PROTECTED] 01/29/03 09:43AM Will it work for 24 hours is the question... ;) If it does, maybe I should change to a different Oracle JDBC Driver. Do you have any timeout limitations set on the connecting user? We do, and I'm wondering if that's causing my problems. Thanks, Matt - 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 the JNDI Connection Pool re-connect after failure?
I've tried adding the following and I still have the same problem as Ryan. parameter namevalidationQuery/name valueSELECT 1 FROM DUAL/value /parameter When I check my 4.1.18 Tomcat server every morning I get: WARN [Ajp13Processor[11009][7]] JDBCExceptionReporter.logExceptions(35) | SQL Error: 0, SQLState: null ERROR [Ajp13Processor[11009][7]] JDBCExceptionReporter.logExceptions(42) | Cannot load JDBC driver class 'null' WARN [Ajp13Processor[11009][7]] SessionFactoryImpl.init(163) | Could not obtain connection metadata java.sql.SQLException: Cannot load JDBC driver class 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav a:529) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3 12) at cirrus.hibernate.connection.DatasourceConnectionProvider.getConnection(Datas ourceConnectionProvider.java:56) Could this be from closing connections in a finally block? This should just return them to the pool right? Thanks, Matt -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 29, 2003 2:09 AM To: Tomcat Users List Subject: Re: Can the JNDI Connection Pool re-connect after failure? Boris Folgmann wrote: Ryan Cornia wrote: Anyone using JNDI datasources that reconnect in case of a lost link to the DB server? Any examples? I'm using the I-net driver for Oracle Interesting question. In fact I have the same problem, using DBCP and PostgreSQL. I looked trough the Javadocs at http://jakarta.apache.org/commons/dbcp/api/index.html but did not find a resource argument for configuring something like a reconnect. Any comments welcome. I believe that if you set up connection verification query in your DataSource definition in server.xml it will reconnect. Haven't tried it, though. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can the JNDI Connection Pool re-connect after failure?
Will it work for 24 hours is the question... ;) If it does, maybe I should change to a different Oracle JDBC Driver. Do you have any timeout limitations set on the connecting user? We do, and I'm wondering if that's causing my problems. Thanks, Matt -Original Message- From: Ryan Cornia [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 29, 2003 7:49 AM To: [EMAIL PROTECTED] Subject: RE: Can the JNDI Connection Pool re-connect after failure? This solution seems to work great for me. After adding this and re-booting the database server, it re-connected and worked great automatically Thanks a ton Nix. Ryan [EMAIL PROTECTED] 01/29/03 07:11AM I've tried adding the following and I still have the same problem as Ryan. parameter namevalidationQuery/name valueSELECT 1 FROM DUAL/value /parameter - 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 to JKMount everything
We also use this setup so that we can run multiple instances of Tomcat behind one Apache server - we just setup different virtual hosts in Apache. I agree that Apache isn't doing much in this case, but it is helping us... Matt -Original Message- From: Pascal Forget [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 8:54 AM To: Tomcat Users List Subject: Re: Apache to JKMount everything Lajos wrote: You can do: JkMount /* ajp13 JkMount /*.jsp ajp13 where ajp13 refers to the worker name in workers.properties. But if you are doing that, why use Apache? Because Apache may startup as root (because of port 80 or 443) while tomcat runs as nobody Pascal -- 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]
Cannot load JDBC driver class 'null'
I keep getting the following error in my catalina.out file. This same application starts up just fine when it has a context path of /cct, but I get the errors when I use path=. Any ideas? WARN [main] JDBCExceptionReporter.logExceptions(35) | SQL Error: 0, SQLState: null ERROR [main] JDBCExceptionReporter.logExceptions(42) | Cannot load JDBC driver class 'null' WARN [main] SessionFactoryImpl.init(163) | Could not obtain connection metadata java.sql.SQLException: Cannot load JDBC driver class 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav a:529) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3 12) at cirrus.hibernate.connection.DatasourceConnectionProvider.getConnection(Datas ourceConnectionProvider.java:56) at cirrus.hibernate.impl.SessionFactoryImpl.init(SessionFactoryImpl.java:152) at cirrus.hibernate.impl.DatastoreImpl.buildSessionFactory(DatastoreImpl.java:4 03) at cirrus.hibernate.impl.DatastoreImpl.buildSessionFactory(DatastoreImpl.java:3 92) at cirrus.hibernate.cfg.Configuration.configure(Configuration.java:163) at cirrus.hibernate.Hibernate.configure(Hibernate.java:193) at com.comcast.cable.dmc.itd.cct.webapp.StartupServlet.init(StartupServlet.java :58) Also, my oracle connection pool times out after 24 hours - I haven't found a solution after a week or two pinging this list and the struts-user list. Any ideas are greatly appreciated. Setup: 1. classes12.jar in $CATALINA_HOME/common/lib 2. Context file cct.xml in $CATALINA_HOME/webapps - contents are below. 3. web.xml contains JNDI Datasource information. The app works, I just get errors on startup, and timeout after 24 hours. Thanks, Matt web.xml: resource-ref descriptionDB Connection/description res-ref-namejdbc/cctdb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref cct.xml Context path= docBase=cct debug=99 reloadable=false privileged=true Logger className=org.apache.catalina.logger.FileLogger prefix=cct_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=oracle.jdbc.driver.OracleDriver digest=SHA connectionURL=jdbc:oracle:thin:[EMAIL PROTECTED]:1521:cctprd userTable=user_sys_access userNameCol=userid userCredCol=password userRoleTable=user_role roleNameCol=role_name/ Resource name=jdbc/cctdb auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/cctdb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Set to 0 for no limit. -- parameter namemaxActive/name value0/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. -- parameter namemaxIdle/name value0/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- Database username and password for connections -- parameter nameusername/name valuecct_tool/value /parameter parameter namepassword/name valuetiger/value /parameter !-- Class name for Oracle JDBC driver -- parameter namedriverClassName/name valueoracle.jdbc.pool.OracleConnectionPoolDataSource/value /parameter !-- The JDBC connection url for connecting to your db. -- parameter nameurl/name valuejdbc:oracle:thin:@10.31.41.14:1521:cctprd/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter parameter namevalidationQuery/name valueSELECT 1 FROM DUAL/value /parameter /ResourceParams -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: default servet for a website
I don't believe this is possible in 4.x as the 2.3 Servlet Spec does not allow specifing a welcome-file as a servlet. With 2.4 and Tomcat 5.x, you should be able to do this. HTH, Matt -Original Message- From: Liq Wnq [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 21, 2003 11:40 AM To: [EMAIL PROTECTED] Subject: default servet for a website Dear List, How to set up Tomcat 4.x so that one Servlet can serve as the default page (without forwording nor redirecting) of a website? For example, when a user clicks on: http://www.MyWebSite.com/ Then the following servlet: http://www.MyWebSite.com/MainServlet will serve as the home page. TIA wnqq __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- 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: code snipit request: how to get time zone from user'sbrowser .
Since it's only a client-side variable - the only way I know of is to use Javascript and write a hidden field. http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=get+timezone+javascri pt -Original Message- From: Jason Pyeron [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 21, 2003 3:19 PM To: Tomcat Users List Subject: code snipit request: how to get time zone from user's browser. Does anyone know how to get the client's time zone? I did not see anything in the HttpServletRequest, nor do i really have clue what to search for on google. TIA -jason pyeron -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron http://www.pyerotechnics.com - - Owner Lead Pyerotechnics Development, Inc. - - +1 410 808 6646 (c) 500 West University Parkway #1S - - +1 410 467 2266 (f) Baltimore, Maryland 21210-3253 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, purge the message from your system and notify the sender immediately. Any other use of the email by you is prohibited. -- 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]
ConnectionPool with Oracle - connection timeout
I am using Tomcat's JDBCRealm as well as a DBCP Connection pool. I am connecting to Oracle 9, and everything works fine - for about 24 hours. I've experienced this with MySQL and adding autoReconnect=true to the connectionURL fixed the problem. However, adding this to Oracle's connectionURL causes a Cannot load JDBC driver class 'null'. My connectionURL is: jdbc:oracle:thin:username/password@host:1521:sid Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: ConnectionPool with Oracle - connection timeout
This works though! ;-) I got this syntax off this list for configuring an Oracle JDBCRealm. -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED]] Sent: Friday, January 17, 2003 9:42 AM To: Tomcat Users List Subject: RE: ConnectionPool with Oracle - connection timeout jdbc:oracle:thin:username/password@host:1521:sid is an invalid URL. password doesn't belong in the url at least I don't think so :) Filip ~ Namaste - I bow to the divine in you ~ Filip Hanik Software Architect www.filip.net -Original Message- From: Raible, Matt [mailto:[EMAIL PROTECTED]] Sent: Friday, January 17, 2003 8:31 AM To: 'Tomcat Users List' Subject: ConnectionPool with Oracle - connection timeout I am using Tomcat's JDBCRealm as well as a DBCP Connection pool. I am connecting to Oracle 9, and everything works fine - for about 24 hours. I've experienced this with MySQL and adding autoReconnect=true to the connectionURL fixed the problem. However, adding this to Oracle's connectionURL causes a Cannot load JDBC driver class 'null'. My connectionURL is: jdbc:oracle:thin:username/password@host:1521:sid Thanks, Matt -- 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]
RE: Classes not being found in app's WEB-INF directory.
Use Ant to build everything - and tell it where you want your compiled classes to end up. -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Friday, January 17, 2003 10:07 AM To: Tomcat Users List Subject: Re: Classes not being found in app's WEB-INF directory. Lior Shliechkorn wrote: I had a bunch of problems with that until I packaged the classes and then it had no problem finding the class files. Give that a try. I too made the mistake of putting all of my classes directly under WEB-INF/classes. Now I would like to put them into a proper package, but cannot -- CVS knows the directory structure that I have now, and if I move the classes into a new directory structure (the package directory structure com/ptc/appname) then CVS will get all gorked up. Does anyone have advice for this scenario? Surely I must not be the first person who needed to rearrange directories for a webapp using CVS... Erik -- 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: Can you set a webapp as Tomcat's default page?
I don't believe Tomcat 4.1.x supports servlets as the welcome page - you could, however, put an index.jsp into your webapp that does a response.redirect to your servlet. The Servlet 2.4 spec supports servlets as welcome files. Can you hit your servlet if you type it in the URL? Matt -Original Message- From: Bill [mailto:[EMAIL PROTECTED]] Sent: Friday, January 17, 2003 8:22 AM To: tomcat user Subject: Can you set a webapp as Tomcat's default page? I want to set up my server so that all requests take you to the login page of my webapp. I'm pretty sure this can be done fairly easily however I havent yet figured it out. Is there an online resource for this or has somebody here done it? Basically what I've tried thus far is: 1) set the root context in tomcat to my app's docBase. 2) added 'JkMount / ajp13' to webserver config 3) set the default servlet to point to the base servlet of my webapp This of course doesnt work. -b -- 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 opens new DB Connections on Restart
I am using DBCP and a JDBCRealm with Tomcat 4.1.18. Everytime I re-deploy my application (using Ant), Tomcat restarts because it detects that classes have been refreshed. However, it also created two additional database connections - so after re-deploying for a long time (an hour) - I get up to 50 connections! I have added the following settings to my server.xml, but it doesn't seem to help. parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter Any ideas? Environment: JDK 1.4.1_01, Windows 2000 Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]