Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error class not found

 
bibin sk
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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.
 
Shripad Bokil
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic