2

我正在尝试在 Eclipse EE Juno 中编写一个简单的 Java EE 应用程序。这是我的项目的文件层次结构:

项目文件层次结构

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

问题是:为什么会发生这种情况,我该如何解决?

4

1 回答 1

3

请在您的网址格式中添加正斜杠。

<url-pattern>/*.do</url-pattern>

于 2012-09-24T09:26:17.820 回答