RE: Re: Separate portlet app deploy. OrbeonPortletXFormFilter getContent() ()

Posted by Stian Sigvartsen on
URL: https://discuss.orbeon.com/Separate-portlet-app-deploy-OrbeonPortletXFormFilter-getContent-tp2955736p2968180.html

Hi Erik

It certainly sounds like we're experiencing the same problem.
And it's a very generic problem so will need to be fixed if this new Orbeon use case will be of any use to anyone...

I'm going to have a look into what methods on ServletResponse object the servlet code generated for a .jsp makes reference to.
I'm hoping that all that is needed is to override some more methods.  Do you concur?

This is of course unless there is some kind of serialisation to HTTP + deserialisation from HTTP (on the localhost) happening when you use the request dispatcher to forward/include the .jsp in a servlet.  This seems unlikely to be the case, but if it was then of course no ServletResponse wrapper pattern would ever work for this.

P.S. I suspect you will not get much response to your forum topic on the Liferay site because this is really a generic portlet filter issue.

Stian Sigvartsen


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: 08 October 2010 04:30
To: [hidden email]
Subject: [ops-users] Re: Separate portlet app deploy. OrbeonPortletXFormFilter getContent() ()


Stian,

You might be hitting this issue I reported on the Liferay forums
(assuming you are using Liferay):

http://www.liferay.com/community/forums/-/message_boards/message/5682233

I seems to me that this is a bug of the portlet implementation,
whereby the filter does not obtain the content of the filtered
resource. But I could be wrong!

(The separate deployment with portlets is very new, and the use case
it was developed for does not produce content with JSP.)

-Erik

On Tue, Oct 5, 2010 at 3:19 AM, Stian Sigvartsen
<[hidden email]> wrote:

> Hi
>
> I've been trying to the separate portlet app deployment method to work
> (http://wiki.orbeon.com/forms/doc/developer-guide/xforms-separate-deploy
> ment-with-portlets).
>
> However, when the OrbeonPortletXFormsFilter processes the response from
> my .jsp, it doesn't appear to find any content.  This is reflected by
> responseWrapper.getContent() returning null or empty string (I used
> Eclipse debugger to determine this is the issue).
>
> The code snippet which evaluates this from
> OrbeonPortletXFormsFilter.doFilter() is:
>
>        // Set document if not present AND output was intercepted
>        final boolean isEmptyContent;
>        if
> (renderRequest.getAttribute(OrbeonXFormsFilter.RENDERER_DOCUMENT_ATTRIBU
> TE_NAME) == null) {
>            final String content = responseWrapper.getContent();
>            if (content != null) {
>
> renderRequest.setAttribute(OrbeonXFormsFilter.RENDERER_DOCUMENT_ATTRIBUT
> E_NAME, content);
>            }
>            isEmptyContent = OrbeonXFormsFilter.isBlank(content);
>        } else {
>            // Assume content is not blank
>            isEmptyContent = false;
>        }
>
> After this code runs, isEmptyContent is set to false and hence the
> OrbeonTrampolineServlet is never used to replace xforms markup with
> HTML.
>
> Has anyone encountered this problem before?
>
> I'm using an Orbeon xforms nightly build from the end of August.
>
> I've spent a lot of time researching this issue with no luck.  I
> encountered a forum post describing the same problem, but no solution
> was posted
> (http://orbeon-forms-ops-users.24843.n4.nabble.com/OrbeonXFormsFilter-ne
> ver-forwards-to-Orbeon-td931256.html).
> I would really appreciate any help anyone can offer.
>
> Kind regards,
> Stian Sigvartsen
>
>
> --
> 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