I'm trying to retrofit an existing large Struts2
app with XForms. I've deployed the Thursday night build of Orbeon Forms
using the "separate deployment" approach described at http://www.orbeon.com/ops/doc/reference-xforms-java,
so Orbeon is deployed in /orbeon. The context path of the existing app is /abc. The app server is Tomcat
6.0.18 on Windows.
Once I got past some very painful issues around
HTML cleanliness (the subject of a later message), I'm having problems with URL
rewriting. A JSP reference {link rel="stylesheet" type="text/css" href="/css/scw.css" /} (angle brackets changed to
braces to be sure they get through this email) ends up being rewritten to
href="/abc/orbeon/abc/css/scw.css" (observed on the browser). Changing the
path to a relative one gives href="/abc/orbeon/css/scw.css".
To say the least I'm perplexed. How can I
prevent this extra /orbeon from being inserted? I'd appreciate any
hints.
Thanks,
Sean
---
Sean Hogan CLIXtec IT Consulting Inc. m: (709) 687-2275 e: [hidden email] e: [hidden email] w: http://clixtec.ca -- 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 |
Hi, this was the solution to a
similar (maybe the same) issue: Define this namespace for your
html document: xmlns:f="http://orbeon.org/oxf/xml/formatting" Add this attribute to your link
element: f:url-norewrite=”true” Like this <link rel="stylesheet"
type="text/css" href="/styles/style.css" title="Style" f:url-norewrite="true"
/> Hope this helps. Muzaffer From: Sean Hogan
(CLIXtec) [mailto:[hidden email]] I'm
trying to retrofit an existing large Struts2 app with XForms. I've
deployed the Thursday night build of Orbeon Forms using the "separate
deployment" approach described at http://www.orbeon.com/ops/doc/reference-xforms-java,
so Orbeon is deployed in /orbeon. The context path of the existing app is
/abc. The app server is Tomcat 6.0.18 on Windows. Once
I got past some very painful issues around HTML cleanliness (the subject of a
later message), I'm having problems with URL rewriting. A JSP
reference {link rel="stylesheet"
type="text/css"
href="/css/scw.css"
/} (angle brackets changed to braces to be sure
they get through this email) ends up being rewritten to
href="/abc/orbeon/abc/css/scw.css" (observed on the browser).
Changing the path to a relative one gives
href="/abc/orbeon/css/scw.css". To
say the least I'm perplexed. How can I prevent this extra /orbeon from
being inserted? I'd appreciate any hints. Thanks, Sean --- -- 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 |
Administrator
|
In reply to this post by Sean Hogan (CLIXtec)
We have a bug entered for this:
http://forge.ow2.org/tracker/index.php?func=detail&aid=310890&group_id=168&atid=350207 -Erik On Apr 18, 2009, at 4:36 PM, Sean Hogan (CLIXtec) wrote: > I'm trying to retrofit an existing large Struts2 app with XForms. > I've deployed the Thursday night build of Orbeon Forms using the > "separate deployment" approach described at http://www.orbeon.com/ops/doc/reference-xforms-java > , so Orbeon is deployed in /orbeon. The context path of the > existing app is /abc. The app server is Tomcat 6.0.18 on Windows. > > Once I got past some very painful issues around HTML cleanliness > (the subject of a later message), I'm having problems with URL > rewriting. A JSP reference {link rel="stylesheet" type="text/css" > href="/css/scw.css" /} (angle brackets changed to braces to be sure > they get through this email) ends up being rewritten to href="/abc/ > orbeon/abc/css/scw.css" (observed on the browser). Changing the > path to a relative one gives href="/abc/orbeon/css/scw.css". > > To say the least I'm perplexed. How can I prevent this extra / > orbeon from being inserted? I'd appreciate any hints. > > Thanks, > Sean > --- > Sean Hogan > CLIXtec IT Consulting Inc. > m: (709) 687-2275 > e: [hidden email] > e: [hidden email] > w: http://clixtec.ca > > -- > 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 Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.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 |
Thanks Erik and Muzaffer. For the time being I have hacked around this by
removing the html-rewrite from epilogue-servlet.xpl. Sean -------------------------------------------------- From: "Erik Bruchez" <[hidden email]> Sent: Monday, April 20, 2009 5:24 PM To: <[hidden email]> Subject: [ops-users] Re: Orbeon+Tomcat+Struts2 URI rewriting > We have a bug entered for this: > > http://forge.ow2.org/tracker/index.php?func=detail&aid=310890&group_id=168&atid=350207 > > -Erik > > On Apr 18, 2009, at 4:36 PM, Sean Hogan (CLIXtec) wrote: > >> I'm trying to retrofit an existing large Struts2 app with XForms. >> I've deployed the Thursday night build of Orbeon Forms using the >> "separate deployment" approach described at >> http://www.orbeon.com/ops/doc/reference-xforms-java >> , so Orbeon is deployed in /orbeon. The context path of the >> existing app is /abc. The app server is Tomcat 6.0.18 on Windows. >> >> Once I got past some very painful issues around HTML cleanliness >> (the subject of a later message), I'm having problems with URL >> rewriting. A JSP reference {link rel="stylesheet" type="text/css" >> href="/css/scw.css" /} (angle brackets changed to braces to be sure >> they get through this email) ends up being rewritten to href="/abc/ >> orbeon/abc/css/scw.css" (observed on the browser). Changing the >> path to a relative one gives href="/abc/orbeon/css/scw.css". >> >> To say the least I'm perplexed. How can I prevent this extra / >> orbeon from being inserted? I'd appreciate any hints. >> >> Thanks, >> Sean >> --- >> Sean Hogan >> CLIXtec IT Consulting Inc. >> m: (709) 687-2275 >> e: [hidden email] >> e: [hidden email] >> w: http://clixtec.ca >> >> -- >> 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 > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.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 |
In reply to this post by Erik Bruchez
Hi Erik. I think I might be swinging from one end of this bug to another.
As I mentioned in a previous message I changed the epilogue so that it doesn't execute html-rewrite. This "worked" in the sense that paths were being resolved correctly, and it allowed me to move to the next level. I was very surprised that the renderer didn't insert the normal stylesheet and Javascript references: /orbeon/xforms-server/config/theme/xforms.css /orbeon/xforms-server/config/theme/error.css /orbeon/xforms-server/config/theme/xforms-widgets.css /orbeon/xforms-server/ops/javascript/xforms.js I added them to the head section manually in order to get the display basically correct. Now the form is displayed properly, but every control throws a Javascript errors when activated. The details on the error page show a Tomcat 404 error for /xforms-server. It appears that maybe the /orbeon part is being stripped by the _setBasePaths part of ORBEON.xforms.Init(), even though it is necessary to refer to anything in the Orbeon app. So is separate deployment fundamentally non-functional? I briefly tried the other way but I'm going to need to refer to the main app in submissions and for some resource references, so it doesn't seem like the right way to go. (On the other hand I didn't expect my requirements to be unique.) Thanks again, Sean -------------------------------------------------- From: "Erik Bruchez" <[hidden email]> Sent: Monday, April 20, 2009 5:24 PM To: <[hidden email]> Subject: [ops-users] Re: Orbeon+Tomcat+Struts2 URI rewriting > We have a bug entered for this: > > http://forge.ow2.org/tracker/index.php?func=detail&aid=310890&group_id=168&atid=350207 > > -Erik > > On Apr 18, 2009, at 4:36 PM, Sean Hogan (CLIXtec) wrote: > >> I'm trying to retrofit an existing large Struts2 app with XForms. >> I've deployed the Thursday night build of Orbeon Forms using the >> "separate deployment" approach described at >> http://www.orbeon.com/ops/doc/reference-xforms-java >> , so Orbeon is deployed in /orbeon. The context path of the >> existing app is /abc. The app server is Tomcat 6.0.18 on Windows. >> >> Once I got past some very painful issues around HTML cleanliness >> (the subject of a later message), I'm having problems with URL >> rewriting. A JSP reference {link rel="stylesheet" type="text/css" >> href="/css/scw.css" /} (angle brackets changed to braces to be sure >> they get through this email) ends up being rewritten to href="/abc/ >> orbeon/abc/css/scw.css" (observed on the browser). Changing the >> path to a relative one gives href="/abc/orbeon/css/scw.css". >> >> To say the least I'm perplexed. How can I prevent this extra / >> orbeon from being inserted? I'd appreciate any hints. >> >> Thanks, >> Sean >> --- >> Sean Hogan >> CLIXtec IT Consulting Inc. >> m: (709) 687-2275 >> e: [hidden email] >> e: [hidden email] >> w: http://clixtec.ca >> >> -- >> 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 > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.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 |
In reply to this post by Sean Hogan (CLIXtec)
Hi,
I decided to start over, working upwards from a basic JSP, then adding Struts and so on. I never did determine what was incorrect in the original configuration, but ultimately I added everything I need! There are still some hurdles though. Regarding issue #310890 (rewrite issue in separate deployment), is there a workaround? I'm dealing with common menu generation JSP code that uses the Struts 'url' tag to generate URLs out of action references. These end up being absolute paths, so the result is as I described below: /abc/orbeon/abc/something.action. One particularly nasty effect of the issue is that I am unable to submit to a Struts action: <xforms:submission ... action="<s:url action="something" />" ... /> The only way I can get it to work at the moment is to hard-code the URL as http://server/context/something.action - okay for now but not for long. If there's no reasonable workaround, will the underlying bug be fixed anytime soon? Related to that, I'm trying to reference an XML schema using the xforms:model 'schema' attribute. The schema is stored in a sibling directory (/xf) to the JSP location (/xfjsp), both of which are in my own application's context. The schema cannot be found unless I use this bletcherous hack for the path: <xforms:model ... schema="/../xf/schema.xsd">... I have to do the same thing with <xforms:instance ... src="/../xf/something.xml" /> - I'm a bit surprised that even works actually! Is there a cleaner way to solve this? Thanks again, Sean -------------------------------------------------- From: "Sean Hogan (CLIXtec)" <[hidden email]> Sent: Tuesday, April 21, 2009 1:01 PM To: <[hidden email]> Subject: Re: [ops-users] Re: Orbeon+Tomcat+Struts2 URI rewriting > Hi Erik. I think I might be swinging from one end of this bug to another. > > As I mentioned in a previous message I changed the epilogue so that it > doesn't execute html-rewrite. This "worked" in the sense that paths were > being resolved correctly, and it allowed me to move to the next level. > > I was very surprised that the renderer didn't insert the normal stylesheet > and Javascript references: > > /orbeon/xforms-server/config/theme/xforms.css > /orbeon/xforms-server/config/theme/error.css > /orbeon/xforms-server/config/theme/xforms-widgets.css > /orbeon/xforms-server/ops/javascript/xforms.js > > I added them to the head section manually in order to get the display > basically correct. Now the form is displayed properly, but every control > throws a Javascript errors when activated. The details on the error page > show a Tomcat 404 error for /xforms-server. It appears that maybe the > /orbeon part is being stripped by the _setBasePaths part of > ORBEON.xforms.Init(), even though it is necessary to refer to anything in > the Orbeon app. > > So is separate deployment fundamentally non-functional? I briefly tried > the other way but I'm going to need to refer to the main app in > submissions and for some resource references, so it doesn't seem like the > right way to go. (On the other hand I didn't expect my requirements to be > unique.) > > Thanks again, > Sean > > -------------------------------------------------- > From: "Erik Bruchez" <[hidden email]> > Sent: Monday, April 20, 2009 5:24 PM > To: <[hidden email]> > Subject: [ops-users] Re: Orbeon+Tomcat+Struts2 URI rewriting > >> We have a bug entered for this: >> >> http://forge.ow2.org/tracker/index.php?func=detail&aid=310890&group_id=168&atid=350207 >> >> -Erik >> >> On Apr 18, 2009, at 4:36 PM, Sean Hogan (CLIXtec) wrote: >> >>> I'm trying to retrofit an existing large Struts2 app with XForms. >>> I've deployed the Thursday night build of Orbeon Forms using the >>> "separate deployment" approach described at >>> http://www.orbeon.com/ops/doc/reference-xforms-java >>> , so Orbeon is deployed in /orbeon. The context path of the >>> existing app is /abc. The app server is Tomcat 6.0.18 on Windows. >>> >>> Once I got past some very painful issues around HTML cleanliness >>> (the subject of a later message), I'm having problems with URL >>> rewriting. A JSP reference {link rel="stylesheet" type="text/css" >>> href="/css/scw.css" /} (angle brackets changed to braces to be sure >>> they get through this email) ends up being rewritten to href="/abc/ >>> orbeon/abc/css/scw.css" (observed on the browser). Changing the >>> path to a relative one gives href="/abc/orbeon/css/scw.css". >>> >>> To say the least I'm perplexed. How can I prevent this extra / >>> orbeon from being inserted? I'd appreciate any hints. >>> >>> Thanks, >>> Sean >>> --- >>> Sean Hogan >>> CLIXtec IT Consulting Inc. >>> m: (709) 687-2275 >>> e: [hidden email] >>> e: [hidden email] >>> w: http://clixtec.ca >>> >>> -- >>> 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 >> >> -- >> Orbeon Forms - Web Forms for the Enterprise Done the Right Way >> http://www.orbeon.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 |
Free forum by Nabble | Edit this page |