This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes include directive Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "include directive" Watch "include directive" New topic

include directive

Jan Sterk
Ranch Hand

Joined: Jun 06, 2008
Posts: 139
Question v5.2.234 from Enthuware:

Which of the following directives are applicable only to tag files?

  • attribute
  • variable
  • page
  • include
  • import

  • Answer given: attribute, variable and include.

    But I think that the include directive can also be used in regular jsp-pages.
    [ September 02, 2008: Message edited by: Jan Sterk ]

    SCJP 1.4 (81%)<br />SCWCD 5 (95%)
    Charles Lyons
    Ranch Hand

    Joined: Mar 27, 2003
    Posts: 836
    But I think that the include directive can also be used in regular jsp-pages.
    You are correct - <%@ include file="..." %> can be used in any JSP or tag file. I use it (rarely) myself. Remember also it's a static (translation- and compile-time) import, while <jsp:include /> is dynamic (at request-time).

    Charles Lyons (SCJP 1.4, April 2003; SCJP 5, Dec 2006; SCWCD 1.4b, April 2004)
    Author of OCEJWCD Study Companion for Oracle Exam 1Z0-899 (ISBN 0955160340 / Amazon Amazon UK )
    I agree. Here's the link:
    subject: include directive
    Similar Threads
    Tag file directives and actions
    Tag file directive , from JWebplus mock exam
    Tag files and Directives
    implicit object "page"
    Can anybody give me some idea?