请问是哪里出错了

08-09-18 wangconghao
错误提示信息:

javax.servlet.jsp.JspException: Exception reading resource http://localhost:8080/epai/goods.do;jsessionid=2F55B99DEE83BAE0C3EB65455982672D?operate=toOnSaleGoodsList: java.io.FileNotFoundException: http://localhost:8080/epai/goods.do;jsessionid=2F55B99DEE83BAE0C3EB65455982672D?operate=toOnSaleGoodsList
	org.apache.struts.taglib.bean.IncludeTag.doStartTag(IncludeTag.java:236)
	org.apache.jsp.index_jsp._jspService(index_jsp.java:178)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
<p>

这是首页显示时出现的错误信息,与此相关的代码有:

index.jsp中的:

<div class="m_content" style="height:369px;width:340px;overflow-y:scroll;">
	<bean:include id="OnSaleGoodsList" page="/goods.do?operate=toOnSaleGoodsList" />
	<bean:write name="OnSaleGoodsList" filter="false" />
</div>
<p>

请求所到页面

on_sale_list.jsp

<logic:iterate id="item" name="list">
	<div class="goods_pic">
		<img src="${item.goodsPic}" title="${item.goodsDesc}"
			style="width:100px;border:dashed 1px green;"></img>
	</div>
	<div class="goods_info" style="border:solid 0px blue;">
		<strong>${item.goodsName}</strong>
		<br />
		<span class="info_title">卖 &nbsp; 家</span>&nbsp;
		<em>${item.usersBySalerId.userName}</em>
		<br />
		<span class="info_title">起 拍 价</span>&nbsp;
		<span style="color:green;">${item.goodsPrice}</span>
		<br />
		<span class="info_title">起拍日期</span>&nbsp;${item.beginTime}
		<br />
		<span class="info_title">终止日期</span>&nbsp;${item.endTime}
		<logic:notEmpty name="USE" scope="session">
			<logic:greaterEqual name="item" property="endTime"
				value="<%=JbUtils.now()%>">
				<logic:lessEqual name="item" property="beginTime"
					value="<%=JbUtils.now()%>">
					<logic:notEqual name="item" property="usersByBuyerId.userId"
						value="${sessionScope.USE.userId}">
						<a class="a_button"
							href="goods.do?operate=doBid&goodsId=${item.goodsId}">出价</a>
					</logic:notEqual>
				</logic:lessEqual>
			</logic:greaterEqual>
		</logic:notEmpty>
	</div>
	<logic:notEmpty name="item" property="bids">
		<div style="width:300px;padding-left:10px;">
			出价记录: [
			<span style="color:blue;cursor:hand;text-decoration: underline;"
				onclick="javascript:SwitchDisplay('div${item.goodsId}');">+/-</span>]
			<br />
			<div style="display:none;" id="div${item.goodsId}">
				<logic:iterate id="bid" name="item" property="bids">
					<em>${bid.usersByBuyerId.userName}</em>
					<bean:write name="bid" property="bidTime" format="yyyy-MM-dd hh:mm" />
					<span style="color:green;font-weight:bold;">${bid.bidPrice}</span>
					<br />
				</logic:iterate>
			</div>
		</div>
	</logic:notEmpty>
<p>

action中的:

//销售商品列表

	public ActionForward toOnSaleGoodsList(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		ActionForward af=null;
		List list=goodsBiz.getOnSaleGoodsList();
		request.setAttribute("list", list);
		af=mapping.findForward("onSale");
		return af;
	}
<p>

biz中的:

	public List getOnSaleGoodsList() throws Exception {
		Goods good = new Goods();
		return goodsDao.search(good);
	}
<p>

dao中的:

public List search(Goods good) {		
		return super.getHibernateTemplate().find("from Goods good where good.goodsStatus=1");
	}
<p>

工程采用SSH,此方法是为了在加载主页时加载所有商品列表,请高手指点.

[该贴被wangconghao于2008-09-18 16:33修改过]

banq
2008-09-19 10:38
>java.io.FileNotFoundException

include一个子jsp页面没有发现。

wangconghao
2008-09-20 14:23
<bean:include id="OnSaleGoodsList" page="/goods.do?operate=toOnSaleGoodsList" />

是这一句有问题吗?

猜你喜欢