this is my program which is a part of a online shopping program:
add to cart
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="onlinestorebeans.Product" %>
<%@ page import="java.util.*" %>
<%
String pid = request.getParameter("PID");
String pname = request.getParameter("PNAME");
String price = request.getParameter("PPRICE");
Product p = new Product();
p.setId(Integer.parseInt(pid));
p.setName(pname);
p.setPrice(Double.parseDouble(price));
ArrayList basket = null;
if(session.getAttribute("basket") == null)
{
basket = new ArrayList();
}
else
{
basket = (ArrayList) session.getAttribute("basket");
}
basket.add(p)
session.setAttribute("basket", basket);
response.sendRedirect("shopping.jsp");
%>
my error:
An error occurred at line: 7 in the jsp file: /JSPcourse/jsp_shoppingcart/addtocart.jsp
Generated servlet error:
Product can't be resolved to a type.
2007-02-20
08:49:58
·
1 answers
·
asked by
vestabs
1