• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Template Text

 
Shiang Wang
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is template text in jsp ? Could someone point me to some references? Also is jspx part of scope?

Note: I don't have the HF book. I am trying to use books targetted for SCWCD 1.3 and research new materials myself. If it doesn't work, I will have to get one soon.
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Template text is basically anything that is not JSP syntax (such as expressions scriptlets, EL syntax, etc.) Take this example:



Line 1-4, 6-8, and 12-17 are nothing but template text. Lines 5 and 10 contain both template text and JSP syntax (line 5 contains EL and line 10 contains an expression). Lines 9 and 11 contain no template text (unless you want to count the white space).
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, template text simply means texts in the page that are NOT Java related?

Nick
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nicholas Cheung:
So, template text simply means texts in the page that are NOT Java related?


Yes. HTML or JavaScript would be examples of template text.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about XML? Does it consider as template text as well?

Nick
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nicholas Cheung:
How about XML? Does it consider as template text as well?

Nick


I believe so. Anything that is not JSP syntax of some sort is considered template text. That is my inderstanding, anyway.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
um... it is difficult to say, as JSP can be in the form of XML.

Anyway, thanks Corey for clarification.

Nick
 
Bryan Basham
author
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nicholas Cheung:
How about XML? Does it consider as template text as well?

Nick


The best way to think about template text is the ask the question: Will this text be sent verbatim to the response stream?

The answer is "yes" for all static HTML, JavaScript (client-side), and even XML.

The answer is "no" for scripting code, EL code, and action tags (both standard and custom).

-Bryan
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bryan for the clarification.

Nick
[ October 22, 2004: Message edited by: Nicholas Cheung ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic