- - PR -
助けてください。どこかに、エラー原因「out.write('n');」があるの?
| 投稿者 | 投稿内容 |
|---|---|
|
投稿日時: 2004-09-14 16:02
なるほど、そういう意味だったのですね。すぐに確認します。
|
|
投稿日時: 2004-09-14 16:55
原因の箇所らしき箇所(100行目の『 } 』)は見つけました。
out.write('\n'); } out.write('\n'); でも、対策がわかりません。また、なぜこのようなことになったのでしょうか?御指導の程よろしくお願いします。 *usrSubmit.jspソース(シンプルにしました。が、エラー結果は同じです。)* ============================================= <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <html> <body> <input type="radio" name="mid" value="insert"> <input type="radio" name="mid" value="delete"> <c:catch var="errorMsg"> <c:choose> <c:when test="" /> </c:choose> </c:catch> </body> </html> *usrSubmit_jsp.javaソース* ============================================= package org.apache.jsp.jsp; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; public final class usrSubmit_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static java.util.Vector _jspx_dependants; private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_c_catch_var; private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_c_choose; private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_c_when_test_nobody; public java.util.List getDependants() { return _jspx_dependants; } public void _jspInit() { _jspx_tagPool_c_catch_var = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig()); _jspx_tagPool_c_choose = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig()); _jspx_tagPool_c_when_test_nobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig()); } public void _jspDestroy() { _jspx_tagPool_c_catch_var.release(); _jspx_tagPool_c_choose.release(); _jspx_tagPool_c_when_test_nobody.release(); } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\n"); out.write("<html>\n"); out.write("<body>\n"); out.write("<input type=\"radio\" name=\"mid\" value=\"insert\">\n"); out.write("<input type=\"radio\" name=\"mid\" value=\"delete\">\n"); if (_jspx_meth_c_catch_0(_jspx_page_context)) return; out.write("\n"); out.write("</body>\n"); out.write("</html>\n"); } catch (Throwable t) { if (!(t instanceof SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); } } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context); } } private boolean _jspx_meth_c_catch_0(PageContext _jspx_page_context) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // c:catch org.apache.taglibs.standard.tag.common.core.CatchTag _jspx_th_c_catch_0 = (org.apache.taglibs.standard.tag.common.core.CatchTag) _jspx_tagPool_c_catch_var.get(org.apache.taglibs.standard.tag.common.core.CatchTag.class); _jspx_th_c_catch_0.setPageContext(_jspx_page_context); _jspx_th_c_catch_0.setParent(null); _jspx_th_c_catch_0.setVar("errorMsg"); int[] _jspx_push_body_count_c_catch_0 = new int[] { 0 }; try { int _jspx_eval_c_catch_0 = _jspx_th_c_catch_0.doStartTag(); if (_jspx_eval_c_catch_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write('\n'); out.write('\n'); if (_jspx_meth_c_when_0(_jspx_th_c_catch_0, _jspx_page_context, _jspx_push_body_count_c_catch_0)) return true; out.write('\n'); } out.write('\n'); int evalDoAfterBody = _jspx_th_c_catch_0.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_catch_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return true; } catch (Throwable _jspx_exception) { while (_jspx_push_body_count_c_catch_0[0]-- > 0) out = _jspx_page_context.popBody(); _jspx_th_c_catch_0.doCatch(_jspx_exception); } finally { _jspx_th_c_catch_0.doFinally(); _jspx_tagPool_c_catch_var.reuse(_jspx_th_c_catch_0); } return false; } private boolean _jspx_meth_c_when_0(javax.servlet.jsp.tagext.JspTag _jspx_th_c_catch_0, PageContext _jspx_page_context, int[] _jspx_push_body_count_c_catch_0) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // c:when org.apache.taglibs.standard.tag.el.core.WhenTag _jspx_th_c_when_0 = (org.apache.taglibs.standard.tag.el.core.WhenTag) _jspx_tagPool_c_when_test_nobody.get(org.apache.taglibs.standard.tag.el.core.WhenTag.class); _jspx_th_c_when_0.setPageContext(_jspx_page_context); _jspx_th_c_when_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_catch_0); _jspx_th_c_when_0.setTest(""); int _jspx_eval_c_when_0 = _jspx_th_c_when_0.doStartTag(); if (_jspx_th_c_when_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return true; _jspx_tagPool_c_when_test_nobody.reuse(_jspx_th_c_when_0); return false; } } [ メッセージ編集済み 編集者: ryo 編集日時 2004-09-14 16:58 ] |
|
投稿日時: 2004-09-14 17:05
原因としては単純に{}の数が合っていないのでしょう。
エラー内容も文字化けしててわかりませんが、おそらく tryへのchatchがありませんとかそんなのではないでしょうか。 なぜ{}の対応が取れなくなっているかは、タグを詳しく 知らないのでわかりません。 その辺は有識者の方へ。 |
|
投稿日時: 2004-09-15 09:07
こちらもここ(http://www.atmarkit.co.jp/bbs/phpBB/viewtopic.php?topic=14820&forum=12&2)同様、<c:choose> が原因で、do...while 間に余計な『 } 』が入ってしまったと絞れました。JSTL に詳しい方いらっしゃいましたら、回避策のご指導ないし提案を、よろしくお願いします。
*環境:Linux(Fedora2)* |
