Re: Populating JNDI entirely in Java code

2013-04-01 Thread Benson Margulies
s in place, but before other things from the initialization process go to use it. It was easier to just setup the webapp class loader to share some classes with the program that embeds tomcat and just use singleton. On Mon, Apr 1, 2013 at 3:10 PM, Konstantin Kolinko wrote: > 2013/4/1 Ben

Populating JNDI entirely in Java code

2013-04-01 Thread Benson Margulies
When embedding Tomcat, I'd like to create some objects purely from code -- I don't want to bother to express them as XML -- and then pick them up inside webapps. Now, calling enableNaming() on Tomcat sets up a bunch of environment, but does not actually create and JNDI objects. If I call enableNam

Re: Can't seem to get metadata-complete turned on

2012-09-16 Thread Benson Margulies
On Fri, Sep 14, 2012 at 1:06 PM, Mark Thomas wrote: > On 14/09/2012 17:36, Benson Margulies wrote: >> On Fri, Sep 14, 2012 at 12:27 PM, Mark Thomas wrote: >>> Benson Margulies wrote: >>> >>>> Apologies for the accidental use of HTML. >>>> &g

Re: Can't seem to get metadata-complete turned on

2012-09-14 Thread Benson Margulies
On Fri, Sep 14, 2012 at 12:27 PM, Mark Thomas wrote: > Benson Margulies wrote: > >>Apologies for the accidental use of HTML. >> >>The problem below is triggered by the facts that: >> >>a) spring-web contains a ServletContainerInitializer >>b) even with

Re: Can't seem to get metadata-complete turned on

2012-09-14 Thread Benson Margulies
On Fri, Sep 14, 2012 at 12:27 PM, Mark Thomas wrote: > Benson Margulies wrote: > >>Apologies for the accidental use of HTML. >> >>The problem below is triggered by the facts that: >> >>a) spring-web contains a ServletContainerInitializer >>b) even with

Re: Can't seem to get metadata-complete turned on

2012-09-14 Thread Benson Margulies
state to potentially scan in the classpath. Is (b) really correct? Unfortunately, I need spring-web in order to get the log4j support, even though I don't want any of that other stuff in there. On Fri, Sep 14, 2012 at 11:56 AM, Benson Margulies wrote: > > I'm using tomcat 7.0

Can't seem to get metadata-complete turned on

2012-09-14 Thread Benson Margulies
I'm using tomcat 7.0.29, embedded. My web.xml web-app element looks like: http://java.sun.com/xml/ns/javaee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";

Re: Minimal persistent storage for a webapp

2011-11-25 Thread Benson Margulies
On Fri, Nov 25, 2011 at 4:36 PM, Konstantin Kolinko wrote: > 2011/11/26 Benson Margulies : >> I'm fairly certain that I know the answer to the question here, but I >> want to pose it just in case I've missed something. >> >> In a web application, I&

Minimal persistent storage for a webapp

2011-11-25 Thread Benson Margulies
I'm fairly certain that I know the answer to the question here, but I want to pose it just in case I've missed something. In a web application, I'd like to store a bit of data without configuring a database, or, indeed anything that has to be edited into an XML file or typed into a container-level

Re: Adding an additional static resource directory to a webapp via API

2011-11-23 Thread Benson Margulies
On 23/11/2011 18:06, Benson Margulies wrote: >> I'm launching Tomcat 7 via the API. >> >> One of the uses of this is that I can launch from Eclipse and >> 'live-edit' my static files, without tangling myself up in the Eclipse >> JEE facilities, which I

Adding an additional static resource directory to a webapp via API

2011-11-23 Thread Benson Margulies
I'm launching Tomcat 7 via the API. One of the uses of this is that I can launch from Eclipse and 'live-edit' my static files, without tangling myself up in the Eclipse JEE facilities, which I have never succeeded in using very well. Now, I want to meld some shared content into the webapp. In the

Re: Adding a webapp to a running embedded tomcat 7 with an 'improved' class loader results in missing classes?

2011-06-22 Thread Benson Margulies
I agree with your preference. Patch to follow later today. On Wed, Jun 22, 2011 at 10:27 AM, Mark Thomas wrote: > On 22/06/2011 15:18, Benson Margulies wrote: >> Solr has a particularly bizarre class loading environment. The class >> causes the problem is the FileUploadServl

Re: Adding a webapp to a running embedded tomcat 7 with an 'improved' class loader results in missing classes?

2011-06-22 Thread Benson Margulies
rload? Or would it make more sense to have a function createWebapp that left out the addChild and left that to the caller? On Wed, Jun 22, 2011 at 10:00 AM, Mark Thomas wrote: > On 22/06/2011 14:47, Benson Margulies wrote: >> The equivalent basic scheme worked perfectly fine in tomcat6.

Adding a webapp to a running embedded tomcat 7 with an 'improved' class loader results in missing classes?

