我正嘗試在Eclipse EE Juno中編寫一個簡單的Java EE應用程序。這裏是我的項目的文件層次:Tomcat上的「Servlet當前不可用」錯誤
的index.jsp:
<jsp:forward page="/departments.do"/>
的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" 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_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>UniBudget</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Do</servlet-name>
<servlet-class>control.Controller</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Do</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</web-app>
的錯誤,我得到:
HTTP Status 503 - Servlet Do is currently unavailable
和q問題:爲什麼會發生這種情況,我該如何解決?
在您的url模式中添加正斜槓。 '/*。do url-pattern>' –
HashimR