wood burning stoves 2.0*
The moose likes JSP and the fly likes Getting parameters from a SimpleTagSupport derived handler Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Getting parameters from a SimpleTagSupport derived handler" Watch "Getting parameters from a SimpleTagSupport derived handler" New topic
Author

Getting parameters from a SimpleTagSupport derived handler

Karl Krasnowsky
Ranch Hand

Joined: Jan 16, 2009
Posts: 97
I thought this would be relatively simple, but now I'm not so sure.
In a doTag() block of my handler I want to detect if a certain parameter had been passed into the page via url, e.g.,



I want to find the showkey parameter, but I don't see anything in the SimpleTagSupport that would provide such access.

There must be a way to do this?

Thanks,
K2


[SCJP 6]
[SCBCD in process]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60822
    
  65

All this information is on the request, which can be obtained from the PageContent.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Karl Krasnowsky
Ranch Hand

Joined: Jan 16, 2009
Posts: 97
Bear Bibeault wrote:All this information is on the request, which can be obtained from the PageContent.


Yea, got that, but how do you get to the PageContent from the SimpleTagSupport? [before I searched coderanch]

Okay... so I found a reply from you for this very question a real long time ago here:

http://www.coderanch.com/t/288360/JSP/java/SimpleTagSupport

I should have done a bit more searching...

thanks!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60822
    
  65

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Getting parameters from a SimpleTagSupport derived handler
 
Similar Threads
How to Write Such a Custom Tag
**SOLVED** tag handler outputting localised text - how to do this?
Accessing webapp context parameters from a custom tag handler
keyboard events
Cannot compile Tag Handler