I believe there is a bug in the jswdk, where "import" doesn't work, but "imports"
does.

so
<%@ page import="skiclub.*" %>

should be

<%@ page imports="skiclub.*" %>

Cesar Maiorino
[EMAIL PROTECTED]


Lumby Paula wrote:

> I have a demo web site that I developed about two months ago using the JSP
> reference implementation 1.0. I moved most of it successfully to the JSWDK,
> except now the JSPs don't work.  It seems that the JSPs cannot find bean classes
> now.
>
> For this test, I am using default.cfg unmodified on Windows 98. I installed the
> JSWDK into the default directory, and reproduced the file structure that I had
> in the JSP reference installation. I classes directory in jswdk-1.0-ea, and put
> all my classes into it. I put all JSP sources and HTML sources in to the
> webpages subdirectory, and servlets into the webpages/web-inf/servlets
> subdirectory.
>
> Now the servlets run, and use beans and other classes in the classes
> subdirectory. The servlets call JSPs and the JSP call servlets. All is well as
> long as the JSPs do not use bean classes in the classes  subdirectory. Then I
> get a 500 error and a message that the bean classes are not found. For example,
> below is a JSP that no longer works.
>
> This exact code works in the JSP reference implementation 1.0. The classes
> skiclub.ClubMember and skiclub.SkierInfo are in the skiclub package  ( in
> skiclub subdirectory of classes). The classes directory is on the CLASSPATH
> because startserver.bat adds it (although the directory classes did not exist
> until I created it). The servlets can find skiclub.ClubMember. Why can't the
> JSPs find skiclub.ClubMember? Instead, they do not compile successfully.
>
> What has changed to stop the following from working?
>
> <HTML>
> <HEAD>
>
> <META NAME="Pragma" CONTENT="no-cache">
> <META NAME="Cache-Control" CONTENT="no-cache">
> <META NAME="Expires" CONTENT="0">
>
> <%@ page import="skiclub.*" %>
> <jsp:useBean id="tripInfo" class="skiclub.SkierInfo"    scope="session" />
> <jsp:useBean id="member" class="skiclub.ClubMember"    scope="session" />
>
> <jsp:setProperty name="tripInfo" property="id"  value="<%= ( (ClubMember)
> member) .getId() %>" />
>
> <TITLE>Ski Club Member Home Page</TITLE>
> </HEAD>
>
> <BODY  BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#990099" 0>
> <CENTER>
> <IMG  SRC="/skiclub/images/SkiClub.gif"  ALT="Near Hills Ski Club ">
> </CENTER>
> <h3>Hello
> <%= member.getFirstName()+ "," %>
> </h3>
> <CENTER>
> <TABLE BORDER=0 WIDTH=300 BGCOLOR=#DDDDFF>
> <TR><TD ALIGN=CENTER>
> You have booked <strong>
> <jsp:getProperty name="tripInfo" property="numTrips" />
> </strong>trips.</p>
> <PRE><STRONG>
> <%= tripInfo.getTripList() %>
> </STRONG></PRE>
> </TR></TD></TABLE>
> </CENTER>
> <jsp:setProperty name="tripInfo" property="id"
>    value="0" />
> <p>
> <strong>You may now:</strong>
> <ul>
> <li><a href="/servlet/skiclub.BookingServlet"> Update ski trip bookings</a></li>
> <li><a href="/servlet/skiclub.UpdateServlet">  Update your registration
> information</a></li>
> <li><a href="/skiclub/index.html"> Return to Near Hills Ski Club home
> page</a></li>
> </ul>
> </p>
> </BODY>
> </HTML>
>
> Paula Lumby
> IBM VisualAge for Java/C++/RPG Services
> tel:   448-2517        (T/L) 778-2517
> Room:  2G42C      2G/KB4/1150/TOR
> e-mail:                     [EMAIL PROTECTED]
>
> External Address:
> IBM Toronto Laboratory
> 1150 Eglinton Avenue East
> Toronto, Ontario, Canada, M3C 1H7
>
> FAX:  (416) 448-4414
>
> ===========================================================================
> 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".

===========================================================================
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