throw new ServletException("Wrong path info: "+pi);
final String dtid = pi.substring(1, j);
final int k = pi.indexOf('/', ++j);
final String uuid = k >= 0 ? pi.substring(j, k): pi.substring(j);
final Media media;
<BUG>try {
final WebAppCtrl wappc = (WebAppCtrl)sess.getWebApp();
</BUG>
final UiEngine uieng = wappc.getUiEngine();
final Desktop desktop = wappc.getDesktopCache(sess).getDesktop(dtid);

throw new ServletException("Wrong path info: "+pi);
int j = pi.indexOf('/', 1);
if (j < 0)
throw new ServletException("Wrong path info: "+pi);
final String dtid = pi.substring(1, j);
final int k = pi.indexOf('/', ++j);
final String uuid = k >= 0 ? pi.substring(j, k): pi.substring(j);
final Media media;
try {
final WebApp wapp = sess.getWebApp();
final WebAppCtrl wappc = (WebAppCtrl)wapp;
final UiEngine uieng = wappc.getUiEngine();
final Desktop desktop = wappc.getDesktopCache(sess).getDesktop(dtid);
