import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class One extends HttpServlet
{
public void doGet(HttpServletRequest request,HttpServletResponse response)throws IOException,ServletException
{
response.setContentType("text/html");
PrintWriter pw= response.getWriter();
pw.println("helloooo ORANGE");
}
}
<web-app>
<servlet>
<servlet-name>mango</servlet-name>
<servlet-class>One</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>mango</servlet-name>
<url-pattern>/mango</url-pattern>
</servlet-mapping>
</web-app>
我使用Tomcat 7.0.30 Servlet程序,我有一個錯誤,即404 status error
,如果我不進口util包,請告訴我什麼是進口的需求util包因爲我們沒有使用它。獲得404個狀態錯誤而執行使用tomcat7.0.30
你可以發佈堆棧跟蹤嗎?正如@martin所言, – ElderMael