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.
posted 6 years ago
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.