tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 29132] New: - 'page' JSP tag throws NPE when page accessed via multipart form submission
Date Thu, 20 May 2004 22:23:56 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29132>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29132

'page' JSP tag throws NPE when page accessed via multipart form submission

           Summary: 'page' JSP tag throws NPE when page accessed via
                    multipart form submission
           Product: Tapestry
           Version: 3.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Framework
        AssignedTo: tapestry-dev@jakarta.apache.org
        ReportedBy: colinml1@exis.com


I have an app that is half Tapestry and half (sigh...) Struts. On a common link
bar I use the tapestry page tag to create some links to some tapestry pages, as
follows:

  <tapestry:page servlet='/auth' page='ManageUsers'>Users</tapestry:page> 

If I have a JSP page which does a multi-part form post to an action, and then
that action does a normal forward to the display page, which then includes the
above tag definition, I get a null pointer exception, as Tapestry wants to use
the DefaultMultiPartFormDecoder, but the submission was not actually from tapestry.

I think this line returns null
        return (Map) request.getAttribute(PART_MAP_ATTRIBUTE_NAME);
which then causes a NPE on attempted usage of the partMap.

Very very nasty. Is there any easy workaround? Stack trace follows:

2004-05-20 17:55:33,974 ERROR [org.jboss.web.localhost.Engine]
ApplicationDispatcher[/qa-portal] Servlet.service() for servlet qaportal threw
exception
java.lang.NullPointerException
	at
org.apache.tapestry.multipart.DefaultMultipartDecoder.cleanup(DefaultMultipartDecoder.java:120)
	at org.apache.tapestry.request.RequestContext.cleanup(RequestContext.java:506)
	at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:285)
	at org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:326)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
	at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575)
	at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498)
	at org.apache.tapestry.jsp.URLRetriever.insertURL(URLRetriever.java:82)
	at org.apache.tapestry.jsp.AbstractLinkTag.doStartTag(AbstractLinkTag.java:105)
	at
org.apache.jsp.jadmfeditor_jsp._jspx_meth_tapestry_page_0(jadmfeditor_jsp.java:1706)
	at
org.apache.jsp.jadmfeditor_jsp._jspx_meth_authz_authorize_4(jadmfeditor_jsp.java:1679)
	at org.apache.jsp.jadmfeditor_jsp._jspService(jadmfeditor_jsp.java:255)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
	at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
	at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
	at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
	at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Mime
View raw message