Dear All,
I tried to change from arraylist to hashtable. i changed because I want to see how the same thing is possible with hastable. I am a beginner and I am learning how to do same thing using different collections.
I am getting the following error in the
SERVLET CODE. Please help.
ERROR MESSAGE:
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.Error: Unresolved compilation problems:
The method addItem(
String, LineItem) in the type Cart is not applicable for the arguments (LineItem)
The method removeItem(String, LineItem) in the type Cart is not applicable for the arguments (LineItem)
music.cart.DisplayCartServlet.doPost(DisplayCartServlet.java:87)
music.cart.DisplayCartServlet.doGet(DisplayCartServlet.java:114)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.20 logs.
Apache Tomcat/6.0.20
--------------------------------------------------------------------------------
LineItem.java Code
Cart.Java Code
---------------------------------------------------------------------
SERVLET CODE:
-----------------------------------------------------------------------------------
JDBC CODE: