我的tomcat以前很好用,近来可让我头大了!
Maker 2003-04-08 12:04:56 我的tomcat以前很好用,近来可让我头大了!
我的tomcat装在win 2000平台上,当我运行一jsp页面时,老是不能编译.class文件!!!不知道怎么办啊!!!
我的这个jsp页面是:
<%@ page import="CartItem" %>
<-- declare two shopping cart items -->
<jsp:useBean id="item0" class="CartItem" scope="session" >
<jsp:setProperty name="item0" property="itemName" value="Carrots" />
<jsp:setProperty name="item0" property="pricePerItem" value=".34" />
</jsp:useBean>
<jsp:useBean id="item1" class="CartItem" scope="session" >
<jsp:setProperty name="item1" property="itemName" value="Red Peppers" />
<jsp:setProperty name="item1" property="pricePerItem" value="2.49" />
</jsp:useBean>
<%-- forward control to the template page --%>
<jsp:forward page="ShoppingCartTemplate.jsp" >
<jsp:param name="header" value="header.html" />
<jsp:param name="tableCaption" value="Produce Purchases" />
<jsp:param name="action" value="ResultPage.jsp" />
<jsp:param name="footer" value="footer.html" />
</jsp:forward>
CartItem.java是:
public class CartItem
{
private int numItems = 0;
private double pricePerItem = 0.0;
private String itemName = null;
public CartItem()
{
}
public void setNumItems(int numItems)
{
this.numItems = numItems;
}
public int getNumItems()
{
return this.numItems;
}
public void setPricePerItem(double pricePerItem)
{
这个文件我编译了,并放在相应的位置。