• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

error class not found

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sir
ihave created a class in directory named onlineshop called BooksDeatils for adding items to cart and in servlet named ShowCartServlet
ihave called this class as
// public class ShowCartServlet extends HttpServlet
{
public BooksDetails cart;
private HttpSession session;

public void doPost (HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
session = request.getSession(true);
cart = (BooksDetails) session.getValue(session.getId());//
but error is coming as CLASS ONLINESHOP.BOOKSdEATILS NOT FOUND IN ShowCartServlet .PLEASE TELL ME HOW TO GET RID OF THIS ERROR.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Please make sure that you have an import statement ...
import ONLINESHOP.BOOKSdEATILS at the start of your code.
The error you are getting is nothing but the compiler is not getting that perticular class.If you have imported it already then set the classpath properly.
This should solve your problem.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic