Home
Post Archive
Syndication
Contact
Search

Recent Posts
Consolidate Your Bills
Credit Shelter Trust
Basketball Scholarships
Iso Audit Training
Investment Guide
Living Will Attorney
Agedcare
Banking Certification

Other Sites
Moneymakers Etc
Investment Boss
Loan Watchers
Insurance Fortune
Galactic Insurance
Drink Aficionado
Worldwide Snacks
House Divine
Bake Things
Blood Sucking
Food Wick
Lets Food!

Marketplace

1shoppingcart

1shoppingcartI use my program JavaBeans in JSP, it does not work?

This is my program which is part of a program to purchase online:
Add to <title> <panier / title>
> <% @ 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 cart = null;
if (session.getAttribute ("cart") == null)
(
cart = new ArrayList ();
)
else
(
cart = (ArrayList) session.getAttribute ("cart");
)
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.js ...
Generated servlet error:
Product can not be resolved to a type.

I guess it was because the java should be in WEB-INF/classes or in a jar files in WEB-INF/lib.

Posted on February 22, 2010.
Share |

Comments

There are no comments.

Leave a Comment

Your Name
Your Email
Comments
Human Check. Type 6485.