aspose file tools*
The moose likes JSP and the fly likes <c:set > - Doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "<c:set > - Doubt" Watch "<c:set > - Doubt" New topic
Author

<c:set > - Doubt

Dinesh Andavar
Greenhorn

Joined: Jun 29, 2013
Posts: 12
I read that when setting attributes using <c:set var ="attributeName" value = "attributeValue"> it deletes the attribute if the value is NULL.
My question is if i donot give a scope it first looks in the page Scope. Assume the attributeValue is NULL. It deletes the attribute from the Page Scope
What about other scopes. What will it do if there are attributes with same name in other scopes like request, session and application?
Will they be deleted too??
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 1973
    
    7

To my understanding, the <c:set> tag default scope is "page". There is a scope attribute. Unless you specific this attribute, you are only accessing the page scope's variables.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60071
    
  65

What does the JSTL Specification have to say on the matter?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: <c:set > - Doubt
 
Similar Threads
clarification with c:set
c:set var question
Confusion about "scope" attribute
What if the value is null and the var does not exist in the particular scope for c : set?
Headfirst Servlets and Jsp <c:set> pg.457