Пример #1
0
 public void emit(ReplayParseContext context, Node node) throws ServletException, IOException {
   JSPExecutor jspExec = context.getJspExec();
   if (jspExec != null) {
     OutputStream os = context.getOutputStream();
     if (os != null) {
       String jspResult = jspExec.jspToString(jspPath);
       byte[] bytes = null;
       try {
         bytes = jspResult.getBytes(context.getOutputCharset());
       } catch (UnsupportedEncodingException e) {
         e.printStackTrace();
         bytes = jspResult.getBytes();
       }
       os.write(bytes);
     }
   }
 }
Пример #2
0
 /** @param jspExec the jspExec to set */
 public void setJspExec(JSPExecutor jspExec) {
   this.jspExec = jspExec;
   if (jspExec != null && jspExec.getUiResults() != null) {
     result = jspExec.getUiResults().getResult();
   }
 }