第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

出現(xiàn)了404

可以出來靜態(tài)頁面,跳轉(zhuǎn)的時候出現(xiàn)了404

<%@ page language="java" contentType="text/html; charset=utf-8"

? ? %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>Insert title here</title>

</head>

<body>

<h1>my first servlet demo</h1>

<hr>

<a href="servlet/HelloServlet">Get方式請求HelloServlet</a>

</body>

</html>


<?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_3_0.xsd" id="WebApp_ID" version="3.0">

? <display-name>First</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>HelloServlet</servlet-name>

? <servlet-class>servlet.HelloServlet</servlet-class>

? </servlet>

? <servlet-mapping>

? <servlet-name>HelloServlet</servlet-name>

? <url-pattern>/servlet/HelloServlet</url-pattern>

? </servlet-mapping>

??

</web-app>


public class HelloServlet extends HttpServlet {


@Override

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

// TODO Auto-generated method stub

// TODO Auto-generated method stub

System.out.println("處理Get()請求......");

PrintWriter out = response.getWriter();

response.setContentType("text/html;charset=utf-8");

out.println("<strong>Hello Servlet</strong><br>");

}


@Override

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

// TODO Auto-generated method stub

}




}


正在回答

1 回答

用你的代碼,可以正常跳轉(zhuǎn)。 你重啟下tomcat試試吧

1 回復(fù) 有任何疑惑可以回復(fù)我~
#1

Grunde3579893 提問者

好的謝謝
2016-08-15 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

出現(xiàn)了404

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號