I'm trying to write a JSP page that will import a class and it's not working.  I'm 
using the reference implementation 1.0 on a Red Hat 6 Intel Linux box with the 
Blackdown JDK 1.1.7 v3.  My code is at the bottom, followed by the error message.  If 
I replace the declaration "Hashtable x;" with "java.lang.Hashtable x;" everything 
works fine, but I'd like to be able to import the class and do things the right way.

Looking at the .java file that the jsp page is translated to, I see that what I put in 
the "page import" parameter is not actually being translated to an "import" statement 
in the .java file.  I was under the impression that the "page import" tag did in fact 
actually import classes for use in the jsp page.  Am I mistaken, or is there a problem 
here?

Any help would be greatly appreciated, Thanks
--Tod Liebeck, [EMAIL PROTECTED]

=========BEGIN CODE===============================
<%@ page language="java" import="java.util.*" %>

<%
    Hashtable x;
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title></title>
</head>


<body>
If you can see this, it worked.
</body>

</html>
=======END CODE=-=================================

=======BEGIN ERROR================================
work/%3A8080%2F/y_jsp_2.java:47: Class 
home.endo.jsp.jswdk_0002d_00031_0005f_00030_0002dea.webpages.admin.example.Hashtable 
not found in type declaration.
                    Hashtable x;
                    ^
1 error
Unhandled error! You might want to consider having an error page to report such errors 
more gracefully
com.sun.jsp.JspException: Compilation failed
        at com.sun.jsp.compiler.Main.compile(Main.java:248)
�09at com.sun.jsp.runtime.JspLoader.loadJSP(JspLoader.java:117)
        at 
com.sun.jsp.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:71)
        at com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:79)
        at com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:180)
        at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:219)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
        at com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:154)
        at com.sun.web.core.Context.handleRequest(Context.java:412)
        at com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:138)

=======END ERROR==================================

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to