This document covers the following topics:
See Web Application Development for introduction and concepts, and Error Messages for troubleshooting help.
Performance monitoring provides the ability to trace the performance of all sessions/single sessions, and save them to a CSV (Excel) file.
This feature monitors the process of an instant/generated page, from pressing a host key until the result page is fully loaded. The monitoring includes browser performance, Web server performance and ApplinX server/host performance.
The monitoring includes:
The entire wait time the user waits between pressing an action key, until receiving the HTML result of the target screen - Total Request.
The entire time that the Web server processed the user request (including ApplinX server & the host response times) - Total Server Side.
The send key response time - SendKeys.
The HTML page loading time - Client Load.
Important ApplinX actions such as attaching to ApplinX server, creating the instant page (Generate Instant), updating controls from the host screen, updating tables (when tables exist), detaching from ApplinX server.
The JavaScript logger engine is used to log JavaScript errors (primarily) as well as to debug specific modules of the JavaScript engine. The engine logs JavaScript errors which occur to users of the Web application. These errors are logged to the framework JavaScript log, with the following user information: Session ID, IP, browser details.
Each line in the log displays a timestamp, module name, log level, and the message.
The JavaScript logger engine automatically logs JavaScript errors to a log text file on the server (logs/javascript_log.txt).
Note:
Applications created in ApplinX versions prior to 5.2.4 this file
should be replaced/edited (if changes were made) with the
config/gx_logConfig.xml file from the new
application/config directory of the relevant framework type jsp/c#/vb.
The JavaScript Logger Engine can be used by ApplinX developers to debug specific modules of the JavaScript engine (The JavaScript engine core, Emulation, modal windows, type ahead, Natural data transfer), by displaying the information in the log console (or writing to the server log when the log console is not shown).
To configure the JavaScript log console, configure parameters in the config/gx_clientConfig.xml file as follows:
<engineConfig logLevel="3" <- 3-activate debug mode (0-Error , 1-Warnings , 2-Massage , 3-Debug) debugModules=:z_engine.js,z_emulator.js,z_window.js,z_typeAhead,z_ndt.js" <- which modules to debug showLogConsole="true" <- show/hide the log console />
Note:
The log text file also logs any error/debug (when active) messages
when the browser is refreshed, when the system is disconnected, when clicking
on the button in the log console (if
the log console is displayed) and when the log console's size reaches 5k (to
avoid reducing the speed of the browser).
Whenever myFunc is executed the Boolean variable "myBool" is evaluated. If the value received is "false", a message is logged in the debug log stating that there is a problem.
function myFunc(){ var myBool = false; doSomthing(myBool); if (!myBool){ GXLog.debug("myModule","Something went terribly wrong!!"); } return myBool; }
Ensure to set the config/gx_clientConfig.xml as detailed above.
It is possible to use the ApplinX framework log to analyze and debug the code in the Web application. This is implemented by making changes in the config/gx_logConfig.xml file.
To define the messages that will be displayed in the framework log:
Open config/gx_logConfig.xml.
Uncomment the following section:
<!--category additivity="false" name="<Category-Name>"> <level value="info"/> <appender-ref ref="FRAMEWORK_LOG"/> </category -->
<!-- logger additivity="false" name="<Category-Name>"> <level value="info"/> <appender-ref ref="FRAMEWORK_LOG"/> </logger -->
Change the level tag value to either: info, error, warning, or debug.
Change the <Category-Name> to a meaningful value. This will make it easier for you to find log entries at a later time.
Restart your web server, in order for the changes to take effect.
To write to the log file from anywhere in your code, make sure that the call looks similar to the following (depending on the log level):
GXLog.info("Category-Name","<Message>"); GXLog.error("Category-Name","<Message>"); GXLog.warning("Category-Name","<Message>"); GXLog.debug("Category-Name","<Message>");
When using the hostLogin.jsp/hostLogin.aspx files and disconnecting the user, use the following JavaScript syntax to redirect back to the hostLogin page in the ApplinX Framework application:
window.parent.location="<landing page url>"
The hostLogin page needs to be loaded outside of the ApplinX Framework frameset.
The necessary steps depend on whether you are using Natural under UNIX or another scenario.
To customize the session ID when running under Natural UNIX
Create new Java file under WEB-INF/contexts - we called it "aaa" in this example.
Implement the Java class in this manner:
package contexts; import com.sabratec.applinx.j2ee.framework.web.GXHostLoginContext; import com.sabratec.applinx.framework.*; public class aaa extends GXHostLoginContext { private static final long serialVersionUID = 1L; public void gx_onLoad() { super.gx_onLoad(); } public void doLogin() { super.doLogin(); } @Override public void gx_initSessionConfig() { GXWebAppConfig gx_appConfig = getGXAppConfig(); gx_appConfig.getSessionConfig().setSessionId(getTagsAccesor().getTagContent("GXUser")); gx_appConfig.getSessionConfig().setDescription("desc1"); super.gx_initSessionConfig(); }
Edit the hostLogin.jsp
to use this new Java file, by pointing the gx_page to the new class <gx:page gx_context="contexts.aaa">
.
Use the build script (make.sh) to recompile this class.
Restart Tomcat and try again.
To customize the ApplinX session ID in another (non-Natural/UNIX) scenario
Go to the ApplinX web application folder.
Edit the GXBasicContext.java file.
In the gx_initSessionConfig
method, uncomment the following line:
gx_appConfig.getSessionConfig().setSessionId("<YOUR_SESSION_ID>");
Change <YOUR_SESSION_ID>
to the required value.
Use the build script (make.sh etc) to recompile this class.