• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

request time expression in XML syntax format

 
Narinder Singh
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From SCWCD Exam Study Kit Hanumant Deshmukh:
In topic 12.4.2 it states
For a request-time attribute expression, we have to use %= ...%
and again in topic 13.2.4 in the 2nd question after quizlet it states
the correct syntax for a request-time
expression in XML syntax format is %= expr %. Thus, the
<jsp:include> action in the above code must be written as:
<jsp:include page="%=pageURL%" />
But in topic 13.2.3 it states
The value of the value attribute can also
be specified using a request-time attribute expression in the following way:
<jsp:include page="somePage.jsp">
<jsp aram name="name1" value="<%=someExpr1%>" />
<jsp aram name="name2" value="<%=someExpr2%>" />
</jsp:include>
If it states that for XML syntax the expression should be "%= pageURL %", then isn't the <jsp aram> tag in code from topic 13.2.3 in XML syntax format. If yes, then why does it takes the request time attribute value as "<%=someExpr%>".
Thanks in advance
 
Mark Howard
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Narinder
You can use either format, but you can't mix formats in the same JSP page.
That is, you either have all your tags in XML-format (called a JSP document), or in JSP-format (called a JSP page).
The quizlet in 13.2.4 is merely pointing out that JSP-style tags can not be used in an (XML) JSP document
Mark.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic