RE: How can I create a digest password
The problem you are hiting is due to the location of the jar file in the default tomcat install. You can move the jar file into the lib\common area. Frankly, I think it's much cleaner to just copy the code to create pw's into one of your own classes. It's only a few lines of code. Just find the realmbase class in the Tomcat source and clone the method. Jerry -Original Message- From: Lorenzo Jiménez [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 13, 2005 11:57 AM To: Tomcat Users List Subject: How can I create a digest password Importance: High Hi, I need help to generate encrypted passwords. Using the Tomcat 5's documentation: C:\java org.apache.catalina.realm.RealmBase -a MD5 mypassd And this is the error message: Exception in thread main java.lang.NoClassDefFoundError: org/apache/catalina/realm/RealmBase I also checked the classpath, and Catalina.jar is in it. I even tried being positioned on catalina's directory. Using Win XP, Tomcat 5.0.28, and j2sdk1.4.2_07. Thank you very much! Lorenzo - Si usted no es el destinatario indicado en este mensaje o responsable como persona de la entrega del mensaje, no debe copiar o reenviar este mensaje, por favor notifique al correo [EMAIL PROTECTED] Para más referencia sobre términos importantes relacionados a este correo visite http://www.nacion.com/disclaimer/index_es2.htm If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or send this message to anyone, please notify to [EMAIL PROTECTED] Click here for important additional terms relating to this e-mail. http://www.nacion.com/disclaimer/index_en2.htm - - 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]
Monitoring Realm Logins
I'm looking for a way to monitor logins to a realm. I want the capability to force users to change passwords in some situations. Is there a relatively standard way to do this (registering a listener, etc.)? Or do I have to go in and do surgery on the Realm authentication class? I'd like a way to be called to check the user status in my db, and just pass through if everything is ok, or route to my pw chg page if necessary. Or is this something as simple as looking for something in the request object that tells me this is the first page since the user logged on? Thanks. Jerry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Setting up to use j_security_check??
I'm attempting to move from basic authentication to form-based. Got everything configured and the forms created, etc. The login form comes up as expected. But when I submit, it says it can't find url j_security_check. Am I supposed to do something to configure/enable that url in tomcat? I've seen docs that say to use action=j_security_check and some that say to include a slash: action=/j_security_check. But neither works for me. What am I missing? Thx Jerry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Setting up to use j_security_check??
Hmmm, I have the first two, but not the security-role. Not sure why that wasn't in this particular webapp. It's been working w/ basic auth, though. Is that the magic key that's missing in form auth? Is that a tag that's only required with form auth and not required for basic auth? I'll add it and try again. Thanks. Jerry -Original Message- From: David Owens [mailto:[EMAIL PROTECTED] Sent: Monday, April 04, 2005 4:06 PM To: Tomcat Users List Subject: RE: Setting up to use j_security_check?? Have you defined the following in your web.xml? security-constraint login-config security-role |)ave -Original Message- From: J Malcolm [mailto:[EMAIL PROTECTED] Sent: Monday, April 04, 2005 3:03 PM To: 'Tomcat Users List' Subject: Setting up to use j_security_check?? I'm attempting to move from basic authentication to form-based. Got everything configured and the forms created, etc. The login form comes up as expected. But when I submit, it says it can't find url j_security_check. Am I supposed to do something to configure/enable that url in tomcat? I've seen docs that say to use action=j_security_check and some that say to include a slash: action=/j_security_check. But neither works for me. What am I missing? Thx Jerry - 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]
Accessing the context path within a Servlet/JSP
I have looked at the JavaDocs, but I can't find a method that will give me the context path for a web app: (i.e. Context path=/abcxyz docBase=...) All I want is the /abcxyz string precisely as defined in the context tag. I have tried getPath() from the servletContext, but it returns part of the host name as well. That doesn't make sense either, but that's the way it's working for me... It returns jndi: for the protocol (???) Am I doing something else wrong here? I found the getServletContextName() method. But that is an optional parameter on the context tag, and I can't risk using something that might not be defined. I'm currently parsing up the URL object returned from servletContext.getResource(/); But this is a hack. Surely there is a better way to get the root URL context for a web app... (?) Suggestions?? (BTW... Tomcat 5.5.7) Thanks. Jerry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using RealmBase.Digest(...)
I'm writing an app to create user id/pw's in a db for use by realms. I've read the realm HOW-TO page. But I have two implementation questions: 1) the page says: To use either of the above techniques, the $CATALINA_HOME/server/lib/catalina.jar file will need to be on your class path to make the RealmBase class available. I'm doing this in a servlet. The way I typically make jar files avail to servlets is to put them in the WEB-INF/lib dir or in the Tomcat common lib. I don't think I should be making a copy of this jar or moving it around. How do I force a jar into a webapp's classpath? Is there a tag I can put in web.xml to set classpath or add jars? 2) There are three parameters on the Digest() method. The third parm is 'encoding'. What encoding should I be using? I assume it needs to match whatever encoding the realm code is going to use when it compares the digested password. What string do I use for this parm? Thanks. Jerry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Scoping of JNDI Resources?
Hassan, Thank you so much. I figured there had to be some sort of answer for that. This makes sense. I really appreciate the help. Jerry -Original Message- From: Hassan Schroeder [mailto:[EMAIL PROTECTED] Sent: Monday, March 14, 2005 9:00 AM To: Tomcat Users List Subject: Re: Scoping of JNDI Resources? J Malcolm wrote: I've actually got my realms defined per host. That's not the problem. The problem is that the datasources for the various realms must be declared globally (apparently). I'm assuming that any datasource that is defined globally is accessible to any Tomcat app that knows the datasource name, right? This means that the realm authentication db for one host is accessible to any other host that might be able to determine the datasource name. Ah, OK, this isn't a problem I've had to deal with, but: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/globalresources.html :: I would read this: The GlobalNamingResources element defines the global JNDI resources for the Server. These resources are listed in the server's global JNDI resource context. This context is distinct from the per-web-application JNDI contexts described in the JNDI Resources HOW-TO. The resources defined in this element are not visible in the per-web-application contexts unless you explicitly link them with ResourceLink elements. :: as refuting the above concern... But I don't have time to test that theory right now :-) HTH! -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - 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]
Scoping of JNDI Resources?
I know you can define DataSources, etc. globally to all of Tomcat using GlobalNamingResources. I have also determined that you can define individual DataSources inside a webApp's Context/Context block inside a Host block. But are these the only two options? I would like to define DataSources that are scoped to a Host, but not global to all of Tomcat. I tried a few things, but couldn't seem to get it to work any other way. Is there a way to define a DataSource (or any other JNDI resource) at the host level? More generally, examples of server.conf are great. But is there a document that describes all the options and variations of what you do in server.xml? Thanks. Jerry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Scoping of JNDI Resources?
Hassan, Thanks so much for the info. I am on 5.5.7. I was not aware of the Default-Context option. That will be useful. But it does not appear that the Default-Context applies to DataSourceRealms for a host. Is there a way to define a datasource for use by a realm in a particular host (without making the datasource available to other hosts?) Thanks again. Jerry -Original Message- From: Hassan Schroeder [mailto:[EMAIL PROTECTED] Sent: Sunday, March 13, 2005 12:38 PM To: Tomcat Users List Subject: Re: Scoping of JNDI Resources? J Malcolm wrote: I know you can define DataSources, etc. globally to all of Tomcat using GlobalNamingResources. I have also determined that you can define individual DataSources inside a webApp's Context/Context block inside a Host block. But are these the only two options? I would like to define DataSources that are scoped to a Host, but not global to all of Tomcat. I tried a few things, but couldn't seem to get it to work any other way. Is there a way to define a DataSource (or any other JNDI resource) at the host level? You didn't mention what version you're running, but take a look at this page for the DefaultContext : http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/defaultcontext.html More generally, examples of server.conf are great. But is there a document that describes all the options and variations of what you do in server.xml? It's not a single document, but the Server Configuration Reference (again, this is for the 5.0 branch, adjust as required) covers it all, element by element: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/index.html HTH! -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - 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: Scoping of JNDI Resources?
I've actually got my realms defined per host. That's not the problem. The problem is that the datasources for the various realms must be declared globally (apparently). Until yesterday, I was running JDBCRealms where I could define a different database for each realm inside the host. But I had to move off of JDBCRealms due to a catastrophic bug discussed in an earlier thread. I'm assuming that any datasource that is defined globally is accessible to any Tomcat app that knows the datasource name, right? This means that the realm authentication db for one host is accessible to any other host that might be able to determine the datasource name. Many of my hosts are from different businesses that must ensure integrity of their security environment. With a global datasource defined for their realm authority db, I can't guarantee that another malicious host cannot access and possible corrupt the db. It doesn't seem right that there would be this sort of hole in DataSourceRealms. But right now, the only way I can find to define a datasource for any realm, even those defined inside a host, is to use global datasource definitions. Is this really the only way? Thanks. Jerry -Original Message- From: Hassan Schroeder [mailto:[EMAIL PROTECTED] Sent: Sunday, March 13, 2005 7:08 PM To: Tomcat Users List Subject: Re: Scoping of JNDI Resources? J Malcolm wrote: But it does not appear that the Default-Context applies to DataSourceRealms for a host. Is there a way to define a datasource for use by a realm in a particular host (without making the datasource available to other hosts?) Ah, Realms, well then: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/realm.html :: says: You may nest a Realm inside any Catalina container Engine, Host, or Context). Not tested -- I'm also running 5.5.7, but my DataSourceRealm is applied globally -- but that sounds like it fits the bill... -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - 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: Exception on JDBCRealm Authorization
Alex, Thanks so much for doing the research on this. I do have a few questions. Has Tomcat acknowledged this and agreed that it will be fixed in 5.5.8? Any ETA for 5.5.8? Unless I'm missing something, this seems like it was be a pretty high severity bug. Or are you and I the only two people using JDBC Realms with 5.5.7? Is there no mechanism for putting out patch jar files? One last question... is it possible to extract a JDBCRealm jar file from 5.5.4 without having to completely uninstall and reinstall all of Tomcat? (and if so, what is the jar file name?) Thanks again. Jerry -Original Message- From: alexander dosher [mailto:[EMAIL PROTECTED] Sent: Friday, March 11, 2005 9:18 PM To: Tomcat Users List Subject: Re: Exception on JDBCRealm Authorization J Malcolm [EMAIL PROTECTED] sez: Just moved to 5.5.7. After the server runs for several hours, I start getting the following exception on JDBCRealm access. hello. i've just worked through the same problem in the past week, and with the help of the list (thanks Remy Maucherat Hassan Schroeder!) solved it - so to save them some repetition... what is happening is mysql is dropping the unused connection, and JDBCRealm (since 5.5.4) isn't picking it up again. solutions are to go back to 5.5.4 JDBCRealm, or use DataSourceRealm in 5.5.7, or wait for 5.5.8. see the thread http://marc.theaimsgroup.com/?t=11103082883r=1w=2 for more details. share and enjoy, alex. - 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]
Exception on JDBCRealm Authorization
Just moved to 5.5.7. After the server runs for several hours, I start getting the following exception on JDBCRealm access. After restarting the server, it works for a while, then starts failing again. The exception dump doesn't give a whole lot of information to go on. I did not update my MySQL connector when I moved from 5.0 to 5.5.7. Is that necessary? Nothing else has changed that I'm aware of. Suggestions? Thx. = Mar 11, 2005 10:48:18 AM org.apache.catalina.realm.JDBCRealm getPassword SEVERE: Exception retrieving password for jmalcolm java.sql.SQLException: Communication link failure: java.net.SocketException, underlying cause: Software caused connection abort: recv failed ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: Software caused connection abort: recv failed STACKTRACE: java.net.SocketException: Software caused connection abort: recv failed at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read1(BufferedInputStream.java:256) at java.io.BufferedInputStream.read(BufferedInputStream.java:313) at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1316) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1463) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1854) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203) at com.mysql.jdbc.Connection.execSQL(Connection.java:2090) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1496) at org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:526) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:399) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:347) at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthe nticator.java:181) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:446) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126 ) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105 ) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
5.5.7 service.bat popup: Overlapped I/O Operation is in progress; NonAlpha 46
On Windows Server 2003, when I run service.bat I get a popup with the message: Overlapped I/O Operation is in progress; NonAlpha 46 I can run service.bat on the 5.0 installation and add/remove the service with no problem. But it will not install 5.5.7 service. Did Tomcat start using a new port (46?) or something in 5.5? Suggestions? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 5.5.7 service.bat popup: Overlapped I/O Operation is in progress; NonAlpha 46
Resolved... OK, I dug into the bat file and learned a couple of things... I was doing service install Tomcat5.5.7 The service name must not be able to have periods in it. I just changed the default values in the bat file to Tomcat55 and the display name to Apache Tomcat 5.5. No clue how that cryptic error message was intended to point me to the fact there are periods in the service name But it might not hurt to document that little period restriction 'gotcha'. Thanks. Jerry -Original Message- From: Jason Bainbridge [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 09, 2005 11:33 AM To: Tomcat Users List Subject: Re: 5.5.7 service.bat popup: Overlapped I/O Operation is in progress; NonAlpha 46 On Wed, 9 Mar 2005 10:30:23 -0600, J Malcolm [EMAIL PROTECTED] wrote: On Windows Server 2003, when I run service.bat I get a popup with the message: Overlapped I/O Operation is in progress; NonAlpha 46 I can run service.bat on the 5.0 installation and add/remove the service with no problem. But it will not install 5.5.7 service. Did Tomcat start using a new port (46?) or something in 5.5? Suggestions? Sounds like something DCOM permissions related, no idea why it would work in 5.0 and not 5.5, have you got a restrictive set of permissions in place at all? Some articles I read recommended running: gpupdate /force to refresh the loal groups and policies from the Active Directory but it would be strange if that was your problem. Possibly the installation of services has changed in Tomcat to effect the credentials used to install the service somehow? Regards, -- Jason Bainbridge http://kde.org - [EMAIL PROTECTED] Personal Site - http://jasonbainbridge.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 5.5.7 service.bat popup: Overlapped I/O Operation is in progress; NonAlpha 46
Intuitively obvious to the casual observer :-) J. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 09, 2005 2:38 PM To: Tomcat Users List; Jason Bainbridge Subject: RE: 5.5.7 service.bat popup: Overlapped I/O Operation is in progress; NonAlpha 46 From: J Malcolm [mailto:[EMAIL PROTECTED] Subject: RE: 5.5.7 service.bat popup: Overlapped I/O Operation is in progress; NonAlpha 46 No clue how that cryptic error message was intended to point me to the fact there are periods in the service name Looking at the code chart hanging on my wall, a period is a decimal 46 in ASCII and its variants. What that has to do with overlapped I/O is yet another Microsoft Mystery. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - 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]
Parallel install of 5.5 with existing 5.0? (Win Server 2003)
I am running 5.0 in production on my server. I want to move up to 5.5. But what I'd like to do is install 5.5 parallel to the 5.0 installation so I can migrate and test and have a quick rollback path if I have problems. I realize I can't have both running at the same time. But I'd really like to stop 5.0, start 5.5 and test. If there are any problems, I can immediately restart 5.0 while I resolve the problem. Problem is that when I install 5.5, it fails on the install of the service (Win Server 2003). I installed in on my local box just fine, but my local box doesn't have 5.0 installed. I suspect that there is a name conflict for setting up the service. I really don't want to have to burn bridges in order to bring up 5.5 for the first time on the server. Suggestions? Thanks. Jerry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Parallel install of 5.5 with existing 5.0? (Win Server 2003)
Jason, Thanks for the quick response. I figured there had to be some solution like that. Jerry -Original Message- From: Jason Bainbridge [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 4:55 PM To: Tomcat Users List Subject: Re: Parallel install of 5.5 with existing 5.0? (Win Server 2003) On Tue, 8 Mar 2005 16:52:22 -0600, J Malcolm [EMAIL PROTECTED] wrote: I am running 5.0 in production on my server. I want to move up to 5.5. But what I'd like to do is install 5.5 parallel to the 5.0 installation so I can migrate and test and have a quick rollback path if I have problems. I realize I can't have both running at the same time. But I'd really like to stop 5.0, start 5.5 and test. If there are any problems, I can immediately restart 5.0 while I resolve the problem. Problem is that when I install 5.5, it fails on the install of the service (Win Server 2003). I installed in on my local box just fine, but my local box doesn't have 5.0 installed. I suspect that there is a name conflict for setting up the service. Download the Zip file distribution of 5.5 instead and use service.bat to install a service with a different name, personally I always do it that way anyway. Regards, -- Jason Bainbridge http://kde.org - [EMAIL PROTECTED] Personal Site - http://jasonbainbridge.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Parallel install of 5.5 with existing 5.0? (Win Server 2003)
Well, I downloaded and unzipped the zip version and ran service.bat. I got a popup error: Overlapped I/O Operation is in progress; NonAlpha 46 I've been a programmer for many years and have seen many cryptic error messages, but this one ranks right on up there. Found a ref to it on a Microsoft site where it saying something about a 3rd party backup program that needs to be removed... (???). I can remove and install 5.0 as a service using service.bat with no problems. But it fails miserably with 5.5.7. Any suggestions? Anybody seen this message before? Thanks. Jerry -Original Message- From: J Malcolm [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 5:04 PM To: 'Tomcat Users List'; 'Jason Bainbridge' Subject: RE: Parallel install of 5.5 with existing 5.0? (Win Server 2003) Jason, Thanks for the quick response. I figured there had to be some solution like that. Jerry -Original Message- From: Jason Bainbridge [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 4:55 PM To: Tomcat Users List Subject: Re: Parallel install of 5.5 with existing 5.0? (Win Server 2003) On Tue, 8 Mar 2005 16:52:22 -0600, J Malcolm [EMAIL PROTECTED] wrote: I am running 5.0 in production on my server. I want to move up to 5.5. But what I'd like to do is install 5.5 parallel to the 5.0 installation so I can migrate and test and have a quick rollback path if I have problems. I realize I can't have both running at the same time. But I'd really like to stop 5.0, start 5.5 and test. If there are any problems, I can immediately restart 5.0 while I resolve the problem. Problem is that when I install 5.5, it fails on the install of the service (Win Server 2003). I installed in on my local box just fine, but my local box doesn't have 5.0 installed. I suspect that there is a name conflict for setting up the service. Download the Zip file distribution of 5.5 instead and use service.bat to install a service with a different name, personally I always do it that way anyway. Regards, -- Jason Bainbridge http://kde.org - [EMAIL PROTECTED] Personal Site - http://jasonbainbridge.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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]
Single-Tag DataSource Definition?
I know the docs define a jdbc datasource using multiple nested tags, e.g.: Resource name=jdbc/mail auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/mail parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value100/value /parameter etc... But somewhere I saw an alternate single-tag format: Resource name=jdbc/mail auth=Container type=javax.sql.DataSource factory=org.apache.commons.dbcp.BasicDataSourceFactory maxActive=100 maxIdle=30 maxWait=1 username=? password=??? driverClassName=org.gjt.mm.mysql.Driver url=jdbc:mysql://localhost:3306/jbf?autoReconnect=true/ I don't remember where that originated, but it was in a supposedly running environment. I'd much prefer to use the single tag format if possible. Problem is that it doesn't seem to work. Error says the class and url are null. Was I simply incorrect in thinking it was a working env, and it this actually simply invalid syntax. Or is it supported, perhaps in a later version of Tomcat? Or do you code the Java differently with the other syntax? Can someone educate me on this? Thanks. Jerry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Getting userid of current authenticated user
Is it possible to obtain the userid within a servlet of the person that has logged in via a realm authentication? I want to use the standard authentication to manage access. But once a person is into a certain page, I'd like to know which user it is so I can display, for instance, that user's account info. Thanks in advance. Jerry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]