Posted by
Alessandro Vernet on
Nov 17, 2009; 7:55am
URL: https://discuss.orbeon.com/xforms-output-mediatype-image-does-not-work-in-the-separate-deployment-mode-tp585891p622611.html
Markku,
On Mon, Nov 16, 2009 at 3:55 AM, Markku Laine <
[hidden email]> wrote:
> Well, sessions do get mixed up in my browser so this maybe it is a bug. I
> attached a sample Web application so that you can try it out yourself.
>
> Instructions:
> 1) Deploy both WAR files
> 2) Go to URL:
http://localhost:8080/session/> 3) Input text and click the "Store text in the session" link
> 4) Open a new tab and go to the URL:
http://localhost:8080/session/> 5) It initialized the input text field with the value you stored in the
> session using a different instance of the application --> bug?
Yes, I see that. And this is how it should behave. The session is
maintained through cookies, and if a window sets a cookie in your
browser, when you open a connection to the server through another
browser window, the browser will send the cookie that was set earlier.
If this is not the behavior you expect, I'd say you shouldn't use the
session. And indeed, many developers store date in the session just
because it is a convenient thing to do, and "well, who opens multiple
browser windows/tabs anyway?". As XForms developers, I think we should
store information in instances, and pass those instances to other
pages when they need that data.
> Here is a short description of what I am doing:
> * Parse the XHTML+XForms document
> * Extract all URIs i.e. link values (e.g., xforms:submission
> resource="...", xhtml:a href="...", etc.)
> * Before encoding URLs, the URIs need to be transformed into ASCII strings
> etc. AVTs in the URIs may cause problems here...
> * Encode the URIs with the following method: response.encodeURL( uriString
> );
> * Pass the modified URIs to the XSLT transformation, which replaces the
> original URIs with the modified ones (containing the JSESSIONID if needed)
For the <xforms:output mediatype="image/*">, you'll need to do the
rewrite after the XForms engine has run, in the epilogue. In essence,
some URLs can only be rewritten before the XForms engine runs (e.g.
submissions's resource="...") and other can only be handled after the
engine runs (e.g. <xforms:output mediatype="image/*"> or
<xforms:output mediatype="text/thml">). Maybe this rewriting would be
better handled by the XForms engine itself.
Alex
--
Orbeon Forms - Web forms, open-source, for the Enterprise
Orbeon's Blog:
http://www.orbeon.com/blog/My Twitter:
http://twitter.com/avernet--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet