Hi. Can you help me with this?
I'm getting an illegal access error: try to access class Item from class Cart3
I tried importing the class Item into the class Cart3 with an import statement - got the error
I tried making Item public - got the error
I tried adding Item as a class to Cart3 - got the error
I don't know what to do. The errors come when the the line:
item = new Item item; is called in my method:
public void addItem (HttpServletRequest request, ServletOutputStream out) throws IOException
and again in my doGet:
if (operation.equalsIgnoreCase ("add" ) {
addItem (request, out);}
What am I missing? What usually causes this type of error? Where should I look?
Thanks for help.
I'm getting an illegal access error: try to access class Item from class Cart3
I tried importing the class Item into the class Cart3 with an import statement - got the error
I tried making Item public - got the error
I tried adding Item as a class to Cart3 - got the error
I don't know what to do. The errors come when the the line:
item = new Item item; is called in my method:
public void addItem (HttpServletRequest request, ServletOutputStream out) throws IOException
and again in my doGet:
if (operation.equalsIgnoreCase ("add" ) {
addItem (request, out);}
What am I missing? What usually causes this type of error? Where should I look?
Thanks for help.