ASF Bugzilla – Attachment 20931 Details for
Bug 42693
JSP-Generation error with recursive tagfile structure
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Attaching the generated file by renderFileSystemEntry.tagx
renderFileSystemEntry_tagx.java (text/plain), 6.13 KB, created by
Lucas Galfaso
on 2007-10-05 19:06:17 UTC
(
hide
)
Description:
Attaching the generated file by renderFileSystemEntry.tagx
Filename:
MIME Type:
Creator:
Lucas Galfaso
Created:
2007-10-05 19:06:17 UTC
Size:
6.13 KB
patch
obsolete
>package org.apache.jsp.tag.web; > >import javax.servlet.*; >import javax.servlet.http.*; >import javax.servlet.jsp.*; >import java.io.File; > >public final class renderFileSystemEntry_tagx > extends javax.servlet.jsp.tagext.SimpleTagSupport > implements org.apache.jasper.runtime.JspSourceDependent { > > > private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); > > private static java.util.List _jspx_dependants; > > private JspContext jspContext; > private java.io.Writer _jspx_sout; > private javax.el.ExpressionFactory _el_expressionfactory; > private org.apache.AnnotationProcessor _jsp_annotationprocessor; > > public void setJspContext(JspContext ctx) { > super.setJspContext(ctx); > java.util.ArrayList _jspx_nested = null; > java.util.ArrayList _jspx_at_begin = null; > java.util.ArrayList _jspx_at_end = null; > this.jspContext = new org.apache.jasper.runtime.JspContextWrapper(ctx, _jspx_nested, _jspx_at_begin, _jspx_at_end, null); > } > > public JspContext getJspContext() { > return this.jspContext; > } > private java.io.File file; > private java.lang.Integer indentLevel; > > public java.io.File getFile() { > return this.file; > } > > public void setFile(java.io.File file) { > this.file = file; > jspContext.setAttribute("file", file); > } > > public java.lang.Integer getIndentLevel() { > return this.indentLevel; > } > > public void setIndentLevel(java.lang.Integer indentLevel) { > this.indentLevel = indentLevel; > jspContext.setAttribute("indentLevel", indentLevel); > } > > public Object getDependants() { > return _jspx_dependants; > } > > private void _jspInit(ServletConfig config) { > _el_expressionfactory = _jspxFactory.getJspApplicationContext(config.getServletContext()).getExpressionFactory(); > _jsp_annotationprocessor = (org.apache.AnnotationProcessor) config.getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName()); > } > > public void _jspDestroy() { > } > > public void doTag() throws JspException, java.io.IOException { > PageContext _jspx_page_context = (PageContext)jspContext; > HttpServletRequest request = (HttpServletRequest) _jspx_page_context.getRequest(); > HttpServletResponse response = (HttpServletResponse) _jspx_page_context.getResponse(); > HttpSession session = _jspx_page_context.getSession(); > ServletContext application = _jspx_page_context.getServletContext(); > ServletConfig config = _jspx_page_context.getServletConfig(); > JspWriter out = jspContext.getOut(); > _jspInit(config); > jspContext.getELContext().putContext(JspContext.class,jspContext); > if( getFile() != null ) > _jspx_page_context.setAttribute("file", getFile()); > if( getIndentLevel() != null ) > _jspx_page_context.setAttribute("indentLevel", getIndentLevel()); > > try { > out.write("<div style=\"" + (java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("padding-left: ${indentLevel * 20}px;", java.lang.String.class, (PageContext)this.getJspContext(), null, false) + "\">"); > out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${file.name}", java.lang.String.class, (PageContext)this.getJspContext(), null, false)); > out.write("</div>"); > > File file = (File) jspContext.getAttribute("file"); > File[] children = file.listFiles(); > if (children != null) { > for (int i=0; i<children.length; i++) { > File child = children[i]; > jspContext.setAttribute("child", child, PageContext.REQUEST_SCOPE); > > if (_jspx_meth_tags_005frenderFileSystemEntry_005f0(_jspx_page_context)) > return; > > } > } > > } catch( Throwable t ) { > if( t instanceof SkipPageException ) > throw (SkipPageException) t; > if( t instanceof java.io.IOException ) > throw (java.io.IOException) t; > if( t instanceof IllegalStateException ) > throw (IllegalStateException) t; > if( t instanceof JspException ) > throw (JspException) t; > throw new JspException(t); > } finally { > jspContext.getELContext().putContext(JspContext.class,super.getJspContext()); > ((org.apache.jasper.runtime.JspContextWrapper) jspContext).syncEndTagFile(); > } > } > > private boolean _jspx_meth_tags_005frenderFileSystemEntry_005f0(PageContext _jspx_page_context) > throws Throwable { > JspWriter out = _jspx_page_context.getOut(); > // tags:renderFileSystemEntry > org.apache.jsp.tag.web.renderFileSystemEntry_tagx _jspx_th_tags_005frenderFileSystemEntry_005f0 = new org.apache.jsp.tag.web.renderFileSystemEntry_tagx(); > org.apache.jasper.runtime.AnnotationHelper.postConstruct(_jsp_annotationprocessor, _jspx_th_tags_005frenderFileSystemEntry_005f0); > _jspx_th_tags_005frenderFileSystemEntry_005f0.setJspContext(_jspx_page_context); > _jspx_th_tags_005frenderFileSystemEntry_005f0.setParent(new javax.servlet.jsp.tagext.TagAdapter((javax.servlet.jsp.tagext.SimpleTag) this )); // /WEB-INF/tags/renderFileSystemEntry.tagx(23,82) name = indentLevel type = java.lang.Integer reqTime = true required = true fragment = false deferredValue = false expectedTypeName = java.lang.String deferredMethod = false methodSignature = null > _jspx_th_tags_005frenderFileSystemEntry_005f0.setIndentLevel((java.lang.Integer) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${indentLevel + 1}", java.lang.Integer.class, (PageContext)this.getJspContext(), null, false)); > // /WEB-INF/tags/renderFileSystemEntry.tagx(23,82) name = file type = java.io.File reqTime = true required = true fragment = false deferredValue = false expectedTypeName = java.lang.String deferredMethod = false methodSignature = null > _jspx_th_tags_005frenderFileSystemEntry_005f0.setFile((java.io.File) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${child}", java.io.File.class, (PageContext)this.getJspContext(), null, false)); > _jspx_th_tags_005frenderFileSystemEntry_005f0.doTag(); > org.apache.jasper.runtime.AnnotationHelper.preDestroy(_jsp_annotationprocessor, _jspx_th_tags_005frenderFileSystemEntry_005f0); > return false; > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 42693
:
20374
|
20926
| 20931 |
20933
|
20934
|
20935
|
20940