Meaningless Drivel is fun!*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes How to get attribute in a JSP using  EL pageContext Implicit Object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "How to get attribute in a JSP using  EL pageContext Implicit Object" Watch "How to get attribute in a JSP using  EL pageContext Implicit Object" New topic
Author

How to get attribute in a JSP using EL pageContext Implicit Object

Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634



I am able to call getMethod of HttpServletRequest using EL pageContext Object
but unable to call the getAttribute of HttpServletRequest using EL pageContext Object.

How to get request attribute in a JSP using EL pageContext Implicit Object ?


OCPJP 6.0 93%
OCPJWCD 5.0 98%
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61106
    
  66

You don't. Just use one of ${test} or ${requestScope.test}


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

Thanks Bear.
I was just trying different ways to retrieve it.
I failed to find any such thing in Specification's.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61106
    
  66

Why should there be?
Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

As there are Rules corresponding to these things in Specification,I thought it may be also there.
Anyways,Thanks for the clarification.
Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

Is there some reason due to which its not allowed ?
 
Don't get me started about those stupid light bulbs.
 
subject: How to get attribute in a JSP using EL pageContext Implicit Object