https://issues.apache.org/bugzilla/show_bug.cgi?id=53958

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |INVALID

--- Comment #6 from Mark Thomas <ma...@apache.org> ---
If you want to use generated JSPs you need to initialise Jasper before you
instantiate the Servlets. Your sample code adds the JasperListener but it isn't
called until after you have tried to create your servlet. That is what leads to
the NPE.

If you replace:
server.addLifecycleListener(new JasperListener());

with:
(new JasperListener()).lifecycleEvent(new LifecycleEvent(server,
Lifecycle.BEFORE_INIT_EVENT, null));

you'll get the result you want.

Mark

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to