Caused by: java.lang.IllegalArgumentException: The servlets named [JavaQuestionForm] and [JavaQuestion] are both mapped to the url-pattern [/JavaQuestion] which is not permitted
    at org.apache.catalina.deploy.WebXml.addServletMapping(WebXml.java:293)
    at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2443)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2118)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(ContextConfig.java:2041)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1948)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1311)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5479)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 6 more
2

There are 2 best solutions below

0
On

Check your web.xml or web config annotations. Apparently you mapped two different servlets (JavaQuestion and JavaQuestionForm) to the same URL: /JavaQuestion.

0
On

As said by the exception, you are trying to bind 2 differents servlet to the same URI :

The servlets named [JavaQuestionForm] and [JavaQuestion] are both mapped to the url-pattern [/JavaQuestion] which is not permitted

You have to change your web.xml