• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting Request Object Inside SimpleTag

 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My tag handler extends SimpleTagSupport. However, SimpleTagSupport only provides a getJspContext() and JspContext doesn't have .getRequest() method. In that case, how do we retrieve the current request object?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JspContext passed to the tag is actually an instance of PageContext. You need to upcast the return value of getJspContext().
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!