Ha Duy Thien wrote:
> Dear JSP experts around the world
>
> I am just a JSP beginer so it seems that everything is very
> difficult.
>
> I am learning JSP from the book Java Server Page by O'reilly. In that
> books they have examples that use java bean (<%jsp:useBean id =
> class= %>).

The syntax is actually <jsp:useBean id="foo" class="com.Bar" />

> Does any one know how to config in order to use Java Bean . I don't
> know which directory the JSP page will look for code of Java Bean .

All Java classes (including beans) should be stored either under
WEB-INF/lib (if packaged in a JAR file) or in a subdirectory of
WEB-INF/classes that mirrors the package structure. Note that a bean
_must_ be in a package if you use JDK 1.4, and it's strongly recommended
to put it in a package even for earlier JDKs.

Assuming you refer to the second edition of my book, I suggest you
take a closer look at Chapter 5 where I describe the web application
directory structure (including WEB-INF/lib and WEB-INF/classes).

Hans
--
Hans Bergsten                                <[EMAIL PROTECTED]>
Gefion Software                       <http://www.gefionsoftware.com/>
Author of O'Reilly's "JavaServer Pages", covering JSP 1.2 and JSTL 1.0
Details at                                    <http://TheJSPBook.com/>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com

Reply via email to