Hunter, I am a super-newbie, so I'm probably not fully qualified to answer
your question. But I previously had a similar problem, and no one *more*
qualified has answered your post, so I'll tell you what I had to learn the
hard way. It's a pretty basic concept that is re-iterated throughout the
spec, but sometimes the most basic concepts elude me until I've done my own
head-banging...

Declarations, directives, actions and custom tags are executed at
translation time (when the JSP page is turned into a servlet class).
Expressions and scriptlets are executed at request time. (There are
exceptions in JSP 1.2, where an attribute  in an action tag can have a
request-time value; these exceptions are listed in the 1.2 spec). So,
anyway, is it possible you are trying to call an object at translation time
that actually doesn't get instantiated until the request? You might also
want to check the spec regarding page, request, session, and application
scope. This was helpful to me in understanding when and where objects were
available to me.

Hopefully, if this is a totally off-base answer, it will encourage someone
more in-the-know to enlighten us both :-)

Regards,
Amy
[EMAIL PROTECTED]

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Hunter
Hillegas
Sent: Monday, February 12, 2001 2:00 PM
To: '[EMAIL PROTECTED]'
Subject: Strange JSP Compilation Problem


I have a JSP page that calls some objects that are in a package...

When I try to view the JSP, it generates a compile error:

org.apache.jasper.JasperException: Unable to compile class for
JSP/server/jakarta-tomcat-3.2.1/work/localhost_8080%2Fgroundswell/_0002fnews
_0002fbackend_0005flabel_0005fnews_0005fedit_00031_0002ejspbackend_0005flabe
l_0005fnews_0005fedit1_jsp_0.java:178: Undefined variable or class name:
currentNewsBean
                out.print( currentNewsBean.getRecNum() );

Okay, this looks very simple... Like I just forgot to instantiate it... The
thing is I didn't... The object gets instantiated prior to being called...
Is there anything else that could be wrong?


Hunter Hillegas, MCP
Web Engineer / System Administrator - Jacob Stern & Sons, Inc.
[EMAIL PROTECTED]
805-565-1411 PH * 805-565-8684 FAX


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

_______________________________________________
tomcat-users mailing list
[EMAIL PROTECTED]
https://mailman.real-time.com/mailman/listinfo/tomcat-users


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to