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 |
Show attributes of page directives.
What is the difference between java servlet and jsp?
What is c tag in jsp?
Mention the scope values for <jsp.usebean> tag.
i need the source code for opening a word document in java
What is difference between html and jsp?
Why do we need servlets and jsp?
what is jsp? a technology ,a language or something else ?
Explain translation phase.
HOW CAN WE COMPARE TWO PDF FILES USING JSP ?
how the jsp file is compiled?
4 Answers College School Exams Tests, Persistent,
What information is needed to create a tcp socket?