This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Custom tag handler, the usage of doTag() method.

 
Chinmaya Chowdary
Ranch Hand
Posts: 432
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, In custom tag handling, the doTag() uses getJspContext() to get the PageContext object, through it, it will get the jspwriter by calling getOut() method, uses write() method and writes to the response object and the output can be seen through browser. My question is, the custom tag handler (which extends SimpleTagSupport) is just like plain old java class. How it will get PageContext, who sets it, because of it, we are able to see the output through browser. Can you please tell me in detail, the underline mechansim? Thankyou.
 
udaykumar maddigatla
Ranch Hand
Posts: 69
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
These tag classes will be invoked when we write a tag in the jsp page. That means when the ime of calling the tag it got the instance of JspContext object.

Observe that Your Tag class will extends one of the TagClass like SimpleTagSupport or TagSupport or BodyTagSupport.

 
Chinmaya Chowdary
Ranch Hand
Posts: 432
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your help.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic