CustomLoginPage

Where to find GenericConstants.AM_REQUEST_TOKEN_IDENTIFIER when creating a custom login page for Oracle WebCenter

Whilst working on creating a custom login screen for Oracle WebCenter I came across something in the instructions that was assumed and undocumented.

In the guide Developing Custom Pages it contains the code below:

String reqToken = request.getParameter(GenericConstants.AM_REQUEST_TOKEN_IDENTIFIER);

<%
if(reqToken != null && reqToken.length() > 0) {%>
<input type="hidden" name="" value="">
<%
}%>

However, I couldn’t find the location of GenericConstants.AM_REQUEST_TOKEN_IDENTIFIER anywhere, google searches returned nothing of any use. Hence why I’m sharing this.

The jar that you need to include in your project is bizarrely only available on the target OAM server! If you search for utilities.jar which on our server was located at $MIDDLEWARE_HOME/user_projects/domains/OAMDomain/servers/oam_server1/tmp/_WL_user/oam_server_11.1.2.0.0/88g74i/APP-INF/lib

Bits of this path will be different on your system beacause of how your domain is configured, however, you should roughly have the structure.

Copy the utilities.jar to your projects lib folder and include it in the JDeveloper libraries for your custom login page project. You should then have access to these pre-defined Strings.