[b]代码如下:[/b]<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="com.dao.ProductionInfo"%>
<%@ page import="java.util.*"%>
<jsp:useBean id="productionDao" scope="request" class="com.dao.ProductionDao"/><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>收银台结账</title>
</head>
<link href="CSS/style.css" rel="stylesheet" type="text/css">
<body>
<jsp:include page="top.jsp" flush="true"></jsp:include>
<table width="364" height="46" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td background="image/tejiaoshangpin.jpg">&nbsp;</td>
  </tr>
</table>
<%
List list =productionDao.productionShow();
for(int i=0;i<list.size();i++){
  ProductionInfo info=(ProductionInfo)list.get(i);
%>
<table width="351" height="101" border="0" align="center" cellpadding="0" cellspacing="0">  <form name="form" method="post" action="addProduction.jsp">
  <tr align="center" bgcolor="#EFEFEF">
    <td width="167"  rowspan="3"><img src="<%=info.getPhoto()%>" width="150" height="88"></td>
    <td width="168" height="30"><%=info.getName()%>
      <input type="hidden" name="name" value="<%=info.getName()%>">
      <input type="hidden" name="price" value="<%=info.getPrice()%>">
      <input type="hidden" name="photo" value="<%=info.getPhoto()%>">
      <input type="hidden" name="id" value="<%=info.getId()%>"></td>
  </tr>
  <tr align="center">
    <td height="30" bgcolor="#EFEFEF"><%=info.getPrice()%>元</td>
  </tr>
  <tr align="center">
    <td height="30" bgcolor="#EFEFEF">
      <input type="submit" name="Submit" value="购买">   </td>
  </tr> </form>
</table>
<%}%>
</body>
</html>
那位帮忙看看啊!非常感谢!!

解决方案 »

  1.   

    @ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> 
    <%@ page import="com.dao.ProductionInfo"%> 
    <%@ page import="java.util.*"%> 
    <jsp:useBean id="productionDao" scope="request" class="com.dao.ProductionDao"/> 
    class="com.dao.ProductionDao"  可能是你没进入这个包吧.
    加一句试试  <%@ page import="com.dao.ProductionDao"%> 
      

  2.   

    useBean标签属性class com.dao.ProductionDao无效
    有没正确配置该JavaBean
      

  3.   

    The value for the useBean class attribute com.dao.ProductionDao is invalid.
    没引进com.dao.ProductionDao这个包.