当前位置:编程学习 > JAVA >>

页面登录无法跳转 求解决方法 学生党求救

以下是我小项目中。login.jsp是全部代码,查不清楚是那里出现错误
在tomcat运行时候,显示
HTTP Status 404 - /book/login

--------------------------------------------------------------------------------

type Status report

message /book/login

description The requested resource (/book/login) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.10




代码如下:
请各位大侠,指点迷津

<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户登录</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="wrap">
<%@include file="header.jsp" %>
       <div class="center_content">
        <div class="left_content">
        <div class="crumb_nav">
             <a href="index.jsp">首页</a> >> 登录
            </div>
            <div class="title"><span class="title_icon"><img src="images/bullet1.gif" alt="" title="" /></span>账号登录</div>
        
         <div class="feat_prod_box_details">
            <p class="details">
             只有登录之后才能够购买书籍以及发表留言!
            </p>
            <div align="center"><font color="red">${message}</font></div>
             <font color="red" style="text-align: center">${NameNotFoundException} ${ErrPwdException}</font>
               <div class="contact_form">
                <div class="form_subtitle">账号登录</div>
                 <form name="login" id="loginForm" action="login" method="post">          
                    <div class="form_row">
                    <label class="contact"><strong>账号:</strong></label>
                    <input type="text"  name="name" class="contact_input" />
                    </div>  


                    <div class="form_row">
                    <label class="contact"><strong>密码:</strong></label>
                    <input type="password" name="password" class="contact_input" />
                    </div>                     

                    <div class="form_row">
                        <div class="terms">
                        <input type="checkbox" name="terms" />
                        记住密码
                        </div>
                    </div> 
                    <div class="form_row">
                    <input type="submit" class="register" value="登录" />
                    </div>   
                    
                  </form>     
                </div>  
            
            </div>
            
              

            

            
        <div class="clear"></div>
        </div><!--end of left content-->
        <%@include file="right.jsp" %>
        <!--end of right content-->
  
       <div class="clear"></div>
       </div><!--end of center content-->
        <%@include file="footer.jsp" %>  
</div>

</body>
</html>  --------------------编程问答--------------------
<form name="login" id="loginForm" action="login" method="post">

action="login"
请问你的login是什么东西???
JSP页面还是Servlet?
如果是JSP页面就加上.jsp
login.jsp

-----------------------切掉----------------------

如果是Servlet就打开你的Web.xml配置文件看看有没有对应的Servlet、没有就配置一个! --------------------编程问答-------------------- description The requested resource (/book/login) is not available.

<form name="login" id="loginForm" action="login" method="post">

你的form的action要到哪里去啊? --------------------编程问答-------------------- 这么写:action="login.action"
补充:Java ,  Web 开发
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,