我的web.xml文件似乎有問題。 我每次運行Apache tomcat 8服務器時,都會給出這個錯誤: 服務器在localhost服務器tomcat v8.0服務器無法啓動。本地主機上的服務器tomcat v8.0服務器無法啓動
當我刪除了xml文件的servlet時,服務器工作了! 我的web.xml情況如下:
<?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" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<display-name>ZiyadA00191914</display-name>
<servlet>
<servlet-name>RegisterServlet</servlet-name>
<servlet-class>controllers.RegisterServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>RegisterServlet</servlet-name>
<url-pattern>/RegisterServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>LoginServlet</servlet-name>
<servlet-class>controllers.LoginServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>LoginServlet</servlet-name>
<url-pattern>/LoginServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>ListEventMainServlet</servlet-name>
<servlet-class>controllers.ListEventMainServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ListEventMainServlet</servlet-name>
<url-pattern>/ListEventMainServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>ListEventByCategory</servlet-name>
<servlet-class>controllers.ListEventByCategory</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ListEventByCategory</servlet-name>
<url-pattern>/ListEventByCategory</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>CartServlet</servlet-name>
<servlet-class>controllers.CartServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CartServlet</servlet-name>
<url-pattern>/CartServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>OrderServlet</servlet-name>
<servlet-class>controllers.OrderServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>OrderServlet</servlet-name>
<url-pattern>/OrderServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>FeedbackServlet</servlet-name>
<servlet-class>controllers.FeedbackServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>FeedbackServlet</servlet-name>
<url-pattern>/FeedbackServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>ShippingServlet</servlet-name>
<servlet-class>controllers.ShippingServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ShippingServlet</servlet-name>
<url-pattern>/ShippingServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>LogoutServlet</servlet-name>
<servlet-class>controllers.LogoutServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>LogoutServlet</servlet-name>
<url-pattern>/LogoutServlet</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>Driver.jsp</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>main.jsp</welcome-file>
<welcome-file>listEvents.jsp</welcome-file>
</welcome-file-list>
</web-app>
任何建議得到它的工作沒有XML文件的刪除代碼?
在此先感謝你們。
你可以保留一個servlet並刪除剩下的部分以查看它是否實際上是造成它的servlet或其他? – LearningPhase
也粘貼日誌 –