Login  Register

Re: RE: Re: RE: Re: supressing orbeonrendering with seperate deployment mode

Posted by Tambet Matiisen on Jan 20, 2011; 1:19pm
URL: https://discuss.orbeon.com/supressing-orbeonrendering-with-seperate-deployment-mode-tp3223490p3227536.html

Hi Christian!

If you can alter the servlet code, then you could create two servlets: one that does server-side processing and creates PDF; and another that generates XForms. You put the first servlet into directory that is not processed by XFormsFilter, and other one into directory where XFormsFilter kicks in.

Now, you always do submit to the first servlet. If the request parameters ask for PDF, then you return PDF. If navigation to another form is requested, then you do redirect (ServletResponse.sendRedirect()) to second servlet and pass on parameters, that are required. Of course you can pass only GET parameters this way.

Actually separating server-side processing code and user-interface code with Post/Redirect/Get pattern is pretty common for web development: http://en.wikipedia.org/wiki/Post/Redirect/Get

Alternative solution would be to define two submissions in XForms, one goes to first servlet, another one goes to second. Probably you have two different buttons in user interface for downloading PDF and moving to another form? Then those buttons call different XForms submissions.

Hope this helps.

  Tambet

On 20.01.2011 14:58, Christian Belka wrote:
I don't get the idea ...
 
I have a selfwritten servlet which is mapped to the Path /application/orbeon 
 
orbeon is mapped as filter to the url mapped above ...
 
in the normal case the servlet receives XForms documents (passed through the filter ) and answers with normal XHTML or XForms (which will be rendered by the orbeon filter )
 
Now in some certain cases the servlet respondes with non-XForm Data , like PDF's oder images ... then Orbeon also wants to render the response, which leads to errors ...
 
This is my problem ...
 
At the moment I solved the problem by linking to another servlet which generates the PDF from a different URL, but therfore i have to store my complete forms in the Session because redirecting the post dosn't work also ...
 
i hope this explains my problem better
 
best regards
 
christian


From: software developer [[hidden email]]
Sent: Donnerstag, 20. Januar 2011 13:01
To: [hidden email]
Subject: [ops-users] Re: RE: Re: supressing orbeonrendering with seperate deployment mode

Perhaps this is what you are looking for:
http://www.orbeon.com/orbeon/doc/processors-serializers-http


On Thu, Jan 20, 2011 at 9:25 AM, Christian Belka <[hidden email]> wrote:
I am not quite sure if this covers my problem ...
 
The request XML sended in the POST should be handled through orbeon ( XML Validation etc) , only the response should be modified ...
 
The current workaround is, I copy the XML Document recieved from the POST into the session and in the next step i open a different URL where the orbeon Filter won't match and deliver the non XML data there.
 
I just had the hope there would be another way !
 
best regards
 





--
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