ATG Terminology Can Be Tricky – dsp:getvalueof

ATG terminology can be tricky. One of these tricky term is getvalueof in dsp tag. If you are new to ATG, you may think this is getting something, however it actually creates a variable in a given scope or in page scope if none specified.

With <dsp:getvalueof you can create a constant, param or a constant value.

Defining constant value:

<dsp:getvalueof var=”age” value=”25″ />

The equivalent in JSP:
String age = “25”;

Defining a parameter in request scope:
<dsp:getvalueof var=”age” param=”customerAge” scope=”request” />

The equivalent in JSP:
String age = request.getParameter(“customerAge”);

Defining a bean:
<dsp:getvalueof var=”employee” bean=”com.mycompany.Employee” />
The equivalent in JSP:
Employee employee = new Employee();

Advertisements
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

3 Responses to ATG Terminology Can Be Tricky – dsp:getvalueof

  1. makbat says:

    Wonderful explanation ..

  2. kavimani says:

    marvelous explanation boss..keep up the gud work…

  3. amogh says:

    great help

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s