Difference between revisions of "Request Object"

From AgileApps Support Wiki
imported>Aeric
 
imported>Aeric
Line 2: Line 2:
The <tt>request</tt> object is available to any JSP [[Page]]. It contains information provided when the HTTP request is made.
The <tt>request</tt> object is available to any JSP [[Page]]. It contains information provided when the HTTP request is made.


When a JSP page is invoked by the platform, it contains identifiers for the record that was active when the JSP page was launched. Those identifiers can then be used with the [[REST API:record Resource| REST record Resource]] or [[Java API:Record Handling|Java Record Handling] APIs to obtain further information from the record.
When a JSP page is invoked by the platform, it contains identifiers for the record that was active when the JSP page was launched. Those identifiers can then be used with the [[REST API:record Resource| REST record Resource]] or [[Java API:Record Handling|Java Record Handling]] APIs to obtain further information from the record.


Record-identifying information is available when:
Record-identifying information is available when:

Revision as of 18:10, 12 October 2011

The request object is available to any JSP Page. It contains information provided when the HTTP request is made.

When a JSP page is invoked by the platform, it contains identifiers for the record that was active when the JSP page was launched. Those identifiers can then be used with the REST record Resource or Java Record Handling APIs to obtain further information from the record.

Record-identifying information is available when:

To obtain the identifiers from the request object:

<syntaxhighlight lang="java" enclose="div">

<%

 String object_id = request.getParameter("object_id");
 String record_id = request.getParameter("record_id");

%> </syntaxhighlight>

To list all of parameters available in the request object and display their values:

<syntaxhighlight lang="java" enclose="div">

<%

 String[] params = request.getParameterValues();
 for (int i=0; i<params.length; i++)
 {
   String paramName = params[i];
   String paramValue = request.getParameter( paramName );
 }

%> </syntaxhighlight>