日期:2014-05-19  浏览次数:20767 次

jsp感觉没出错啊,怎么老是最后一行报错。。
这是程序代码。
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <title>商品详细信息</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">
-->
<script type="text/javascript">
function forBuy(status,id){
if(status=='b'){
alert("商品暂时缺货中,暂时无法购买!");
return;
}
with(document.forms[0]){
if(isNaN(count.value)){
alert("购买的数量必须为数字");
return;
}
if(count.value.indexOf(".")==-1){
alert("购买数量必须为正整数");
return;  
}
if(parseInt(count.value)<0){
alert("购买数量必须为正整数");
return;
}
}
var f=document.forms[0];
document.forms[0].action=document.forms[0].action+"&amount="+f.count.value+"&goodsid="+id;
document.forms[0].submit();
}
function forBack(){
var f=document.forms[0];
f.action="<c:url value="/ctgMgr?act=toMain">";
f.submit();
}
</script>

  </head>
  
  <body>
  <div>
  <h3>商品详细信息</h3>
  <form action="<c:url value="/shopMgr?act=setitem" method="post" name="myform"/>">
  <input type="hidden" value="${comS.commodityId}" name="comId">
  <div id="f_row">
  <span>商品名称:</span><span>${comS.commodityName}</span> 
  </div>
  <div id="f_row">
  <span>商品价格:</span><span>${comS.commodityPrice}</span>
  </div>
  <div id="f_row">
  <span>商品状态:</span>
  <input type="text" value="${comS.commodityStatus}" name="status" disabled/>
  <span><c:if test="${comS.commodityStatus=='a'}">有货</c:if></span>
  <span><c:if test="${comS.commodityStatus=='b'}">缺货</c:if></span>
  </div>
  <div id="f_row">
  <span>商品描述:</span><span>${comS.commodityDesc}</span>
  </div>
  <div id="f_row">
  <img src="<c:url value="/pics/default-goods.jpg">" width=300 height=200 onclick=" 
  this.width=(this.width==300)?600:300; &nbs