[英]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: [/ ].
java.lang.IllegalStateException:Servlet [com.gym.GymperUI $ Servlet]和Servlet [MyUIServlet]具有相同的url模式:[/ ]。 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
相关注释信息:注释[@ javax.servlet.annotation.WebServlet(loadOnStartup = -1,initParams = [],smallIcon =,description =,name = MyUIServlet,value = [],largeIcon =,displayName =,asyncSupported = true, com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:518)上类型为[TYPE]的带注释元素[class com.mycompany.gymproject.MyUI $ MyUIServlet]上的urlPatterns = [/ ])] .com上的.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:446)位于com.sun.enterprise.deployment.archive.com上的com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:419) com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)上的com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java)上的.Archivist.readDeploymentDescriptors(Archivist.java:396) :280),位于com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241),位于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)
在org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:227)上的Archive(ApplicationFactory.java:161)在org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:203)在com.sun.enterprise.v3上的org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96)上com.sun.enterprise.v3上的Server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:881) .com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:377)上的.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:821)在com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle) .java:219),位于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. 这仅意味着您有两个尝试处理
/
URL的servlet。 So either remove the other servlet or make sure they handle separate URL's. 因此,请删除其他servlet或确保它们处理单独的URL。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.