This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

error class not found  RSS feed

 
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!