  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Struts - A MVC web framework | | Tomcat - JSP/Servlet container | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | | JSP - A mailing list about Java Server Pages specification and reference | |
Struts & Hibernate
|
|
|
  | | | javax.servlet.jsp.JspException: Premature end of file | javax.servlet.jsp.JspException: Premature end of file 2004-01-14 - By Michael Duffy
Back
I'm having a problem with a JSP using JSTL 1.0.3 and Tomcat 4.1.29 running under Windows 2000 v5 sp4 and JDK 1.4.1_03.
I have a front controller servlet that instantiates a Command object for a given page and event. In this case, the Command is sending a URL to a vendor-supplied servlet, running on a different server, and getting an XML stream back. The XML stream is added to the request as an attribute and a RequestDispatcher forwards to a response JSP, which uses the JSTL XML and core tags to parse and output the XML stream. I ask the Command to print the XML stream to stdout so I can see whether the query succeeded before forwarding to the response JSP.
The Command has a successful interaction with the vendor servlet. I can see the complete XML stream written to stdout.txt. It is 55,338 characters long.
However, I get an exception in the browser when it tries to render the page:
javax.servlet.jsp.JspException : Premature end of file
The content of the JSP is pretty simple:
<%@ page language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> <%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %>
<!-- XML response data from Vista via the servlet --> <jsp:useBean id="lineNumberVistaXML" type="java.lang.String " scope="request"/>
<!-- Just print the XML for now to see if it comes down --> <x:parse var="lineNumberVistaXML"/> <c:out value="${lineNumberVistaXML}"/>
<hr />
What does "Premature end of file" mean? Is there a limit on attribute size? Are 55,338 chars too big to handle? Thanks - MOD
__ ____ ____ ____ ____ ____ ______ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected) For additional commands, e-mail: tomcat-user-help@(protected)
|
|
 |