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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

j2ee中servlet的一個(gè)新手問題,頁(yè)面跳轉(zhuǎn)提示The requested resource is not available.

j2ee中servlet的一個(gè)新手問題,頁(yè)面跳轉(zhuǎn)提示The requested resource is not available.

肖小波 2016-08-29 19:53:31
<form action="servlet_in" method="post">?? ??? ?<div class="hom-add-box">?? ??? ??? ?<label>用戶名:</label> <input type="text" id="hom-in-username">?? ??? ?</div>?? ??? ?<div class="hom-add-box">?? ??? ??? ?<label>密碼:</label> <input type="password" id="hom-in-password">?? ??? ?</div>?? ??? ?<div class="hom-add-box">?? ??? ??? ?<label>登陸類型:</label> ?? ??? ??? ?<select>?? ??? ??? ??? ?<option>用戶</option>?? ??? ??? ??? ?<option>管理員</option>?? ??? ??? ?</select>?? ??? ?</div>?? ??? ?<div class="hom-add-box">?? ??? ??? ?<input type="submit" value="登陸" id="submit" />?? ??? ?</div>?? ?</form>servlet_in中dopost是這樣寫的:??? protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {?? ??? ?// TODO Auto-generated method stub?? ??? ?request.setCharacterEncoding("GB18030");?? ??? ?String username=request.getParameter("hom-in-username");?? ??? ?String password=request.getParameter("hom-in-password");?? ??? ?request.setAttribute("name", username);?? ??? ?request.setAttribute("password", password);?? ??? ?request.getRequestDispatcher("hom.jsp").forward(request, response);?? ?}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>j2ee-demo</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>servlet_in</servlet-name>??? <servlet-class>page.servlet_in</servlet-class>? </servlet>? <servlet-mapping>??? <servlet-name>servlet_in</servlet-name>??? <url-pattern>/servlet_in</url-pattern>? </servlet-mapping></web-app>
查看完整描述

2 回答

已采納
?
黑女2008

TA貢獻(xiàn)75條經(jīng)驗(yàn) 獲得超32個(gè)贊

form的action應(yīng)該是page/servlet_in吧

查看完整回答
1 反對(duì) 回復(fù) 2016-08-29
?
慕粉1555408013

TA貢獻(xiàn)5條經(jīng)驗(yàn) 獲得超0個(gè)贊

書上說,<url–pattern>的格式如果是“/computerBill”那么action就是"computerBill"
查看完整回答
反對(duì) 回復(fù) 2017-05-15
  • 2 回答
  • 0 關(guān)注
  • 1795 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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