亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

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

登錄頁面不發生跳轉

老師,為什么我的點擊登錄頁面不發生跳轉?。繘]有任何反應,也沒有報錯。

正在回答

3 回答

?<from action="dologin.jsp" name="loginForm" method="get">

是form,不是from

0 回復 有任何疑惑可以回復我~
#1

代碼俠 提問者

非常感謝!調試成功了,細節很重要啊。
2015-03-20 回復 有任何疑惑可以回復我~

我用的是myEclipse for Spring 2014

login.jsp的代碼:

<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>

<%

String path = request.getContextPath();

String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

? <head>

? ? <base href="<%=basePath%>">

? ??

? ? <title>My JSP 'Login.jsp' starting page</title>

? ??

<meta http-equiv="pragma" content="no-cache">

<meta http-equiv="cache-control" content="no-cache">

<meta http-equiv="expires" content="0"> ? ?

<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

<meta http-equiv="description" content="This is my page">

<!--

<link rel="stylesheet" type="text/css" href="styles.css">

-->


? </head>

??

?<body>

? ? <h1>用戶登錄</h1>

? ? <hr>

? ? <from action="dologin.jsp" name="loginForm" method="get">

? ? <table>

? ? <tr>

? ? <td>用戶名:</td>

? ? <td><input type="text" name="dologin.jsp"/></td>

? ? </tr>

? ? <tr>

? ? <td>密碼:</td>

? ? <td><input type="password" name="passward"/></td>

? ? </tr>

? ? <tr>

? ? <td colsopan="2"><input type="submit" value="登錄"/></td>

? ? </tr>

? ? </table>

? ? </from>

? </body>

</html>



這是web.xml的內容:

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">

? <display-name>JspLogin</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>

</web-app>



0 回復 有任何疑惑可以回復我~

貼一下你的代碼吧

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
JAVA遇見HTML——JSP篇
  • 參與學習       248278    人
  • 解答問題       3215    個

Java Web入門級教程JSP,帶你輕松的學習JSP基礎知識

進入課程

登錄頁面不發生跳轉

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號