his:
>>>>>>
>>>>>> Wrapper wrapper =
>>>>>> Tomcat.addServlet(ctx,"Greeter",GreeterServlet.class.getName());
>>>>>> wrapper.addMapping("/*");
>>>>>> wrapper.getServlet().getServletConfig().getSer
>> wrapper.addMapping("/*");
>>>>> wrapper.getServlet().getServletConfig().getServletContext().addListener(MyListener.class);
>>>>>
>>>>> This results in a NPE. This makes me think I don't have access to the
>>>>> conte
#x27;s somewhere in this chain:
>>>>
>>>> tomcat = new Tomcat();
>>>> tomcat.setPort(8080);
>>>> File base = new File("target/webapp-runner");
>>>> if(!base.exists()) {
>>>> base.
t(8080);
>>> File base = new File("target/webapp-runner");
>>> if(!base.exists()) {
>>> base.mkdirs();
>>> }
>>> Context ctx = tomcat.addContext("/",base.getAbsolutePath());
>>>
>>>
ntext ctx = tomcat.addContext("/",base.getAbsolutePath());
>>
>> however, it doesn't look like Context here is a ServletContext.
>>
>>
>> On Sun, Jun 29, 2014 at 6:30 PM, Caldarale, Charles R
>> wrote:
>>>> From: John D. Ament [mailto:
text here is a ServletContext.
>
>
> On Sun, Jun 29, 2014 at 6:30 PM, Caldarale, Charles R
> wrote:
>>> From: John D. Ament [mailto:john.d.am...@gmail.com]
>>> Subject: Embedded Tomcat question
>>
>>> Playing around a bit with embedded tomcat. It looks like
arale, Charles R
wrote:
>> 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
> 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 s
Hi,
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?
John
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.