2011-06-22 Thread Benson Margulies
The equivalent basic scheme worked perfectly fine in tomcat6. In Tomcat7, it looks like: solrContext = tomcat.addWebapp("/solr", solrWebapp.getCanonicalPath()); WebappLoader solrLoader = new WebappLoader(LSHDemoLauncher.class.getClassLoader()); solrContext.setLo

Running an old servlet with Tomcat 7.0.16 embedded API

2011-06-20 Thread Benson Margulies
12:56 PM, Rainer Jung wrote: > Hi Benson, > > On 20.06.2011 17:51, Benson Margulies wrote: >> Reading org.apache.catalina.startup.Tomcat.addWebapp(Host, String, >> String, String), I don't understand the following: >> >>         // prevent it from looking ( if

Re: Adding a webapp via the API to a running instance

2011-06-20 Thread Benson Margulies
wrote: > Hi Benson, > > On 20.06.2011 17:51, Benson Margulies wrote: >> Reading org.apache.catalina.startup.Tomcat.addWebapp(Host, String, >> String, String), I don't understand the following: >> >>         // prevent it from looki

Re: Adding a webapp via the API to a running instance

2011-06-20 Thread Benson Margulies
eems quite straightforward to me. On Mon, Jun 20, 2011 at 12:56 PM, Rainer Jung wrote: > Hi Benson, > > On 20.06.2011 17:51, Benson Margulies wrote: >> Reading org.apache.catalina.startup.Tomcat.addWebapp(Host, String, >> String, String), I don't understand the following: >

A servlet named jsp

2011-06-20 Thread Benson Margulies
This is related to another thread I started, but it's a different question. Some experimentation shows that Tomcat.java disables the default web.xml for a good reason; if I force one back into place, I get a duplicate name error. However, whatever it ends up using does not include a servlet named

Re: Adding a webapp via the API to a running instance

2011-06-20 Thread Benson Margulies
y is this being used to prevent the code from seeing a web.xml in the basedir/conf? On Mon, Jun 20, 2011 at 11:31 AM, Benson Margulies wrote: > I'm using import org.apache.catalina.startup.Tomcat to embed tomcat. > > After it is running, I'm trying to add another webapp with

Adding a webapp via the API to a running instance

2011-06-20 Thread Benson Margulies
I'm using import org.apache.catalina.startup.Tomcat to embed tomcat. After it is running, I'm trying to add another webapp with .addWebapp. The addWebapp call logs: 2011-06-20 11:23:23,385 ["http-bio-9167"-exec-2] INFO org.apache.catalina.util.LifecycleBase - The start() method was called on com

Embedded tomcat contexts confusion

2011-06-09 Thread Benson Margulies
I'm using tomcat 7.0.14. I create a org.apache.catalina.startup.Tomcat;. I call 'addWebapp' lshContext = tomcat.addWebapp("/lsh", docBase.getCanonicalPath());. The webapp in question has a Listener. The listener happens to belong to Spring. contextInitialized has a try/catch block. In the cat

Re: Tomcat Xalan classpath problem

2009-11-05 Thread Benson Margulies
ther there's a relation to Java 6 vs. Java 5 > (handling in Java 6 is broken). > > Regards, > > Rainer > > On 03.11.2009 14:00, Benson Margulies wrote: > > Here's the relevant log traffic of the missing method. I can get past > this > > problem by putt

Re: Tomcat Xalan classpath problem

2009-11-03 Thread Benson Margulies
ess I > wanted to check, whether there's a relation to Java 6 vs. Java 5 > (handling in Java 6 is broken). > > Regards, > > Rainer > > On 03.11.2009 14:00, Benson Margulies wrote: > > Here's the relevant log traffic of the missing method. I can get past > th

Re: Tomcat Xalan classpath problem

2009-11-03 Thread Benson Margulies
handling in Java 6 is broken). > > Regards, > > Rainer > > On 03.11.2009 14:00, Benson Margulies wrote: > > Here's the relevant log traffic of the missing method. I can get past > this > > problem by putting xalan into the endorsed directory, but I should not >

Re: Tomcat Xalan classpath problem

2009-11-03 Thread Benson Margulies
more org.apache.cxf.common.injection.ResourceInjector - method annotated by @PostConstruct throws exception when invoked java.lang.reflect.InvocationTargetException On Tue, Nov 3, 2009 at 7:48 AM, André Warnier wrote: > Benson Margulies wrote: > >> I have a webapp that makes calls to the JAXP 1.4/Java 1.6 APIs

Tomcat Xalan classpath problem

2009-11-03 Thread Benson Margulies
I have a webapp that makes calls to the JAXP 1.4/Java 1.6 APIs that allow the caller to pass in the class name of implementation classes. It all works find standalone. It works fine in Jetty. It fails in Tomcat 6.0.20. The error is a missing method in a Xalan class; as if Tomcat has somehow gotten