想用JSP页面去显示HTML页面提交的表单上的信息 运行的时候当在HTML页面点击提交的时候并没有跳转的jsp页MyEclipse   编辑器却弹出来了 还要我DEBUG 我想请教一下这是什么问题 
TOMCAT启动了 也部署了 404 500 之类的错误都没有报~……我程序都也照着视频对比过了 没错误 为什么页面就是不跳转呢?

解决方案 »

  1.   

    <!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=gb2312" />
    <title>无标题文档</title>
    </head><body>
    <form id="form1" name="form1" method="post" action="getInfo.jsp">
      <table width="273" height="133" border="0">
        <tr>
          <td width="70">ISBN:</td>
          <td width="187"><label>
            <input name="number" type="text" id="number" />
          </label></td>
        </tr>
        <tr>
          <td>书名:</td>
          <td><label>
            <input name="name" type="text" id="name" />
          </label></td>
        </tr>
        <tr>
          <td height="24">作者:</td>
          <td><label>
            <input name="author" type="text" id="author" />
          </label></td>
        </tr>
        <tr>
          <td height="24">是否售出:</td>
          <td>是
            <label>
            <input name="sell" type="radio" value="true" checked="checked" />
          否
          <input type="radio" name="sell" value="fauls" />
          </label></td>
        </tr>
        <tr>
          <td height="27"><label>
            <input type="submit" name="Submit" value="提交" />
          </label></td>
          <td><label>
            <input name="reset" type="reset" id="reset" value="重置" />
          </label></td>
        </tr>
      </table>
    </form>
    </body>
    </html><%@ page language="java" pageEncoding="utf-8"%>
    <%@ page import="com.neusoft.testJsp.Book"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        
        <title>JSP</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>
      <%request.setCharacterEncoding("utf-8"); %>
      <jsp:useBean id="book" class="com.neusoft.testJsp.Book" scope="request" />
      <jsp:setProperty name="book" property="number"/>
      <jsp:setProperty name="book" property="name"/>
      <jsp:setProperty name="book" property="author"/>
      <jsp:setProperty name="book" property="sell"/>
      
      ISBN:<jsp:getProperty name="book" property="number"/>
          书名:<jsp:getProperty name="book" property="name"/>
          作者:<jsp:getProperty name="book" property="author"/>
          是否卖出<jsp:getProperty name="book" property="sell"/>
      </body>
    </html>package com.neusoft.testJsp;public class Book {
    private String number;
    private String name;
    private String author;
    private boolean sell; public String getNumber() {
    return number;
    } public void setNumber(String number) {
    this.number = number;
    } public String getName() {
    return name;
    } public void setName(String name) {
    this.name = name;
    } public String getAuthor() {
    return author;
    } public void setAuthor(String author) {
    this.author = author;
    } public boolean isSell() {
    return sell;
    } public void setSell(boolean sell) {
    this.sell = sell;
    }}
    第一个是HTML
    第二个是JSP
    第三个是JAVABEAN
    谢谢2L
      

  2.   


      <jsp:useBean id="book" class="com.neusoft.testJsp.Book" scope="request" />
      <jsp:setProperty name="book" property="number"/>
      <jsp:setProperty name="book" property="name"/>
      <jsp:setProperty name="book" property="author"/>
      <jsp:setProperty name="book" property="sell"/>你设置的这些属性,你属性哪里来的,怎么没看到你接受?
      

  3.   

    你在jsp里面掐了断点了。干掉他
      

  4.   

    public boolean isSell() {
            return sell;
        }    public void setSell(boolean sell) {
            this.sell = sell;
        }sell不知道能不能识别啊传出来的应该是String型的吧。。
      

  5.   

    4L说的对~……我在JAVAbean中不小心弄出了一个断点~……谢谢你