Thanks John,
That was my problem!
Bruce
-----Original Message-----
From: John Bxdker [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 16, 1999 10:33 AM
To: [EMAIL PROTECTED]
Subject: Re: Newbie (trying) to use a bean
Hi Bruce
When your bean is not in a package you have to import it.
Add the following line to your jsp file:
<%@ page import="MediaLibData" %>
That should do the trick !
- John.
"Hopkins, Bruce E" <[EMAIL PROTECTED]>@JAVA.SUN.COM> on
15-11-99 21:36:33
Please respond to "Hopkins, Bruce E" <[EMAIL PROTECTED]>
Sent by: A mailing list about Java Server Pages specification and
reference <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc:
Subject: Newbie (trying) to use a bean
Hi all,
I'm trying to use a bean in my jsp file. It seems as if that the engine
can't find my bean's class file. Here's my jsp code:
------------------------------------------
<%@ page language ="java"
%>
<jsp:useBean id="MediaLibData" class="MediaLibData" scope="page"/>
<html><head><title>JSP Test</title></head>
<body bgcolor="#FFFFFF">
<select name="select">
<%
MediaLibData.getEngineerNames();
%>
</select></body>
</html>
------------------------------------------
I put my bean's class file in a directory, and then I added that directory
to the classpath before I started the "startserver.bat" file. My bean is
not part of a package or anything.
All of the examples from the JSWDK-1.0 work fine. Also, if I don't use a
bean, but just use a scriplet, then that jsp file compiles and work fine as
well.
Is my JSP code bad, or am I not putting my bean where it should be?
Any help will be GREATLY appreciated.
Thanks,
Bruce
===========================================================================
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
