Page 1 of 1

About Question com.enthuware.ets.scwcd.v5.2.346 :

Posted: Thu May 05, 2011 1:47 pm
by max2fl
Hi,

correct answers are page and include.

the answers aren't correct(taglib and include), for instance I have mytag.tagx file:
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
<jsp:directive.tag pageEncoding="UTF-8"/>
<jsp:directive.attribute name="message"/>
<jsp:directive.tag display-name="mytag"/>
<jsp:directive.include file="mytag1.tagx"/>
</jsp:root>
and mytag1.tagx
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
<jsp:text>${message}</jsp:text>
</jsp:root>

Only the following directives are valid for tag files:

taglib, include, tag, attribute, variable.


I can use directives include, page, tag(not taglib!!!!), attribute, and variable.

Re: About Question com.enthuware.ets.scwcd.v5.2.346 :

Posted: Thu May 05, 2011 1:53 pm
by max2fl
In two words: correct answers are page and include. taglib isn't valid directive for tag file

Re: About Question com.enthuware.ets.scwcd.v5.2.346 :

Posted: Sun Oct 26, 2014 12:53 pm
by bluster
Given the two comments above, and to clarify for those who may wish to confirm this, page is not an applicable directive for tag files.

Paraphrasing from the hard-to-paste table JSP.8-1 from V.2 of the spec, JSP.8.5, page 215 in my copy:
Directive page is not available. A tag file is not a page. The tag directive must be used instead. If this directive is used in a tag file, a translation error must result.
This is not a bad place to visit, if one wishes to verify what directives are available, and why. All are listed and explained in detail.

Re: About Question com.enthuware.ets.scwcd.v5.2.346 :

Posted: Tue Oct 28, 2014 8:51 pm
by admin
Fixed.
Thank you for your feedback!