/*
* If this is a request for the main JNLP document then the GF JWS-related
* session attribute will not be present. In that case, save the just-
* generated JNLP content as a session attribute.
*/
final Session session = gReq.getSession();
final Boolean isMainJNLPProcessed = booleanAttr(session.getAttribute(GF_JWS_SESSION_IS_MAIN_PROCESSED_NAME));
if ( ! isMainJNLPProcessed) {
byte[] jnlp;
jnlp = text.getBytes();
session.setAttribute(GF_JWS_SESSION_IS_MAIN_PROCESSED_NAME, Boolean.TRUE);
session.setAttribute(GF_JWS_SESSION_CACHED_JNLP_NAME, jnlp);
logger.log(Level.FINE, "Session {1} contains no GF/JWS attr; caching {0} and setting attr to main JNLP content",
new Object[] {requestURI, session.getIdInternal()});
} else {
logger.log(Level.FINE, "Session {0} already contains cached JNLP", session.getIdInternal());
}
}