aspose file tools*
The moose likes JSP and the fly likes getJspContext().setAttribute problem. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "getJspContext().setAttribute problem." Watch "getJspContext().setAttribute problem." New topic
Author

getJspContext().setAttribute problem.

geet kaur
Ranch Hand

Joined: Sep 03, 2008
Posts: 78
I was just going through the doTag() method Where we set the attribute as in getJspContext().setAttribute("movie",some value).I just wanted to know what would be the scope of the movie attribute??


I mean is it related to the tag only or can we use it somwhere else in jsp as well??
Piyush Joshi
Ranch Hand

Joined: Jun 10, 2011
Posts: 207

It will have PageContext.PAGE_SCOPE
There is an overloaded method setAttribute(String name,Object value,int scope) which sets the given attribute in given scope.


Piyush
geet kaur
Ranch Hand

Joined: Sep 03, 2008
Posts: 78
so it means..we can use this attribute outside the tag as well right??
Piyush Joshi
Ranch Hand

Joined: Jun 10, 2011
Posts: 207

yes right.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getJspContext().setAttribute problem.
 
Similar Threads
please help me with this app - URGENT !
unable to initialize a list from custom simple tag handler
Attribute does not exist when you invoke tag(pg 509 HFSJ)
Custom Tag Attribute problem
problem from HFSJ book