How do custom taglib fi=unctions access the request

S

Steve Lewis

title says it all -
I can define functions in taglibs but would like some of these
functions to accesss the page and request -
is there any way to do this?
 
S

Sudsy

Steve said:
title says it all -
I can define functions in taglibs but would like some of these
functions to accesss the page and request -
is there any way to do this?

Since you typically extend TagSupport, you've already got access
to pageContext. You can invoke getPage or getRequest on that
instance. Easy as pi...
 
C

Chris Smith

Sudsy said:
Since you typically extend TagSupport, you've already got access
to pageContext. You can invoke getPage or getRequest on that
instance. Easy as pi...

Or, if you don't extend TagSupport, you stach off a copy of the
PageContext in your implementation of setPageContext, and then do the
same.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top