Uploaded image for project: 'Portlet Bridge'
  1. Portlet Bridge
  2. PBR-125

Cannot use character '%' in Form submissions

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.0.0.CR1
    • Fix Version/s: 2.0.0.CR1
    • Component/s: Seam
    • Labels:
      None

      Description

      Hi,

      If i use the character '%' as input in a form submission, i get the following exception:

      12:44:10,552 ERROR [STDERR] 04.11.2009 12:44:10 org.jboss.portletbridge.AjaxPortletBridge doFacesRequest
      SCHWERWIEGEND: Error processing execute lifecycle
      javax.faces.FacesException: java.lang.IllegalArgumentException: URLDecoder: Incomplete trailing escape (%) pattern
      at org.jboss.portletbridge.lifecycle.LifecyclePhase.execute(LifecyclePhase.java:80)
      at org.jboss.portletbridge.lifecycle.PortletLifecycle.render(PortletLifecycle.java:155)
      at org.jboss.portletbridge.AjaxPortletBridge.render(AjaxPortletBridge.java:1082)
      at org.jboss.portletbridge.AjaxPortletBridge.renderResponse(AjaxPortletBridge.java:896)
      at org.jboss.portletbridge.AjaxPortletBridge.doFacesRequest(AjaxPortletBridge.java:636)
      at javax.portlet.faces.GenericFacesPortlet.doFacesDispatch(GenericFacesPortlet.java:598)
      at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:486)
      at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
      at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:457)
      at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
      at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:568)
      at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159)
      at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:80)
      at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:505)
      at org.gatein.pc.portlet.container.ContainerPortletDispatcher.invoke(ContainerPortletDispatcher.java:42)
      at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
      at org.gatein.pc.portlet.aspects.EventPayloadInterceptor.invoke(EventPayloadInterceptor.java:196)
      at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
      at org.gatein.pc.portlet.aspects.RequestAttributeConversationInterceptor.invoke(RequestAttributeConversationInterceptor.java:119)
      at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
      at org.gatein.pc.portlet.aspects.CCPPInterceptor.invoke(CCPPInterceptor.java:65)
      at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
      at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
      at org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor.access$001(ContextDispatcherInterceptor.java:49)
      at org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor$1.doCallback(ContextDispatcherInterceptor.java:123)
      at org.gatein.wci.command.CommandDispatcher$CallbackCommand.execute(CommandDispatcher.java:82)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.gatein.wci.command.CommandServlet.doGet(CommandServlet.java:135)
      at org.gatein.wci.command.CommandServlet.doPost(CommandServlet.java:166)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
      at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
      at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
      at org.gatein.wci.command.CommandServlet.include(CommandServlet.java:84)
      at org.gatein.wci.command.CommandDispatcher.include(CommandDispatcher.java:58)
      at org.gatein.wci.tomcat.TC6ServletContainerContext.include(TC6ServletContainerContext.java:86)
      at org.gatein.wci.impl.DefaultServletContainer.include(DefaultServletContainer.java:190)
      at org.gatein.pc.portlet.impl.spi.AbstractServerContext.dispatch(AbstractServerContext.java:69)
      at org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:77)
      at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
      at org.gatein.pc.portlet.aspects.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:69)
      at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
      at org.gatein.pc.portlet.aspects.ValveInterceptor.invoke(ValveInterceptor.java:75)
      at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
      at org.gatein.pc.portlet.container.ContainerPortletInvoker.invoke(ContainerPortletInvoker.java:117)
      at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
      at org.gatein.pc.portlet.state.producer.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java:230)
      at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
      at org.gatein.pc.portlet.aspects.PortletCustomizationInterceptor.invoke(PortletCustomizationInterceptor.java:76)
      at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
      at org.gatein.pc.portlet.aspects.ConsumerCacheInterceptor.invoke(ConsumerCacheInterceptor.java:162)
      at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
      at org.gatein.pc.portal.jsp.PagePortletControllerContext.invoke(PagePortletControllerContext.java:117)
      at org.gatein.pc.controller.impl.AbstractPortletControllerContext.invoke(AbstractPortletControllerContext.java:191)
      at org.gatein.pc.controller.PortletController.render(PortletController.java:235)
      at org.gatein.pc.portal.jsp.PortalRenderResponse.render(PortalRenderResponse.java:121)
      at org.gatein.pc.portal.jsp.PortalRenderResponse.render(PortalRenderResponse.java:138)
      at org.gatein.pc.portal.jsp.PortalRenderResponse.<init>(PortalRenderResponse.java:91)
      at org.gatein.pc.portal.jsp.ControllerFilter.doFilter(ControllerFilter.java:272)
      at org.gatein.pc.portal.jsp.ControllerFilter.doFilter(ControllerFilter.java:92)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.gatein.pc.portal.ErrorHandlingFilter.doFilter(ErrorHandlingFilter.java:61)
      at org.gatein.pc.portal.ErrorHandlingFilter.doFilter(ErrorHandlingFilter.java:53)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11Connecti
      12:44:10,552 ERROR [STDERR] onHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.IllegalArgumentException: URLDecoder: Incomplete trailing escape (%) pattern
      at java.net.URLDecoder.decode(URLDecoder.java:168)
      at org.jboss.portletbridge.context.PortalActionURL.decodeURL(PortalActionURL.java:100)
      at org.jboss.portletbridge.context.PortalActionURL.setQueryString(PortalActionURL.java:318)
      at org.jboss.portletbridge.context.PortalActionURL.<init>(PortalActionURL.java:93)
      at org.jboss.portletbridge.context.AbstractExternalContext.encodeActionURL(AbstractExternalContext.java:517)
      at org.jboss.seam.ui.util.ViewUrlBuilder.getEncodedUrl(ViewUrlBuilder.java:52)
      at org.jboss.seam.ui.component.UISeamCommandBase.getUrl(UISeamCommandBase.java:120)
      at org.jboss.seam.ui.renderkit.LinkRendererBase.doEncodeBegin(LinkRendererBase.java:26)
      at org.jboss.seam.ui.util.cdk.RendererBase.encodeBegin(RendererBase.java:79)
      at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:813)
      at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:275)
      at org.richfaces.renderkit.AbstractTableRenderer.encodeHeaderFacets(AbstractTableRenderer.java:303)
      at org.richfaces.renderkit.AbstractTableRenderer.encodeHeader(AbstractTableRenderer.java:196)
      at org.richfaces.renderkit.AbstractTableRenderer.encodeTableStructure(AbstractTableRenderer.java:159)
      at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:140)
      at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:128)
      at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:100)
      at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:813)
      at javax.faces.component.UIData.encodeBegin(UIData.java:967)
      at org.ajax4jsf.component.UIDataAdaptor.encodeBegin(UIDataAdaptor.java:1202)
      at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:275)
      at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
      at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:200)
      at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:195)
      at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:120)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
      at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
      at org.jboss.portletbridge.application.PortletViewHandler.renderView(PortletViewHandler.java:227)
      at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
      at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
      at org.jboss.portletbridge.lifecycle.RenderResponsePhase.executePhase(RenderResponsePhase.java:58)
      at org.jboss.portletbridge.lifecycle.LifecyclePhase.execute(LifecyclePhase.java:72)
      ... 88 more
      12:44:10,552 DEBUG [org.jboss.seam.contexts.FacesLifecycle] >>> Begin exception recovery

      see also http://www.jboss.org/index.html?module=bb&op=viewtopic&t=162109&postdays=0&postorder=asc&start=0 :
      >>>
      AbstractExternalContext.encodeActionUrl()
      is called with encoded url parameters in action phase and without url encoded parameters for link creation in render phase.

      in seam-ui 2.2.0 in UISeamCommandBase we find:
      ViewUrlBuilder url = new ViewUrlBuilder(viewId, getFragment(), !isPortletRequest(getFacesContext()));

      so this is intended behaviour in portlet environment...very strange to me, without this addition in seam-ui this stuff would work?! what was the intention? ok the seam guys know...
      or should it be the other way around and the action phase should have decoded the url parameters before the callout to AbstractExternalContext.encodeActionUrl()?
      <<<

      Should really be resolved, such a behaviour is not production ready and cannot communicated as "live with it" to a customer.

      Best regards,
      André

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                alexsmirnov Alexander Smirnov
                Reporter:
                andre.pankraz Andre Pankraz
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: