Works: Struts + c:import w/ Tomcat 5.0.18!!!
Hiho all, Just for interest: with Tomcat 5.0.18 (prior: 5.0.16) it finally works: Including a fragment using JSTL's c:import or jsp:include that is invoked by a Struts Action! Prior, it failed, when the importing JSP was also invoked by a Struts action; thus having two Struts' Action calls in one physical request. Now this finally works w/ the same JSTL 1.1 and Struts JARs! Thanks Apache! BTW.: or does someone know if this shall work even w/ prior versions? I once found a bug report regarding that special problem; but culd not remember if this was for Struts, JSTL or Tomcat. -- greetings, | /"\ | \ / ASCII-Ribbon-Campaign Timo | X Against HTML Mail | / \ -- PUBLIC KEY: 52F3311A Timo Boewing <[EMAIL PROTECTED]> 2003/10/30 Fingerprint = F743 E0AA A2F0 1B33 F6FA 417B 72BE 740D 52F3 311A signature.asc Description: This is a digitally signed message part
c:import and Struts actions physically losing bytes
Hello all, Yet again another problem: i want to include another dynamic resource via JSTL's c:import into a JSP. When doing so with another JSP everything works great. However, when doing so with a Struts action, the request gets shortened (First x bytes are cut)! The Struts action really does nothing more than that in my testcase: just setting a forward to the same JSP page to include. The page to include is kept simple to avoid intereference of any other called code, it just contains a page directive and "Hello". Thus, works, but Simply cuts the first bytes of the request, thus i receive an incomplete document. As said, the Struts action really just sets a forward to the same JSP as in the first example. The document's beginning gets cut somewhere, not only the importing JSP gets cut but the cut also reaches to the called JSP. Am i doing wrong??? My setup: - J2SDK 1.4.1_02 on Debian GNU/Linux sid - Tomcat 5.0.14 - up to date JSTL 1.1 - up to date Struts web.xml "links" against JSP 2.0 / Servlet 2.4. BTW: When using jsp:include, the whole calling JSP is replaced w/ the called document. However, jsp:include is not an option die to c:import tech advantages. *But*, important may be this two-liner that Jasper throws to STDOUT: Nov 5, 2003 10:26:22 PM org.apache.jasper.runtime.PageContextImpl release WARNING: Internal error flushing the buffer in release() ? Bug due to Tomcat beta... or? Thanx -- greetings, | /"\ | \ / ASCII-Ribbon-Campaign Timo | X Against HTML Mail | / \ -- PUBLIC KEY: 52F3311A Timo Boewing <[EMAIL PROTECTED]> 2003/10/30 Fingerprint = F743 E0AA A2F0 1B33 F6FA 417B 72BE 740D 52F3 311A signature.asc Description: This is a digitally signed message part
JSP 2.0: probs w/ JSTL and jsp:doBody
Hello List, Currently i am trying JSP 2.0 w/ Servlet 2.4 under Tomcat 5.0.12. One of the things i love the most is tag templates for usage in WEB-INF/tags. I use current Apache JSTL 1.1 w/ up to date Struts on Debian GNU/Linux and J2SE SDK 1.4.1_02. However, as soon as i have JSTL in a JSP page and in between my tags that have jsp:doBody in it OR when i have tags w/ jsp:doBody and e.g. a c:forEach in the body (the JSP, not within tags, that works pretty much. Here an example: test.jsp <%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %> <%@ taglib prefix="my" tagdir="/WEB-INF/tags/" %> ${entry.key} simple.tag <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %> <%@ attribute name="caption" %> ${caption} I have read much docs, including Sun's JSP 2.0 current proposal, but cannot guess what the solution might me. I think it has to do w/ current JSP context, but have no idea how to fix this or if this is possible at all. One workaround is to avoid jsp:doBody and split the tag into two files, e.g. [JSTL here], but that is somehow not nice... The exceptions i receive look like these. Thank you for any hints! Timo >>> org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 15 in the jsp file: /themes/default/jsp/admin/view/view/show.jsp Generated servlet error: [javac] Compiling 1 source file /home/blazko/workspace/neveprise.net/work/org/apache/jsp/org/apache/jsp/themes/default_/jsp/admin/view/view/show_jsp.java:224: cannot resolve symbol symbol : variable _jspx_push_body_count_c_forEach_0 location: class org.apache.jsp.themes.default_.jsp.admin.view.view.show_jsp.show_jspHelper if (_jspx_meth_scav_tabButton_0(_jspx_parent, pageContext, _jspx_push_body_count_c_forEach_0)) ^ 1 error org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:128) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351) org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:413) org.apache.jasper.compiler.Compiler.compile(Compiler.java:453) org.apache.jasper.compiler.Compiler.compile(Compiler.java:437) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1759) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1596) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492) javax.servlet.http.HttpServlet.service(HttpServlet.java:743) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) note The full stack trace of the root cause is available in the Tomcat logs. <<< -- greetings, | /"\ | \ / ASCII-Ribbon-Campaign Timo | X Against HTML Mail | / \ -- PUBLIC KEY: 52F3311A Timo Boewing <[EMAIL PROTECTED]> 2003/10/30 Fingerprint = F743 E0AA A2F0 1B33 F6FA 417B 72BE 740D 52F3 311A signature.asc Description: This is a digitally signed message part