Do symlinks under aliased directories require any special handing/configuration (tomcat = 7.0.56)?

2017-07-19 Thread Terence Lee
Please forgive any misuse of terminology here.  I am a sysadmin involved in devops deployments of tomcat servers and applications, but I don't really know much about how tomcat actually works. I am a unix guy! We recently had a deployment of a third party application that resulted in tomcat

Re: Storing JNDI binding password using encryption

2017-07-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Alex, On 7/19/17 3:53 PM, Alex O'Ree wrote: > The jar file is in /tomcat/lib. The class is super simple > > package org.redacted; public class JNDIRealmExt extends JNDIRealm{ > @Override public String getConnectionPassword(){ return >

Maven Tomcat Plugin Specific Properties File

2017-07-19 Thread Tony Chuinard
Is there anyway to load a specific properties file for the Tomcat plugin? I know about the section of the plugin config, but I am looking to point to a specific file when using tomcat7:run instead of having to code these properties into the pom.

Re: Storing JNDI binding password using encryption

2017-07-19 Thread Alex O'Ree
The jar file is in /tomcat/lib. The class is super simple package org.redacted; public class JNDIRealmExt extends JNDIRealm{ @Override public String getConnectionPassword(){ return Utility.decrypt(connectionPassword); } } server.xml looks like this ldap://localhost:389; userBase="..."

Re: Storing JNDI binding password using encryption

2017-07-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Alex, On 7/19/17 1:53 PM, Alex O'Ree wrote: > On Wed, Jul 19, 2017 at 12:09 PM, Mark Thomas > wrote: >> On 19/07/17 16:22, Alex O'Ree wrote: >>> Assuming I had access to a reversible encryption mechanism and >>> wanted to store

Re: Storing JNDI binding password using encryption

2017-07-19 Thread Alex O'Ree
Thanks Mark I tried just extend the JDNI Realm class and overriding getConnectionPassword but it doesn't appear that my code ever called, even those my fully qualified classname is listed in the realm xml element. Any ideas? On Wed, Jul 19, 2017 at 12:09 PM, Mark Thomas wrote:

Re: Storing JNDI binding password using encryption

2017-07-19 Thread Mark Thomas
On 19/07/17 16:22, Alex O'Ree wrote: > Assuming I had access to a reversible encryption mechanism and wanted > to store the JNDI binding password in an encrypted form by extending > the JNDIRealm class, which method should i override to encrypt the > password stored in server.xml on the fly? You

Storing JNDI binding password using encryption

2017-07-19 Thread Alex O'Ree
Assuming I had access to a reversible encryption mechanism and wanted to store the JNDI binding password in an encrypted form by extending the JNDIRealm class, which method should i override to encrypt the password stored in server.xml on the fly?

Re: Getting user role membership without context

2017-07-19 Thread Alex O'Ree
Got it to work! Thanks Mark! On Wed, Jul 19, 2017 at 10:40 AM, Mark Thomas wrote: > On 19/07/17 15:34, Alex O'Ree wrote: >> Context.findChild and findChildren returns an instance of "Container". >> It looks like StandardWrapper extends Container, so I should be able >> to type

Re: Getting user role membership without context

2017-07-19 Thread Mark Thomas
On 19/07/17 15:34, Alex O'Ree wrote: > Context.findChild and findChildren returns an instance of "Container". > It looks like StandardWrapper extends Container, so I should be able > to type cast it. The question is, is it always going to be an instance > of StandardWrapper? For a Context, it

Re: run thread from servlet

2017-07-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Lance, On 7/19/17 7:35 AM, Campbell, Lance wrote: > Thanks for your information. So when I have a process that I want > to run as a thread I would assume I need to implement the > interface ServletContextListener. I would also assume that the >

Re: Getting user role membership without context

2017-07-19 Thread Alex O'Ree
Context.findChild and findChildren returns an instance of "Container". It looks like StandardWrapper extends Container, so I should be able to type cast it. The question is, is it always going to be an instance of StandardWrapper? On Tue, Jul 18, 2017 at 6:40 PM, Mark Thomas

RE: run thread from servlet

2017-07-19 Thread Campbell, Lance
Chris, Thanks for your information. So when I have a process that I want to run as a thread I would assume I need to implement the interface ServletContextListener. I would also assume that the servlet that creates the process will call the following method:

Re: Tomcat 8 Connection Pooling

2017-07-19 Thread Riccardo Cohen
You'll find here : http://www.5flow.com/tmp/tomcatjndidb.zip a very small sample that works on my computer (with IntelliJ project). Just change the context.xml with your database. Viewing the home page will create a database, insert records, then display them. The data source is of type