Posts Tagged ‘user-agent’

Fix WebCenter Studio Server for IE11

Thursday, September 24th, 2015

IE11 has caused all sorts of problems in the WebCenter Interaction stack thanks to its new new User-Agent header that these legacy products can’t parse.

Today’s issue is how to fix Studio Server. If you’re seeing this exception in your logs, it’s because Studio can’t parse the user-agent string:

StandardWrapperValve[gatewayservlet]: Servlet.service()
for servlet gatewayservlet threw exception
String index out of range: -1
at java.lang.String.substring(Unknown Source)

You could just use Compatibility View, but that’s not always an option when you have a ton of end-users. Instead, I opened up the studio.war file and recompiled in a fix that wraps a try-catch block around this bad code, and simply says “if I can’t figure out what browser is being used, assume it’s legacy IE.”. The class file is at

try {
  .... regular legacy browser parsing ...
catch (Exception e) {
   browserName = "MSIE";
   browserVersion = 6F;
   browserPlatform = "Windows";
   jsControlsOK = true;

Drop me a line if you’d like the replacement class file to use in your version of studio.war.