Fix WebCenter Studio Server for IE11

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
java.lang.StringIndexOutOfBoundsException:
String index out of range: -1
at java.lang.String.substring(Unknown Source)
at com.plumtree.studio.util.BrowserInfo.parse(BrowserInfo.java:334)
at com.plumtree.studio.util.BrowserInfo.(BrowserInfo.java:137)

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 com.plumtree.studio.util.BrowserInfo:

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.

Tags: , , ,

Leave a Reply