DefError File Structure
GigaSpaces
A processing unit in the space and the Magic xpa server can be configured to merge details using a system property: -Dcom.magicsoftware.xpa.DefaultErrorFormatFileName. The allowed details are listed at: <Magic xpa installation>\GigaSpaces-xpa\test\DefaultError.html as follows:
-
<!$MG_Application> : Application name (sent within the request)
-
<!$MG_Program> : Program name (sent within the request)
-
<!$MG_User > : User name (sent within the request)
-
<!$MG_ErrorCode> : Error code (sent from the Runtime engine or from the space)
-
<!$MG_ErrorText> : Error description (sent from the Runtime engine or from the space)
Broker
Mergeable HTML
The Web requester will merge details to the specified file based on the following tags, which can appear partially or completely, in any order, in the given document.
Note: The tags are identical to the tags listed below for mergeable XML documents.
<HTML>
<HEAD><TITLE>Magic Application error</TITLE></HEAD>
<BODY bgcolor=navy><BR><BR><CENTER>
<TABLE bgColor=white border=3>
<TR>
<TD width=200><B>Messaging Server</B></TD>
<TD width=250><!$MG_Server></TD>
</TR>
<TR>
<TD width=200><B>Application</B></TD>
<TD width=250><!$MG_Application></TD>
</TR>
<TR>
<TD width=200><B>Program</B></TD>
<TD width=250><!$MG_Program></TD>
</TR>
<TR>
<TD width=200><B>Error Code</B></TD>
<TD width=250><!$MG_ErrorCode></TD>
</TR>
<TR>
<TD width=200><B>Error Text</B></TD>
<TD width=250><!$MG_ErrorText></TD>
</TR>
<TR>
<TD width=200><B>Arguments</B></TD>
<TD width=250><!$MG_Args></TD>
</TR>
<TR>
<TD width=200><B>User</B></TD>
<TD width=250><!$MG_User></TD>
</TR>
</TABLE>
</CENTER></BODY></HTML>
Dynamic HTML (based on a JavaScript executed by the browser)
The example given below is a sample default HTML page that uses automatically updated HTML input elements with the request details. This is done by giving the HTML input elements pre-defined names as shown in the form below.
<HTML>
<HEAD><TITLE>Magic Application error</TITLE></HEAD>
<BODY bgcolor=navy><BR><BR><CENTER>
<TABLE bgColor=white border=3>
<TR>
<TD width=200><B>Messaging Server</B></TD>
<TD width=250><INPUT type="text" name="MG_Server" readonly style="border: medium none"> </TD>
</TR>
<TR>
<TD width=200><B>Application</B></TD>
<TD width=250><INPUT type="text" name="MG_Application" readonly style="border: medium none"> </TD>
</TR>
<TR>
<TD width=200><B>Program</B></TD>
<TD width=250><INPUT type="text" name="MG_Program" readonly style="border: medium none"></TD>
</TR>
<TR>
<TD width=200><B>Error Code</B></TD>
<TD width=250><INPUT type="text" name="MG_ErrorCode" readonly style="border: medium none"> </TD>
</TR>
<TR>
<TD width=200><B>Error Text</B></TD>
<TD width=250><INPUT type="text" size=50 name="MG_ErrorText" readonly style="border: medium none"> </TD>
</TR>
<TR>
<TD width=200><B>Arguments</B></TD>
<TD width=250><INPUT type="text" size=50 name="MG_Args" readonly style="border: medium none"> </TD>
</TR>
<TR>
<TD width=200><B>User</B></TD>
<TD width=250><INPUT type="text" name="MG_User" readonly style="border: medium none"> </TD>
</TR>
</CENTER></BODY></HTML>
Note:
|
In Rich Client tasks, only mergeable HTML pages are allowed – the Web requester does not merge these tags.
|
Mergeable XML
When using the DefError keyword, the Web requester will merge details to the specified file based on the following tags, which can appear partially or completely, in any order, in the given document:
-
<!$MG_Server> : Host/Port (sent within the request)
-
<!$MG_Application> : Application name (sent within the request)
-
<!$MG_Program> : Program name (sent within the request)
-
<!$MG_Args> : Arguments (sent within the request)
-
<!$MG_User > : User name (sent within the request)
-
<!$MG_ErrorCode> : Error code (sent from the runtime engine)
-
<!$MG_ErrorText> : Error description (sent from the runtime engine)
When the 'XML' constant is used as the value of this keyword (DefError=XML), then a simple XML with these values will be generated. You can use this option when you do not need to set additional information in the XML file. The following XML document will be created:
<xmlerr>
<errcode> <!$MG_ErrorCode> </errcode>
<errmsg> <!$MG_ErrorText> </errmsg>
<server> <!$MG_Server> </server>
<appname><!$MG_Application> </appname>
<prgname> <!$MG_Program </prgname>
<arguments> <!$MG_Args> </arguments>
<usename> <!$MG_User ></username>
</xmlerr>