how can we retrieve the values in jsp by using custom tags
Answers were Sorted based on User's Feedback
Answer / nowsheen
I think using EL expressions can be used .
El expressions internally uses getAttribute method to
retrive the values in jsp by using custom tags
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / shiraz khan
Tag handler class is not a servlet or jsp, so it doesn't
have access to many implicit objects which are available in
jsp. It, however, has a reference to PageContext using which
we can call :
pageContext.getAttribute(name) // looks in page scope only
pageContext.getAttribute(name,scope) // looks in specified
scope
alternatively we can also also get references to other
scopes using :
pageContext.getRequest()
pageContext.getSession()
pageContext.getServletContext()
pageContext.getServletConfig()
And yes, this pageContext implicit object is given to the
tag class by container, during initialisation of this tag
class when setPageContext(PageContext) is called by container
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the different jsp element types?
What do you know about writing custom jsp tags?
How can we avoid direct access of jsp pages from client browser?
Which jsp life cycle is in correct order?
When does a container initialize multiple jsp objects?
Which is mandatory in tag in jsp?
What is the use of requestdispatcher?
How do I mix jsp and ssi #include?
Explain jsp and tell its uses?
Hi, We developed a webpage using jsp for our team, now we need to know who are employees opening this page,i.e, we need to get the windows user name when ever he/she open the page and stores into a variable. Plz help on this
How to get value from java to jsp page?
difference betwwn 16 bit and 32 bit