Re: RE: Re: Re: Re: Orbeon Form Builder/Form Runner for a regular web site?

Posted by Erik Bruchez on
URL: https://discuss.orbeon.com/Orbeon-Form-Builder-Form-Runner-for-a-regular-web-site-tp2552615p2996306.html

Certainly we should not call setContentType(null). I fixed this:

http://github.com/orbeon/orbeon-forms/commit/50dc5931637666faf3d9c408e542322277c84547

Now as you say that might not be the actual source of the problem!

-Erik

On Tue, Oct 12, 2010 at 6:20 AM, darrencruse <[hidden email]> wrote:

>
> Tried some things this past weekend including using the LifeRay Web Proxy
> with Orbeon as well as writing my own portlet to use with the "separate
> deployment" approach.  Had various degrees of success but nothing 100% so
> this morning I went back to try the simple Orbeon bundled portlet approach
> once again with the latest nightly build (noticed there's been a change to
> the orbeon servlet filter).  But I'm getting exactly the same exceptions as
> before as reported by Stian above.  Where a null pointer exception results
> from the calls to setContentType getting passed null apparently because
> getContentType is returning null in this code:
>
>    public void render(RenderRequest request, RenderResponse response)
> throws PortletException, IOException {
>        try {
>            final Portlet2ExternalContext.BufferedResponse bufferedResponse
>                    = (Portlet2ExternalContext.BufferedResponse)
> request.getPortletSession().getAttribute(OXF_PORTLET_OUTPUT);
>            final Map bufferedResponseParameters
>                    = (Map)
> request.getPortletSession().getAttribute(OXF_PORTLET_OUTPUT_PARAMS);
>
>            // NOTE: Compare for deep equality as it seems that portlet
> containers may copy/update the parameter Map
>                        if (bufferedResponse != null && deepEquals(request.getParameterMap(),
> bufferedResponseParameters)) {
>                // The result of an action with the current parameters was a
>                // stream that we cached. Replay that stream and replace
> URLs.
>                // CHECK: what about mode / state? If they change, we ignore
> them totally.
>                response.setContentType(bufferedResponse.getContentType());
>                response.setTitle(bufferedResponse.getTitle() != null ?
> bufferedResponse.getTitle() : getTitle(request));
>                bufferedResponse.write(response);
>            } else {
>                final // Call service
>                PipelineContext pipelineContext = new PipelineContext();
>                pipelineContext.setAttribute(PORTLET_CONFIG,
> getPortletConfig());
>                final ExternalContext externalContext = new
> Portlet2ExternalContext(processorService, pipelineContext,
> getPortletContext(), contextInitParameters, request, response);
>                processorService.service(externalContext, pipelineContext);
>                // TEMP: The response is also buffered, because our
>                // rewriting algorithm only operates on Strings for now.
>                final Portlet2ExternalContext.DirectResponseTemp
> directResponse
>                        = (Portlet2ExternalContext.DirectResponseTemp)
> externalContext.getResponse();
>                response.setContentType(directResponse.getContentType());
>                response.setTitle(directResponse.getTitle() != null ?
> directResponse.getTitle() : getTitle(request));
>                directResponse.write(response);
>            }
>        } catch (Exception e) {
>            throw new PortletException(OXFException.getRootThrowable(e));
>        }
>    }
>
> Maybe it's wishful thinking but I remembered reading setContentType is no
> longer required under the JSR 286 portlet standard,
> http://developers.sun.com/portalserver/reference/techart/jsr286/jsr286_2.html#Compatibility
> as noted in this article
>
> So I actually tried to patch my orbeon.jar with a version of
> Orbeon2Portlet.java where I'd commented the two lines I bolded above.
> Unfortunately I think I goofed something up in building my patch though
> (maybe I used the wrong version of java?) - as the portlet would not even
> deploy when I did that (or do you think me removing those lines really did
> break it that badly?).
>
> I don't know Erik maybe you're thinking these exceptions are just a symptom
> of that other problem you were talking about with getting content i.e. that
> bug you said you reported on the LifeRay forums...
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Orbeon-Form-Builder-Form-Runner-for-a-regular-web-site-tp2552615p2991841.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws