1. place the class file insode your WEB-INF/clasess directory, not public_html 2. import statements refer to a fully qualified class name, not a file name with path and everything. 3. there should be a compliance between a package name and directory structure. For example, if your class is a part of a package called mypackage, then it should reside inside directory WEB-INF/clases/mypackage, and you should use import="mypackage.ScrapBook". Besides, Weblogic 5.1 does not allow using JavaBeans from within a JSP that belong to the default package. This might be a bug or a spec dictation (stranger things have been recorded), so you may consider using a package for your class. zm.
-----Original Message----- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Gardner Monte Sent: Tuesday, January 15, 2002 9:59 PM To: [EMAIL PROTECTED] Subject: Importing my Own class I rent space on a commercial Tomcat JSP-Enabled server. I have a JSP page in the directory /usr50/home/mgardne/public_html/jsp/pictures.jsp I have a Class file in the directory /usr50/home/mgardne/public_html/servlets/ScrapBook.class The ScrapBook class is not part of any package. I would like to import the ScrapBook class into my JSP code so that I can instantiate objects of that type. In the Archives someone stated that you could import a class file by using the actual path like this <%@ page import="/usr50/home/mgardne/public_html/servlets/ScrapBook" %> but when I tried to run that code I got an error. My web host provider generally doesn't let me change class path settings, or put my own classes in the class path, so I was wondering if there was a direct way of telling the JSP engine where my class file is located. --Monte Glenn Gardner =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
