简体   繁体   中英

Vaadin project execution in netbeans

I get the following error. How can I fix it?

java.lang.IllegalStateException: Servlet [com.gym.GymperUI$Servlet] and Servlet [MyUIServlet] have the same url pattern: [/ ]. Related annotation information: annotation [@javax.servlet.annotation.WebServlet(loadOnStartup=-1, initParams=[], smallIcon=, description=, name=MyUIServlet, value=[], largeIcon=, displayName=, asyncSupported=true, urlPatterns=[/ ])] on annotated element [class com.mycompany.gymproject.MyUI$MyUIServlet] of type [TYPE] at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:518) at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:446) at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:419) at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241) at com.sun.enterprise.deployment.archivist.ApplicationFactory.open Archive(ApplicationFactory.java:161) at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:203) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:227) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96) at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:881) at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:821) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:377) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)

The error message tells you this:

Servlet [com.gym.GymperUI$Servlet] and Servlet [MyUIServlet] have the same url Pattern: [/].

This just means that you have two servlets which try to handle the / URL. So either remove the other servlet or make sure they handle separate URL's.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM