Thomas Uhrig
Thomas Uhrig

Reputation: 31613

Passing XML data to a JSP with FormFaces (XForms)

I'm currently playing around with FormFaces to get familiar with XForms. I have written an XForm document that looks like this (I think that's the important part):

<xf:model id="model">
    <xf:instance id="default" src="questionnaire.xml" />
    <xf:submission action="http://localhost:8888/AUI_Example_Server/Submit.jsp" method="post" id="submit" />
</xf:model>

So, when I click on "Submit" at the end of my document, it makes a POST request to Submit.jsp. That works fine so far. In Submit.jsp I can read things like "request.getRequestURI()" from the POST request.

But how can I read the XML data itself?

EDIT: If I change the method to GET in my XForms document, I a list of parameters (like Submit.jsp?age=0&location=GE...). But I want to get an XML string instead.

Upvotes: 1

Views: 500

Answers (1)

Thomas Uhrig
Thomas Uhrig

Reputation: 31613

OK, I got it!

According to this post on SourceForge (the first answer) I made out the problem. I was running two servers (one for the static HTML pages and one for my JSP). And "because of JavaScript cross-site security restrictions you cannot submit to a page on another domain". That's it.

Upvotes: 1

Related Questions