Creates an EL variable that references the specified component property or page parameter.

   source-value var-spec [data-type]



Specifies the value sources as a JavaBean Component, Page Parameter, or Static value, as follows:

  • bean="nucleus-path/component-name"

  • param="param-name"

  • value="static-value"


An EL variable or scripting variable that is defined with one of these attributes:




Names an EL variable. When you use var, you can set its scope attribute to page, request, session, or application. The default scope is page. For more information, see EL Variable Scopes.


Names a scripting variable that scriptlets and expressions can access at runtime.


By default, the variable that is created by dsp:getvalue is of type java.lang.Object. You can set the variable to a different type through the vartype and idtype attributes, which qualify the var and id attributes, respectively. For example, if you set the EL variable to a page parameter that holds a string, set its vartype attribute to java.lang.String. This enables the returned value to execute string-specific methods without explicit typecasting.


<dsp:getvalueof var="backgroundcolor" bean="Profile.preferredColor"
   <body bgcolor="${backgroundcolor}" >

In this example, the tag sets the backgroundcolor attribute to the value held by the preferredColor property of the Profile component. The preferredColor value is kept as a String. The EL variable renders the backgroundcolor value so the current page background color is set to it.

Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices