A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Web Component Certification (SCWCD/OCPJWCD)
class in jsp useBean
Joined: Jun 15, 2004
Feb 21, 2005 06:12:00
Why does the import attribute of page directive does not work for <jsp:useBean>
I was importing a class using
<%@ page import = "beans.Person" %>
so I guessed i'd only have to do
<jsp:useBean id="person" class="Person" scope="request" />
but it gave me an error. I had to use the fully qualified name in the class property of <jsp:useBean> tag
<jsp:useBean id="person" class="beans.Person" scope="request" />
Why doesn't the page directive work here?
Joined: Sep 09, 2004
Feb 21, 2005 22:45:00
That comes from jsp spec.
for <jsp:useBean>, class and type must be fully qualified path .
i.e class="package.class" | type="package.class"
Joined: Feb 14, 2005
Feb 22, 2005 00:22:00
v2.0 Spec Pg. 1-104, Table JSP.5-1
The fully qualified name of the class that defines the implementation of the object.The class name is case sensitive.
SCJP 1.2 (88%)<br />SCWCD 1.4 (89%)<br />SCBCD (in progress)<br />SCEA (in progress)
I agree. Here's the link:
subject: class in jsp useBean
doubt on jsp:useBean tag
page import + standardAction
EL jsp:useBean question
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014