Re: [jetty-dev] jsp-file type servlet definitions cause @WebServlet based servlet definitions to fail
Jan Bartel <[email protected]>
| Newsgroups | gmane.comp.java.jetty.general |
|---|---|
| Message-ID | <CALg=VpjXxycuskAXiOg=p1dzvPPtNy-sqeC2itA3e1iZ8d6nTw@mail.gmail.com> |
Forge, Thanks for that, I've raised: https://bugs.eclipse.org/bugs/show_bug.cgi?id=373603 Looks like a trivial fix, hopefully get that down right now. Jan On 8 March 2012 02:38, Forge7 <[email protected]> wrote: > Hi, > > Not sure I have the correct place for this, but here goes. > > Using Jetty version 8.1.1.v20120215 from Maven > > In my web.xml, I have the following: > > ************************************************************************* > <?xml version="1.0" encoding="UTF-8"?> > <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns="http://java.sun.com/xml/ns/javaee" > xmlns:jsp="http://java.sun.com/xml/ns/javaee/jsp" > xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" > version="2.5"> > <display-name>CaseWeb</display-name> > > <session-config> > <session-timeout>2</session-timeout> > </session-config> > <servlet> > <servlet-name>SimpleServlet</servlet-name> > <servlet-class>com.casetraining.servlets.SimpleServlet</servlet-class> > </servlet> > <servlet> > <servlet-name>shop</servlet-name> > <jsp-file>/shop/shop.jsp</jsp-file> > </servlet> > <servlet-mapping> > <servlet-name>SimpleServlet</servlet-name> > <url-pattern>/SimpleServlet</url-pattern> > </servlet-mapping> > <servlet-mapping> > <servlet-name>shop</servlet-name> > <url-pattern>/shop</url-pattern> > </servlet-mapping> > > <jsp-config> > <taglib> > <taglib-uri>/WEB-INF/tagbook.tld</taglib-uri> > <taglib-location>/WEB-INF/tagbook.tld</taglib-location> > </taglib> > </jsp-config> > > <welcome-file-list> > <welcome-file>casemenu.html</welcome-file> > </welcome-file-list> > </web-app> > ************************************************************************* > > I also have a servlet annotated with @WebServlet: > > ************************************************************************* > @WebServlet(name="SimpleHttpServlet", urlPatterns="/SimpleHttpServlet") > public class SimpleHttpServlet extends HttpServlet { > > // omitted for brevity > > } > ************************************************************************* > > When starting up the server (using jetty-maven-plugin) I get the following: > > > ************************************************************************* > 2012-03-07 15:32:27.057:INFO:oejs.Server:jetty-8.1.1.v20120215 > 2012-03-07 15:32:27.302:INFO:oejpw.PlusConfiguration:No Transaction manager > found - if your webapp requires one, please configure one. > 2012-03-07 15:32:27.880:WARN:oejw.WebAppContext:Failed startup of context > o.m.j.p.JettyWebAppContext{/TestWeb,file:/C:/workspaces/Java%20Course/TestWeb/src/main/webapp/},file:/C:/workspaces/Java%20Course/TestWeb/src/main/webapp/ > java.lang.NullPointerException > at > org.eclipse.jetty.annotations.WebServletAnnotation.apply(WebServletAnnotation.java:103) > at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:343) > at > org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1211) > at > org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:699) > at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454) > at > org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:256) > at > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) > at > org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167) > at > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) > at > org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224) > at > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) > at > org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90) > at org.eclipse.jetty.server.Server.doStart(Server.java:263) > at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:65) > at > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) > at > org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:511) > at > org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:364) > at org.mortbay.jetty.plugin.JettyRunMojo.execute(JettyRunMojo.java:514) > at > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) > at > org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) > at > org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) > > ************************************************************************* > > > > If I remove the jsp-file entries from the web.xml, this problem goes away. > > Hope that's enough info. > > Forge. > > -- > View this message in context: http://jetty.4.n6.nabble.com/jsp-file-type-servlet-definitions-cause-WebServlet-based-servlet-definitions-to-fail-tp4554815p4554815.html > Sent from the Jetty Discuss mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email