Re: Embedded Tomcat question

2014-07-10 Thread Mark Thomas
On 10/07/2014 03:13, John D. Ament wrote: > Well, thanks for the helpful advice thus far.. > > So, now that I've added a listener properly, I get this: > > java.lang.UnsupportedOperationException: Section 4.4 of the Servlet > 3.0 specification does not permit this method to be called from a > Ser

Re: Embedded Tomcat question

2014-07-09 Thread John D. Ament
Well, thanks for the helpful advice thus far.. So, now that I've added a listener properly, I get this: java.lang.UnsupportedOperationException: Section 4.4 of the Servlet 3.0 specification does not permit this method to be called from a ServletContextListener that was not defined in web.xml, a w

Re: Embedded Tomcat question

2014-07-01 Thread Mark Thomas
On 01/07/2014 17:16, John D. Ament wrote: > I looked for the source code, at least on github, there's no tag for > 7.0.55 defined (see [1]) Given you are using 7.0.54, why would you look for a tag for 7.0.55? > How do I get access to a StandardContext? CAn I cast the Context object? Yes. It wou

Re: Embedded Tomcat question

2014-07-01 Thread John D. Ament
I looked for the source code, at least on github, there's no tag for 7.0.55 defined (see [1]) How do I get access to a StandardContext? CAn I cast the Context object? [1]: https://github.com/apache/tomcat On Mon, Jun 30, 2014 at 4:51 AM, Mark Thomas wrote: > On 30/06/2014 01:27, John D. Ament

Re: Embedded Tomcat question

2014-06-30 Thread Mark Thomas
On 30/06/2014 01:27, John D. Ament wrote: > I spoke a little too quickly, ServletContext is avilable from ctx > (just didn't search hard enough). Adding the request listener here > though results in: > > java.lang.NullPointerException > > at > org.apache.catalina.core.ApplicationContext

Re: Embedded Tomcat question

2014-06-29 Thread John D. Ament
I spoke a little too quickly, ServletContext is avilable from ctx (just didn't search hard enough). Adding the request listener here though results in: java.lang.NullPointerException at org.apache.catalina.core.ApplicationContext.createListener(ApplicationContext.java:1402) at

Re: Embedded Tomcat question

2014-06-29 Thread John D. Ament
Hi, I'm on Tomcat 7.0.54, though I would hope your APIs aren't volatile enough that your internals should matter.. I tried this: Wrapper wrapper = Tomcat.addServlet(ctx,"Greeter",GreeterServlet.class.getName()); wrapper.addMapping("/*"); wrapper.getServlet().getServletConfig().getServletContext(

RE: Embedded Tomcat question

2014-06-29 Thread Caldarale, Charles R
> From: John D. Ament [mailto:john.d.am...@gmail.com] > Subject: Embedded Tomcat question > Playing around a bit with embedded tomcat. It looks like there are > APIs to add all of the tomcat specific listeners, however how would I > add a ServletRequestListener? Look in the servlet spec for the