File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes error  class not found Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "error  class not found" Watch "error  class not found" New topic
Author

error class not found

bibin sk
Greenhorn

Joined: Mar 04, 2001
Posts: 6
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

Joined: Jan 30, 2001
Posts: 13
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.
 
IntelliJ Java IDE
 
subject: error class not found
 
Threads others viewed
Calling A Class From JSP
help for shopping cart
Session within session
Shopping cart application using struts
Servlets