RE: PLEASE HELP with Exception in error.jsp with Tiles
Hi Richard, First things first - ditch 1.4.1 and get 1.4.2 - I've had endless unusual problems with 1.4.1 - except the very latest release - but 1.4.2 seems faster to me as well. Hmmm - lots to look through ... msanger - Microsoft make you that mad, eh? It looks to me like a further exception is being thrown in the error.jsp (possibly relating to bean:message key=errorPage.heading - is this line correct?). My advice would be to simplify the error.jsp significantly (i.e. start with static content) and build it back gradually. I remember a post a while ago about a gotcha in that when using tiles the error page appears after the already committed content of the tiles - so you may need to consider this too? Good luck! Hue. -Original Message- From: Richard Mixon [mailto:[EMAIL PROTECTED] Sent: 28 August 2003 06:06 To: 'Struts Users Mailing List' Subject: PLEASE HELP with Exception in error.jsp with Tiles Sorry to plead, but I have been fighting this for the better part of two days now. I've done a line by line review of just about all of my code. Cannot find anything that appears out of whack - compared to similar programs that are working. Would really appreciate any tips or suggestions on how to track this down. Let me know if there is additional documentation needed. First, I am running the regular Struts 1.1 production release on Windows XP using Sun Java 1.4.1. In my main JSP I'm running into some type of exception that is causing me to switch to my error.jsp. However it never makes it there and I get about 2/3 of my original JSP page. This only occurs when I encounter an error in a multi-line update. I've turned on logging for the tiles and appropriate struts classes. The most I can see is that I'm getting an NPE in: org.apache.struts.taglib.html.MessagesTag.doAfterBody(MessagesTag. java:312) Below is my error.jsp file and the exception stack trace (sorry, its long chain of exceptions). Each exception refers to the same line in my main JSP - 849 - which is this line, I've just finished the /tiles:put tag for an inline put, and am encountering the /tiles:insert to end my tiles structure (I've included several lines after it): /*line 849*/ if (_jspx_th_tiles_insert_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; _jspx_tagPool_tiles_insert_flush_definition.reuse(_jspx_th_tiles_i nsert_0); out.write(\r\n); out.write(!-- html-el:javascript formName=\subjectAspectsForm\ dynamicJavascript=\true\ staticJavascript=\true\ htmlComment=\true\ cdata=\false\/ --\r\n\r\n); } catch (Throwable t) { out = _jspx_out; if (out != null out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } } HERE'S the error.jsp: %@ page language=java isErrorPage=true % %@ taglib uri=http://jakarta.apache.org/struts/tags-bean; prefix=bean % %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % %@ taglib uri=http://jakarta.apache.org/struts/tags-logic; prefix=logic % !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; !-- I do not integrate this page as a tile, but rather as a standalone-page -- html head titlebean:message key=errorPage.title//title link rel=stylesheet type=text/css media=all href=%=request.getContextPath()%/styles/default.css / /head body div id=screen div id=content h1bean:message key=errorPage.heading//h1 %-- Error Messages --% logic:messagesPresent div class=error See error messages below /div /logic:messagesPresent %-- Success Messages --% logic:messagesPresent message=true div class=message See informational messages below /div /logic:messagesPresent %-- No Messages Message --% logic:messagesNotPresent message=true logic:messagesNotPresent div class=message No messages /div /logic:messagesNotPresent /logic:messagesNotPresent -- Error Messages -- logic:messagesPresent div class=error html:messages id=error bean:write name=error filter=false/br/ /html:messages /div /logic:messagesPresent !-- Success Messages -- logic:messagesPresent message=true div class=message html:messages id=message message=true bean:write name=message filter=false/br/ /html:messages /div /logic:messagesPresent % if (exception != null) { exception.printStackTrace(new java.io.PrintWriter(out)); } else { % !-- only show this if no error messages present -- logic:messagesNotPresent
RE: PLEASE HELP with Exception in error.jsp with Tiles
Hue, Thanks. That did help as it showed it had nothing to do with the error.jsp. Turned out to be a real rookie mistake - a mispelled message key. I'm embarrassed, to say the least - but very, very happy to be on my way again. - Richard -Original Message- From: Hue Holleran [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 2:12 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: PLEASE HELP with Exception in error.jsp with Tiles Hi Richard, First things first - ditch 1.4.1 and get 1.4.2 - I've had endless unusual problems with 1.4.1 - except the very latest release - but 1.4.2 seems faster to me as well. Hmmm - lots to look through ... msanger - Microsoft make you that mad, eh? It looks to me like a further exception is being thrown in the error.jsp (possibly relating to bean:message key=errorPage.heading - is this line correct?). My advice would be to simplify the error.jsp significantly (i.e. start with static content) and build it back gradually. I remember a post a while ago about a gotcha in that when using tiles the error page appears after the already committed content of the tiles - so you may need to consider this too? Good luck! Hue. -Original Message- From: Richard Mixon [mailto:[EMAIL PROTECTED] Sent: 28 August 2003 06:06 To: 'Struts Users Mailing List' Subject: PLEASE HELP with Exception in error.jsp with Tiles Sorry to plead, but I have been fighting this for the better part of two days now. I've done a line by line review of just about all of my code. Cannot find anything that appears out of whack - compared to similar programs that are working. Would really appreciate any tips or suggestions on how to track this down. Let me know if there is additional documentation needed. First, I am running the regular Struts 1.1 production release on Windows XP using Sun Java 1.4.1. In my main JSP I'm running into some type of exception that is causing me to switch to my error.jsp. However it never makes it there and I get about 2/3 of my original JSP page. This only occurs when I encounter an error in a multi-line update. I've turned on logging for the tiles and appropriate struts classes. The most I can see is that I'm getting an NPE in: org.apache.struts.taglib.html.MessagesTag.doAfterBody(MessagesTag. java:312) Below is my error.jsp file and the exception stack trace (sorry, its long chain of exceptions). Each exception refers to the same line in my main JSP - 849 - which is this line, I've just finished the /tiles:put tag for an inline put, and am encountering the /tiles:insert to end my tiles structure (I've included several lines after it): /*line 849*/ if (_jspx_th_tiles_insert_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; _jspx_tagPool_tiles_insert_flush_definition.reuse(_jspx_th_tiles_i nsert_0); out.write(\r\n); out.write(!-- html-el:javascript formName=\subjectAspectsForm\ dynamicJavascript=\true\ staticJavascript=\true\ htmlComment=\true\ cdata=\false\/ --\r\n\r\n); } catch (Throwable t) { out = _jspx_out; if (out != null out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } } HERE'S the error.jsp: %@ page language=java isErrorPage=true % %@ taglib uri=http://jakarta.apache.org/struts/tags-bean; prefix=bean % %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % %@ taglib uri=http://jakarta.apache.org/struts/tags-logic; prefix=logic % !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; !-- I do not integrate this page as a tile, but rather as a standalone-page -- html head titlebean:message key=errorPage.title//title link rel=stylesheet type=text/css media=all href=%=request.getContextPath()%/styles/default.css / /head body div id=screen div id=content h1bean:message key=errorPage.heading//h1 %-- Error Messages --% logic:messagesPresent div class=error See error messages below /div /logic:messagesPresent %-- Success Messages --% logic:messagesPresent message=true div class=message See informational messages below /div /logic:messagesPresent %-- No Messages Message --% logic:messagesNotPresent message=true logic:messagesNotPresent div class=message No messages /div /logic:messagesNotPresent /logic:messagesNotPresent -- Error Messages -- logic:messagesPresent div class=error html:messages id=error bean:write name=error filter=false/br/ /html:messages /div /logic:messagesPresent !-- Success Messages --