Script to get Report Viewer servlet mapping

August 11th, 2011 | Tags: , ,

Sometimes it may be useful to know inside the report which servlet mapping is used to run the report (e.g. frameset, run, preview).

var sMapping = reportContext.getHttpServletRequest.getRequestURI();
var nPos = sMapping.lastIndexOf( "/" ) + 1;
this.text = sMapping.substring( nPos );

You can place the above code inside a label to see the servlet mapping.

No comments yet.