• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confusion on page directive in spec

 
Chandrakanth
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what do they mean by this statement
JSP.1.10.1
There shall be only one occurrence of any attribute/value pair defined by this directive in a given translation unit, unless the values for
the duplicate attributes are identical for all occurrences.
The <b>import and pageEncoding attributes are exempt from this rule</b> and can appear multiple times.
Multiple uses of the import attribute are cumulative (with ordered set union semantics). <b>The pageEncoding attribute can occur at most once per file </b>(or a translation error will result), and applies only to the file in which it appears.

why they have given contradicting statemens for the pageEncoding attribute,
once they say it can appear multiple times, and once they say it can occur at most once per file.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once per file, but multiple times in a translation unit.
You can have it in a.jsp and b.jsp. If a.jsp includes b.jsp, no problem.
 
Chandrakanth
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thx for the reply
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic