This has to do with understanding what import truely does:
First of all if your class "Product" is on the classpath then it does not need an
import.
The purpose of using the import is to avoid writing the full package name and class
when referencing the class.
For example, if your "Product" class was in a package "com.yourcompany.beans", then
you could instantiate this class
by saying
com.yourcomapany.beans.Product prod = new com.yourcomapany.beans.Product();
if you had included an <%@ page import="com.yourcomapany.beans.*" %> then the line
above could have been written:
Product prod = new Product();
Import does not #include classes in to your application. It actually helps the
compiler find your classes.
Make sure your Product class is on the classpath.
If anyone else has anything to add please do.
Hope this helps,
Abraham
-----Original Message-----
From: Sachin S. Khanna [SMTP:[EMAIL PROTECTED]]
Sent: Friday, November 05, 1999 3:31 AM
To: [EMAIL PROTECTED]
Subject: Problem
Hi Guys,
Well i'm facing a funny problem.
When i import a custom class with the following code:
<%@ page import = "Product" %>
everything is alright.
This would sugges that the jspengine is able to find the above
Product.class, but amazingly when i try to instantiate an object of this
class, i get ClassDefNotFound Error.
Can you guys tell me why such a thing is happening.
Have a nice day.
With regards,
Sachin S. Khanna.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html