Hi,

I am able to reproduce this in pax web 1.1.3
(https://github.com/ops4j/org.ops4j.pax.web/tree/web-1.1.3). 

I have debugged in to the pax-web code. Looks like web xml parser code looks
for servelet-class element, if it is not found then servelet mapping parsing
is skipped entirely. This is causing deployment to fail. Is there a work
around for this ?

Code from org.ops4j.pax.web.extender.war.internal.parser.dom.DOMWebXmlParser
private static void parseServlets(final Element rootElement,
                        final WebApp webApp) {
                final Element[] elements = getChildren(rootElement, "servlet");
                if (elements != null && elements.length > 0) {
                        for (Element element : elements) {
                                final WebAppServlet servlet = new 
WebAppServlet();
                                
servlet.setServletName(getTextContent(getChild(element,
                                                "servlet-name")));
                                String servletClass = 
getTextContent(getChild(element,
                                                "servlet-class"));
                                *if (servletClass != null) {
                                        servlet.setServletClass(servletClass);
                                        webApp.addServlet(servlet);
                                } else {
                                        LOG.warn("No Servlet-class found while 
parsing servlet definition");
                                        return;
                                }*



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Exception-if-jsp-is-declated-in-web-xml-servlet-elemnt-tp4027558p4027586.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to