You can buy this project and download/modify it how often you want.
BeanShell Test Servlet BeanShell Test Servlet Script Capture Stdout/Stderr: name="bsh.servlet.captureOutErr" value="true"> Display Raw Output:
Capture Stdout/Stderr: name="bsh.servlet.captureOutErr" value="true"> Display Raw Output: