Category:Request-Configuration

From Plex-XML
(Redirected from Request Configuration)
Jump to: navigation, search

Contents

Definition

The request configuration is a very important part of Plex-XML.

The definition of Web- and Job-Requests describes the interface and the behavior between external requests, Servlet/Plex-Functions and the response. Most definitions will be done in the Web-Request part of the request-config file.


The name of the main request-config file is defined in the servlet part of your web.xml.

  • We usually use the name /WEB-INF/request-config.xml
  • You are able to combine different request configuration files by the <import> element.
<import url="/WEB-INF/abstract-request-config.xml"/>


Each of the request configurations described below has to be framed by the <request-config> element.

<webrequest>

The <webrequest> element is used for the definition of requests that will be called by URL e.g. form a browser or another application.

See Web-Requests for details.

<abstract-webrequest>

The abstract-webrequest element is used to define abstract webrequest which could be inherited by real webrequest definitions

  <abstract-webrequest name="GetUserFuncFormats" default="true" position="after|before">
    <request name="GetUserFuncFormats" extends="getFormats" />
  </abstract-webrequest>
Attributes
default : true|false can be true for ONE abstract-webrequest which is used as a inheritance base for all Web-Requests without the usedefault attribute set to "false", OPTIONAL
name : used by the extends attribute of a web request to inherit from this instead of the default, REQUIRED
position : after|before indicates where requests defined here should be appended or prepended to the requests defined in the concrete web request, OPTIONAL

<jobrequest>

The <jobrequest> element is used for periodic scheduled requests.

See Job-Requests for details.

<abstract-request>

The <abstract-request> element is used to define a parameter structure that should be reused in different web-requests.

See Abstract-Requests for details.

<default-request>

The default request is executed when you don't have a request name in a URL.

You could use the default request also for definition of your start page. But in most cases that will be done by an index.html page.

<default-request>Start</default-request>

<notfound-request>

The notfound request is executed when the given request name e.g. ...aServlet?request=fooNoRequest in a URL can't be found.

<notfound-request>UnderConstruction</notfound-request>

<error-request>

The error request is executed when some of the request parameters have been tampered. the only parameter for the request is a message named "exception", which is passed to the response so it can be displayed.

<error-request>SecurityError</error-request>

<default-response>

The default response is used to define elements (in most cases session values) that should be attached to every XML response. In the example below the session.locale is attached to very XML response.

<default-response>
  <plex-parameter type="session" name="Session-Locale">session.locale</plex-parameter>
  <plex-parameter type="session" name="Session-DateFormat">DateFormat</plex-parameter>
  <plex-parameter type="session" name="Session-UserID">UserID</plex-parameter>
</default-response>

XML response

  <session-attribute name="Session-Locale" value="de" /> 
  <session-attribute name="Session-DateFormat" value="dd.MM.yyyy" /> 
  <session-attribute name="Session-UserID" value="FOO-User" /> 

<default-parameter>

The default-parameter element is used to define parameter that should be passed with every request.

<default-parameter>
  <plex-parameter type="session" name="ControlInput_SessionID">session.ID</plex-parameter>
  <plex-parameter type="request" name="ControlInput_SECIPAddress">remote-address</plex-parameter>
</default-parameter>

<default-stylesheet>

The default-stylesheet element is used to define the last XSLT filter that will be used in dependency of the 'style' parameter given in the request.

E.g. if your request has a parameter like '...aServlet?request=FooFB&style=pdf...' your response will be a PDF-File prepared by the '/WEB-INF/resources/common_fo/createpdf.xsl' XSLT as last filter.

<default-stylesheet>/WEB-INF/resources/@common_html@/aaBaseDoc.xsl</default-stylesheet>
<default-stylesheet type="tab">/WEB-INF/resources/@common_html@/aaBaseDocAJAX.xsl</default-stylesheet>
<default-stylesheet type="ajax">/WEB-INF/resources/@common_html@/aaBaseDocAJAX.xsl</default-stylesheet>
<default-stylesheet type="pdf" mime="application/pdf">/WEB-INF/resources/common_fo/createpdf.xsl</default-stylesheet>

Pages in category "Request-Configuration"

The following 8 pages are in this category, out of 8 total.

A

J

R

S

U

W

W cont.

Personal tools