WebRequestCycle requestCycle = (WebRequestCycle)getRequestCycle();
WebSession session = (WebSession)getSession();
ClientInfo clientInfo = session.getClientInfo();
if (clientInfo == null)
{
clientInfo = new WebClientInfo(requestCycle);
getSession().setClientInfo(clientInfo);
}
else if (clientInfo instanceof WebClientInfo)
{
WebClientInfo info = (WebClientInfo)clientInfo;
ClientProperties properties = info.getProperties();
properties.setJavaEnabled(false);
}
else
{
warnNotUsingWebClientInfo(clientInfo);