I have asked this question many times. All the helpful suggestions are
appreciated, but I still can't get my JSPs to find bean classes. The problem
occurs instantiating the bean, even when I am sure it is on the classpath. I am
using the JSP 1.0 reference implementation. I'm beginning to suspect there is
some secret reserved naming scheme or special places to put beans. Perhaps the
good folks of SUN have hobbled this implementation deliberately because it is
meant only to be a demo.
So now I'm asking how does the JSP reference installation do it. Consider the
numguess example jsp.
The default.cfg contains the following ines which I think tell the server to
look in the jsp1.0\examples directory for documents.
server.webapp.examples.mapping=/examples
server.webapp.examples.docbase=examples
One sample jsp is in the file jsp1.0\examples\jsp\num\numguess.jsp and there is
straightforward html link to that page from the jsp1.0\webpages\index.html
through jsp1.0\examples\jsp\index.html.
The numbguess.jsp contains the lines:
<jsp:useBean id="numguess" class="num.NumberGuessBean" scope="session"/>
<jsp:setProperty name="numguess" property="*"/>
Now the num.NumberGuesBean is in the file
\jsp1.0\examples\web-inf\jsp\beans\num\NumberGuessBean.class
This string is not in the classpath. So how does the server find the class? Is
there a mapping hidden somewhere to ...\jsp\beans...?
I have tried all manner of variiations to do something similar, but always get
an exception trying to load my bean class.
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".