/** * Merge the template with the context. Can be overridden to customize the behavior. * * @param template the template to merge * @param context the Velocity context to use for rendering * @param response servlet response (use this to get the OutputStream or Writer) * @throws Exception if thrown by Velocity * @see org.apache.velocity.Template#merge */ protected void mergeTemplate( Template template, Context context, HttpServletResponse response) throws Exception { try { response.setCharacterEncoding(Config.DEFAULT_ENCODING); template.merge(context, response.getWriter()); } catch (MethodInvocationException ex) { Throwable cause = ex.getCause(); throw new NestedServletException( "Method invocation failed during rendering of Velocity view with name '" + getBeanName() + "': " + ex.getMessage() + "; reference [" + ex.getReferenceName() + "], method '" + ex.getMethodName() + "'", cause == null ? ex : cause); } } }
System.out.println(" reference = " + mie.getReferenceName() ); System.out.println(" method = " + mie.getMethodName() ); System.out.println(" reference = " + mie.getReferenceName() ); System.out.println(" method = " + mie.getMethodName() ); System.out.println(" reference = " + mie.getReferenceName() ); System.out.println(" method = " + mie.getMethodName() ); System.out.println(" reference = " + mie.getReferenceName() ); System.out.println(" method = " + mie.getMethodName() );
/** * Merge the template with the context. * Can be overridden to customize the behavior. * @param template the template to merge * @param context the Velocity context to use for rendering * @param response servlet response (use this to get the OutputStream or Writer) * @throws Exception if thrown by Velocity * @see Template#merge */ protected void mergeTemplate( Template template, Context context, HttpServletResponse response) throws Exception { try { template.merge(context, response.getWriter()); } catch (MethodInvocationException ex) { Throwable cause = ex.getWrappedThrowable(); throw new NestedServletException( "Method invocation failed during rendering of Velocity view with name '" + getBeanName() + "': " + ex.getMessage() + "; reference [" + ex.getReferenceName() + "], method '" + ex.getMethodName() + "'", cause==null ? ex : cause); } }
throw e; } catch(MethodInvocationException e) { throw new BuildException("Exception thrown by '" + e.getReferenceName() + "." + e.getMethodName() +"'", e.getWrappedThrowable());
/** * Merge the template with the context. * Can be overridden to customize the behavior. * @param template the template to merge * @param context the Velocity context to use for rendering * @param response servlet response (use this to get the OutputStream or Writer) * @throws Exception if thrown by Velocity * @see org.apache.velocity.Template#merge */ protected void mergeTemplate( Template template, Context context, HttpServletResponse response) throws Exception { try { template.merge(context, response.getWriter()); } catch (MethodInvocationException ex) { Throwable cause = ex.getWrappedThrowable(); throw new NestedServletException( "Method invocation failed during rendering of Velocity view with name '" + getBeanName() + "': " + ex.getMessage() + "; reference [" + ex.getReferenceName() + "], method '" + ex.getMethodName() + "'", cause==null ? ex : cause); } }
/** * Merge the template with the context. * Can be overridden to customize the behavior. * @param template the template to merge * @param context the Velocity context to use for rendering * @param response servlet response (use this to get the OutputStream or Writer) * @throws Exception if thrown by Velocity * @see Template#merge */ protected void mergeTemplate( Template template, Context context, HttpServletResponse response) throws Exception { try { template.merge(context, response.getWriter()); } catch (MethodInvocationException ex) { Throwable cause = ex.getWrappedThrowable(); throw new NestedServletException( "Method invocation failed during rendering of Velocity view with name '" + getBeanName() + "': " + ex.getMessage() + "; reference [" + ex.getReferenceName() + "], method '" + ex.getMethodName() + "'", cause==null ? ex : cause); } }
"Exception thrown by '" + e.getReferenceName() + "." + e.getMethodName() +"'" + ERR_MSG_FRAGMENT, e.getWrappedThrowable());
"Exception thrown by '" + e.getReferenceName() + "." + e.getMethodName() +"'" + ERR_MSG_FRAGMENT, e.getWrappedThrowable());
"Exception thrown by '" + e.getReferenceName() + "." + e.getMethodName() +"'" + ERR_MSG_FRAGMENT, e.getWrappedThrowable());