为什么跳转页面的时候失败了?????
login.jsp页面的代码
<div id="container">
<div class="logo">
<a herf="dologin.jsp"><img src="assets/006.jpg" alt="" /></a>
</div>
<div id="box">
<form action="#" method="post">
<p class="main">
<label>用户名:</label>
<input name="username" value="" />
<label>密码:</label>
<input type="password" name="passsword" />
</p>
<p class="space">
<input type="submit" value="登录" class="login" style=""/>
</p>
</form>
</div>
</div>
dologin.jsp页面的代码
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String username="";
String password="";
request.setCharacterEncoding("UTF-8");
username=request.getParameter("username");
password=request.getParameter("password");
//如果用户名和密码都等于admin,则登录成功;
if("admin".equals(username)&&"admin".equals("password"))
{
request.getRequestDispatcher("login_sucess.jsp").forward(request,response);
}else{
response.sendRedirect("login_failure.jsp");
}
%>
登陆跳转的时候却出错了