Loading Resources In "Seperate Deployment"

classic Classic list List threaded Threaded
46 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Re[2]: Loading Resources In "Seperate Deployment"

BitByter
Tuesday, April 17, 2007, 9:49:38 AM, Erik wrote:

> All the resources needed by the XForms engine are properly loaded. You
> don't have to worry about those.

Well, currently this seems false. My Tomcat access log says:

127.0.0.1 - - [17/Apr/2007:11:56:46 +0100] "GET /config/theme/orbeon.css HTTP/1.1" 404 1024
127.0.0.1 - - [17/Apr/2007:11:56:46 +0100] "GET /mywebapp/ops_nightly/xforms-server/xforms-min.css HTTP/1.1" 404 1129
127.0.0.1 - - [17/Apr/2007:11:56:46 +0100] "GET /mywebapp/ops_nightly/xforms-server/xforms-min.js HTTP/1.1" 404 1126
127.0.0.1 - - [17/Apr/2007:11:56:46 +0100] "GET /config/theme/xforms-widgets.css HTTP/1.1" 404 1048

These files could not be loaded by the browser (= status code 404). But I
assume that at least "xforms-min.js" is required for XForms processing. Any
idea on how to solve this problem with the "seperate deployment"?

- bitbyter





--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Loading Resources In "Seperate Deployment"

Erik Bruchez
Administrator
BitByter,

 >> All the resources needed by the XForms engine are properly loaded. You
 >> don't have to worry about those.
 >
 > Well, currently this seems false. My Tomcat access log says:
 >
 > 127.0.0.1 - - [17/Apr/2007:11:56:46 +0100] "GET
/config/theme/orbeon.css HTTP/1.1" 404 1024

This is a bug: theme-plain.xsl must not refer to orbeon.css. I entered a
bug and fixed it:

 
http://forge.objectweb.org/tracker/index.php?func=detail&aid=306937&group_id=168&atid=350207

 > 127.0.0.1 - - [17/Apr/2007:11:56:46 +0100] "GET
/config/theme/xforms-widgets.css HTTP/1.1" 404 1048

This is also a bug, which I just entered:

 
http://forge.objectweb.org/tracker/index.php?func=detail&aid=306938&group_id=168&atid=350207

As a first step, I fixed the fact that loading this CSS is attempted
even if you don't use any widget:* elements.

 > These files could not be loaded by the browser (= status code 404). But I
 > assume that at least "xforms-min.js" is required for XForms
processing. Any
 > idea on how to solve this problem with the "seperate deployment"?

 > 127.0.0.1 - - [17/Apr/2007:11:56:46 +0100] "GET
/mywebapp/ops_nightly/xforms-server/xforms-min.css HTTP/1.1" 404 1129
 > 127.0.0.1 - - [17/Apr/2007:11:56:46 +0100] "GET
/mywebapp/ops_nightly/xforms-server/xforms-min.js HTTP/1.1" 404 1126

This is designed to work out of the box and I don't reproduce it. Can
you check ops-nightly/WEB-INF/web.xml and tell me what if you have
this exact mapping:

<servlet-mapping>
     <servlet-name>ops-xforms-server-servlet</servlet-name>
     <url-pattern>/xforms-server/*</url-pattern>
</servlet-mapping>

That's including the trailing "/*" in "/xforms-server/*". It should be
there, but you never know.

-Erik

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re[2]: Loading Resources In "Seperate Deployment"

BitByter
Tuesday, April 17, 2007, 1:19:12 PM, Erik wrote:


>> 127.0.0.1 - - [17/Apr/2007:11:56:46 +0100] "GET /mywebapp/ops_nightly/xforms-server/xforms-min.css HTTP/1.1" 404 1129
>> 127.0.0.1 - - [17/Apr/2007:11:56:46 +0100] "GET /mywebapp/ops_nightly/xforms-server/xforms-min.js HTTP/1.1" 404 1126
>
> This is designed to work out of the box and I don't reproduce it. Can
> you check ops-nightly/WEB-INF/web.xml and tell me what if you have
> this exact mapping:
>
> <servlet-mapping>
>      <servlet-name>ops-xforms-server-servlet</servlet-name>
>      <url-pattern>/xforms-server/*</url-pattern>
> </servlet-mapping>
>
> That's including the trailing "/*" in "/xforms-server/*". It should be
> there, but you never know.

Currently I'm working with Orbeon Forms 3.5.1.200704170742. And yes, the
trailing "/*" is present. For convinience I've attached the "web.xml". Hope
you can help me with a workaround/solution for this.  :)

By the way, did you successfully port/move the bookcast example to an
external/separate web app? If yes, could you email me that WAR?

- bitbyter

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

web.xml (22K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Loading Resources In "Seperate Deployment"

Erik Bruchez
Administrator
BitByter wrote:

> Tuesday, April 17, 2007, 1:19:12 PM, Erik wrote:
>
>
>>> 127.0.0.1 - - [17/Apr/2007:11:56:46 +0100] "GET /mywebapp/ops_nightly/xforms-server/xforms-min.css HTTP/1.1" 404 1129
>>> 127.0.0.1 - - [17/Apr/2007:11:56:46 +0100] "GET /mywebapp/ops_nightly/xforms-server/xforms-min.js HTTP/1.1" 404 1126
>> This is designed to work out of the box and I don't reproduce it. Can
>> you check ops-nightly/WEB-INF/web.xml and tell me what if you have
>> this exact mapping:
>>
>> <servlet-mapping>
>>      <servlet-name>ops-xforms-server-servlet</servlet-name>
>>      <url-pattern>/xforms-server/*</url-pattern>
>> </servlet-mapping>
>>
>> That's including the trailing "/*" in "/xforms-server/*". It should be
>> there, but you never know.
>
>
> Currently I'm working with Orbeon Forms 3.5.1.200704170742. And yes, the
> trailing "/*" is present. For convinience I've attached the "web.xml". Hope
> you can help me with a workaround/solution for this.  :)
>
> By the way, did you successfully port/move the bookcast example to an
> external/separate web app? If yes, could you email me that WAR?
Yes I did manage to do that. The WAR is about 15K so I attach it to this
email. You can deploy it into context /my-app, or any context you like.
The settings in web.xml assume that Orbeon Forms is under context /ops,
but you can change that if you want.

You can access the following examples:

   /my-app/xforms-jsp/guess-the-number/
   /my-app/xforms-jsp/bookcast/
   /my-app/xforms-jsp/flickr-search/

(The latter also requires dom4j-1_6_1.jar under WEB-INF/lib, but I did
not include it for reasons of size.)

-Erik

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

my-app.war (20K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re[2]: Loading Resources In "Seperate Deployment"

BitByter
Tuesday, April 17, 2007, 4:02:08 PM, Erik wrote:


> Yes I did manage to do that. The WAR is about 15K so I attach it to this
> email. You can deploy it into context /my-app, or any context you like.
> The settings in web.xml assume that Orbeon Forms is under context /ops,
> but you can change that if you want.
>
> You can access the following examples:
>
>    /my-app/xforms-jsp/guess-the-number/
>    /my-app/xforms-jsp/bookcast/
>    /my-app/xforms-jsp/flickr-search/
>
> (The latter also requires dom4j-1_6_1.jar under WEB-INF/lib, but I did
> not include it for reasons of size.)

I deployed your WAR to the "/my-app" context and added "<Context
path="/my-app" crossContext="true" />" to my Tomcat's "server.xml" and
adapted the "web.xml" of your web app to point to "/ops_nightly", which is
where I got OPS deployed. Unfortunately non of the examples work for me.

The bookcast example shows an error page with an ValidationException,
complaining about the "schema.xsd". I assume this is because the nightly
build that I currently use (3.5.1.200704170742) does not include the fix for
the relative paths, yet.

And  when  I  load  "guess-the-number" with my browser, my Tomcat access log
complains:

127.0.0.1 - - [17/Apr/2007:16:33:44 +0100] "GET /config/theme/orbeon.css HTTP/1.1" 404 1024
127.0.0.1 - - [17/Apr/2007:16:33:44 +0100] "GET /my-app/ops_nightly/xforms-server/xforms-min.css HTTP/1.1" 404 1096
127.0.0.1 - - [17/Apr/2007:16:33:44 +0100] "GET /my-app/ops_nightly/xforms-server/xforms-min.js HTTP/1.1" 404 1093
127.0.0.1 - - [17/Apr/2007:16:33:44 +0100] "GET /config/theme/xforms-widgets.css HTTP/1.1" 404 1048

And the attached pictures shows how it looks like in my browser.

So when you say that your WAR works in your environment, I think this may be
because you got OPS deployed to "/ops" context. I will try changing my OPS
context from "/ops_nightly" to "/ops" and see if it works then.

Would be great if maybe someone else could try to deploy your WAR and test
if those XForms work.

- bitbyter




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re[3]: Loading Resources In "Seperate Deployment"

BitByter
Sorry, forgot to attach the screenshot.



Tuesday, April 17, 2007, 4:38:49 PM, BitByter wrote:

> Tuesday, April 17, 2007, 4:02:08 PM, Erik wrote:


>> Yes I did manage to do that. The WAR is about 15K so I attach it to this
>> email. You can deploy it into context /my-app, or any context you like.
>> The settings in web.xml assume that Orbeon Forms is under context /ops,
>> but you can change that if you want.
>>
>> You can access the following examples:
>>
>>    /my-app/xforms-jsp/guess-the-number/
>>    /my-app/xforms-jsp/bookcast/
>>    /my-app/xforms-jsp/flickr-search/
>>
>> (The latter also requires dom4j-1_6_1.jar under WEB-INF/lib, but I did
>> not include it for reasons of size.)

> I deployed your WAR to the "/my-app" context and added "<Context
> path="/my-app" crossContext="true" />" to my Tomcat's "server.xml" and
> adapted the "web.xml" of your web app to point to "/ops_nightly", which is
> where I got OPS deployed. Unfortunately non of the examples work for me.

> The bookcast example shows an error page with an ValidationException,
> complaining about the "schema.xsd". I assume this is because the nightly
> build that I currently use (3.5.1.200704170742) does not include the fix for
> the relative paths, yet.

> And  when  I  load  "guess-the-number" with my browser, my Tomcat access log
> complains:

> 127.0.0.1 - - [17/Apr/2007:16:33:44 +0100] "GET /config/theme/orbeon.css HTTP/1.1" 404 1024
> 127.0.0.1 - - [17/Apr/2007:16:33:44 +0100] "GET
> /my-app/ops_nightly/xforms-server/xforms-min.css HTTP/1.1" 404 1096
> 127.0.0.1 - - [17/Apr/2007:16:33:44 +0100] "GET
> /my-app/ops_nightly/xforms-server/xforms-min.js HTTP/1.1" 404 1093
> 127.0.0.1 - - [17/Apr/2007:16:33:44 +0100] "GET
> /config/theme/xforms-widgets.css HTTP/1.1" 404 1048

> And the attached pictures shows how it looks like in my browser.

> So when you say that your WAR works in your environment, I think this may be
> because you got OPS deployed to "/ops" context. I will try changing my OPS
> context from "/ops_nightly" to "/ops" and see if it works then.

> Would be great if maybe someone else could try to deploy your WAR and test
> if those XForms work.

> - bitbyter





--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

guess-the-number.jpg (33K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re[3]: Loading Resources In "Seperate Deployment"

BitByter
In reply to this post by BitByter
Tuesday, April 17, 2007, 4:38:49 PM, BitByter wrote:

> So when you say that your WAR works in your environment, I think this may be
> because you got OPS deployed to "/ops" context. I will try changing my OPS
> context from "/ops_nightly" to "/ops" and see if it works then.

Yes, after changing the context of my OPS installation to "/ops" the
"guess-the-number" application works fine. So it seems to be important to
deploy OPS to the "/ops" context.

Anyway, the bookcast exmaple now also is almost running as it should. An
error message in the browser is just saying "XForms error: Unable to
retrieve XForms engine state from session cache." Any idea what now might be
wrong? The Tomcat log does not show any excpetion or warning. :(

What might be the reason that Orbeon Forms can't restore its state?


- bitbyter




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Loading Resources In "Seperate Deployment"

Erik Bruchez
Administrator
In reply to this post by BitByter
BitByter,

 > The bookcast example shows an error page with an
 > ValidationException, complaining about the "schema.xsd". I assume
 > this is because the nightly build that I currently use
 > (3.5.1.200704170742) does not include the fix for the relative
 > paths, yet.

Yes, better use the latest nighly.

 > And  when  I  load  "guess-the-number" with my browser, my Tomcat
access log
 > complains:
 >
 > 127.0.0.1 - - [17/Apr/2007:16:33:44 +0100] "GET
/config/theme/orbeon.css HTTP/1.1" 404 1024
 > 127.0.0.1 - - [17/Apr/2007:16:33:44 +0100] "GET
/my-app/ops_nightly/xforms-server/xforms-min.css HTTP/1.1" 404 1096
 > 127.0.0.1 - - [17/Apr/2007:16:33:44 +0100] "GET
/my-app/ops_nightly/xforms-server/xforms-min.js HTTP/1.1" 404 1093
 > 127.0.0.1 - - [17/Apr/2007:16:33:44 +0100] "GET
/config/theme/xforms-widgets.css HTTP/1.1" 404 1048
 >
 > And the attached pictures shows how it looks like in my browser.
 >
 > So when you say that your WAR works in your environment, I think this
may be
 > because you got OPS deployed to "/ops" context. I will try changing
my OPS
 > context from "/ops_nightly" to "/ops" and see if it works then.

Bingo! This comes down to an error in the documentation, which must
read:

   "The <url-pattern> defined under the second <filter-mapping> has the
    value /ops/*. This is necessary to allow for all Orbeon Forms
    resources, such as JavaScript, CSS, and Ajax server, to be
    accessible. This /ops/* value is related to the default context
    into which you deploy Orbeon Forms: if you change you context, you
    change this value as well."

I downloaded the latest nightly build, deployed it into /ops-nightly,
and updated the web.xml for my-app to point to "ops-nightly" instead
of "ops", and things now work in the other context.

I also replaced the paths starting with "/ops" with "/ops-nightly" in
the JSP file so that the application can access the eXist database
(deployed under /ops-nightly) and images.

-Erik

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re[2]: Loading Resources In "Seperate Deployment"

BitByter
Tuesday, April 17, 2007, 6:32:26 PM, Erik wrote:

 >> The bookcast example shows an error page with an
 >> ValidationException, complaining about the "schema.xsd". I assume
 >> this is because the nightly build that I currently use
 >> (3.5.1.200704170742) does not include the fix for the relative
 >> paths, yet.

> Yes, better use the latest nighly.

I got Orbeon Forms Release 3.5.1.200704171642 running now.


> Bingo! This comes down to an error in the documentation, which must
> read:
>
>    "The <url-pattern> defined under the second <filter-mapping> has the
>     value /ops/*. This is necessary to allow for all Orbeon Forms
>     resources, such as JavaScript, CSS, and Ajax server, to be
>     accessible. This /ops/* value is related to the default context
>     into which you deploy Orbeon Forms: if you change you context, you
>     change this value as well."

Such things happen when you strictly follow the documentation...   ;-)


> I downloaded the latest nightly build, deployed it into /ops-nightly,
> and updated the web.xml for my-app to point to "ops-nightly" instead
> of "ops", and things now work in the other context.
>
> I also replaced the paths starting with "/ops" with "/ops-nightly" in
> the JSP file so that the application can access the eXist database
> (deployed under /ops-nightly) and images.


Now on my side two things are open.

First how do I relatively reference images when I package them in my own
WAR? Your example WAR simply reference the images present in the "ops.war".

Far more import is that I get a red error message in the browser saying
"XForms error: Unable to retrieve XForms engine state from session cache."
as soon as I try to enter something into an input control. Strange is that
both example applications (bookcast and guess-the-number) from your WAR work
fine, but when I deploy those into my WAR, the above mentioned error
appears. Any idea why this happens or how I might find out the reason?

- bitbyter

PS: Thanks for the great support so far, Erik & Alex!   :)




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re[3]: Loading Resources In "Seperate Deployment"

BitByter

Wednesday, April 18, 2007, 10:07:28 AM, BitByter wrote:


> First how do I relatively reference images when I package them in my own
> WAR? Your example WAR simply reference the images present in the "ops.war".
>
> Far more import is that I get a red error message in the browser saying
> "XForms error: Unable to retrieve XForms engine state from session cache."
> as soon as I try to enter something into an input control. Strange is that
> both example applications (bookcast and guess-the-number) from your WAR work
> fine, but when I deploy those into my WAR, the above mentioned error
> appears. Any idea why this happens or how I might find out the reason?


Anybody out there that could help with these problems? Especially with the
second, failing to obtain the session cache? Any help is appreciated!

Is there maybe also a source tarball available with the nightly builds, so
that I could try to debug that error?

- bitbyter





--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re[3]: Loading Resources In "Seperate Deployment"

Joseph Lawrence
Hi Bitbyter,
    Try changing the state-handling from 'session' to 'client' in the oxf:/config/properties.xml file.
ie,
    <property as="xs:string"  name="oxf.xforms.state-handling"                       value="session"/>

to

    <property as="xs:string"  name="oxf.xforms.state-handling"                       value="client"/>

Thanks
Joseph Lawrence
Stabilix Solutions

BitByter <[hidden email]> wrote:

Wednesday, April 18, 2007, 10:07:28 AM, BitByter wrote:


> First how do I relatively reference images when I package them in my own
> WAR? Your example WAR simply reference the images present in the "ops.war".
>
> Far more import is that I get a red error message in the browser saying
> "XForms error: Unable to retrieve XForms engine state from session cache."
> as soon as I try to enter something into an input control. Strange is that
> both example applications (bookcast and guess-the-number) from your WAR work
> fine, but when I deploy those into my WAR, the above mentioned error
> appears. Any idea why this happens or how I might find out the reason?


Anybody out there that could help with these problems? Especially with the
second, failing to obtain the session cache? Any help is appreciated!

Is there maybe also a source tarball available with the nightly builds, so
that I could try to debug that error?

- bitbyter




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re[5]: Loading Resources In "Seperate Deployment"

BitByter
Friday, April 20, 2007, 11:31:22 AM, Joseph wrote:

> Hi Bitbyter,
>     Try changing the state-handling from 'session' to 'client' in the oxf:/config/properties.xml file.
> ie,
>     <property as="xs:string"  name="oxf.xforms.state-handling"            value="session"/>
> to
>     <property as="xs:string"  name="oxf.xforms.state-handling"            value="client"/>


Yeah, that solved the problem with the session (cache).  :) Many thanks!

Now just missing a solution to load images with a relative path from the own
WAR file. Maybe any ideas about that?

Cheers,
bitbyter





--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re[5]: Loading Resources In "Seperate Deployment"

Alessandro Vernet
Administrator
On 4/20/07, BitByter <[hidden email]> wrote:
> Yeah, that solved the problem with the session (cache).  :) Many thanks!

Note that when using the client mode, more data is exchanged between
the client and the server. This can become significant if you have
large instances. You can find a discussion of the benefits and
drawbacks of each approach here:

http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-state-handling

> Now just missing a solution to load images with a relative path from the own
> WAR file. Maybe any ideas about that?

Isn't this issue is not resolved in the WAR Erik sent earlier? If not,
could you share with us a war that reproduces the issue you are
seeing?

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Loading Resources In "Seperate Deployment"

Erik Bruchez
Administrator
In reply to this post by BitByter
BitByter wrote:

> First how do I relatively reference images when I package them in my own
> WAR? Your example WAR simply reference the images present in the "ops.war".

The same way you would do from any JSP page, right? E.g. if you page is
loaded in /xforms-jsp/my-page.jsp, and you have an image under
/images/load.gif, then you can refer to it with:

<img src="../images/load.gif"/>


> Far more import is that I get a red error message in the browser saying
> "XForms error: Unable to retrieve XForms engine state from session cache."
> as soon as I try to enter something into an input control. Strange is that
> both example applications (bookcast and guess-the-number) from your WAR work
> fine, but when I deploy those into my WAR, the above mentioned error
> appears. Any idea why this happens or how I might find out the reason?

I don't reproduce this. This seems to indicate that you don't have a
working session. Do you have cookies enabled in your browser? Can you
try clearing them, or try with another browser?

-Erik

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re[2]: Loading Resources In "Seperate Deployment"

BitByter
Saturday, April 21, 2007, 9:26:54 AM, Erik wrote:

> BitByter wrote:

>> First how do I relatively reference images when I package them in my own
>> WAR? Your example WAR simply reference the images present in the "ops.war".

> The same way you would do from any JSP page, right? E.g. if you page is
> loaded in /xforms-jsp/my-page.jsp, and you have an image under
> /images/load.gif, then you can refer to it with:
>
> <img src="../images/load.gif"/>

Ahh  ok,  so it is not possible to use absolute path names which are relativ
to the web app's context path. In the above example e.g. "/images/load.gif"?



>> Far more import is that I get a red error message in the browser saying
>> "XForms error: Unable to retrieve XForms engine state from session cache."
>> as soon as I try to enter something into an input control. Strange is that
>> both example applications (bookcast and guess-the-number) from your WAR work
>> fine, but when I deploy those into my WAR, the above mentioned error
>> appears. Any idea why this happens or how I might find out the reason?

> I don't reproduce this. This seems to indicate that you don't have a
> working session. Do you have cookies enabled in your browser? Can you
> try clearing them, or try with another browser?

I've  tried  clearing all cookies and with Opera, Firefox and IE as browser.
Always  the  same errore when using "session" as "state-handling". Any ideas
how  I  might find out the reason for the problem? Is it possible to package
the  source  files  with the nightly buiilds, so I could try to step through
with the debugger?

- bitbyter








--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re[7]: Loading Resources In "Seperate Deployment"

BitByter
In reply to this post by Alessandro Vernet

Saturday, April 21, 2007, 1:43:05 AM, Alex wrote:

> On 4/20/07, BitByter <[hidden email]> wrote:
>> Yeah, that solved the problem with the session (cache).  :) Many thanks!

> Note that when using the client mode, more data is exchanged between
> the client and the server. This can become significant if you have
> large instances. You can find a discussion of the benefits and
> drawbacks of each approach here:
>
> http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-state-handling

Thanks for the infos, Alex. But as long as server side state handling does
not work with my web app, I'll have to switch to client side state
hanndling. Of course it would be great if I could decide on my own which one
to  use.  :)    Thus  any  help is welcome to find out why server side state
handling does not work.


>> Now just missing a solution to load images with a relative path from the own
>> WAR file. Maybe any ideas about that?
>>
> Isn't this issue is not resolved in the WAR Erik sent earlier? If not,
> could you share with us a war that reproduces the issue you are
> seeing?

Well,  Erik is just referencing the images that are packaged with "ops.war",
as his own WAR does not include any image files.  :)  I thought that I could
use  absolute path names for the images, just omitting the web app's context
path, e.g. "/images/save.gif". But this does not seem to be the case.

- bitbyter





--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Loading Resources In "Seperate Deployment"

Erik Bruchez
Administrator
In reply to this post by BitByter
BitByter wrote:

>> <img src="../images/load.gif"/>
>
> Ahh  ok,  so it is not possible to use absolute path names which are relativ
> to the web app's context path. In the above example e.g. "/images/load.gif"?

I guess ideally this should be configurable.

URLs are automatically rewritten when using XForms the traditional way
in Orbeon Forms (i.e. without JSP).

For this recent implementation of JSP support, we have decided to
disable URL rewriting for two reasons:

* It was just easier ;-)

* As far as I know you usually don't have any such rewriting when
   writing regular JSPs.

Technically, of course, this is doable, and could be made optional. I
added an RFE, although I can't promise we'll work on it ASAP:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=306956&group_id=168&atid=350207

>> I don't reproduce this. This seems to indicate that you don't have a
>> working session. Do you have cookies enabled in your browser? Can you
>> try clearing them, or try with another browser?
>
> I've  tried  clearing all cookies and with Opera, Firefox and IE as browser.
> Always  the  same errore when using "session" as "state-handling". Any ideas
> how  I  might find out the reason for the problem? Is it possible to package
> the  source  files  with the nightly buiilds, so I could try to step through
> with the debugger?

You can also get the source from CVS:

   http://forge.objectweb.org/scm/?group_id=168

Use a tag like:

   TAG_OPS_3_5_1_200704210004

(replace the end with the actual nightly build number).

-Erik

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Loading Resources In

Markku Laine
In reply to this post by Erik Bruchez
-- BitByter wrote :
Monday, April 16, 2007, 11:41:22 PM, Alex wrote:

> I think that everything under /xforms will go through the filter,
> which will perform the forwarding the Orbeon Forms web application,
> which in turn will assume that what it gets is XML. So if your
> web.xml, you map /xforms to the Orbeon Forms filter, then you should
> make sure not to have any image under /xforms. Have you tried moving
> the images under say /images?

Yes, that's what I meant. Probably I was not clear enough. So it is not
possible to keep binary resources (images, pdf, etc.) in a subfolder of the
xforms app. It's not nice, but I could live with that.

- bitbyter

---------------------- 8< ----------------------

Last week, I also decided to try out Orbeon Forms XForms Engine in "Separate Deployment" mode (I haven´t use Orbeon Forms before) in a research project. It was pretty easy to take in use by following the instructions/documentation. Finally a working XForms Processor (native XForms browsers and XForms plugins are still in progress)!!! :) However, I faced few problems when "integrating" it with my web application, one concerning OPS XForms Filter (I am using Orbeon Forms 3.5.1.200705030906).

Basically, I have the same problem as BitByter has. When I put CSS files, images etc. under the OPS XForms Filter folder they become useless. This can be fixed by moving images etc. under a different folder than the one defined by OPS XForms Filter.

However, in my case this is a bit problematic. I am having a generic servlet which takes care of all requests. If the requested resource has a certain file extension (configurated in myapp-conf.xml) the file content (including XForms) will be transformed into something else before outputting, otherwise the requested resource will be returned as such. Here is a part of my web.xml (listing 1):
<!-- Filter Mappings -->
<!-- Any web resource under /* is processed by the XForms engine -->
<filter-mapping>
  <filter-name>ops-xforms-filter</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>

...

<!-- Servlet Mappings -->
<servlet-mapping>
  <servlet-name>generic_servlet</servlet-name>
  <url-pattern>/*</url-pattern>
</servlet-mapping>


So, by using these configuration settings my web application works fine except that CSS files, images etc. become useless. To fix the problem, I could change Orbeon Forms XForms Filter to match the same file extension as configurated in myapp-conf.xml, but in that case the same configuration needs to be done into two different files --> error prone. Here is a part of my modified web.xml (listing 2):
<!-- Filter Mappings -->
<!-- Any web resource under *.myxforms is processed by the XForms engine
-->
<filter-mapping>
  <filter-name>ops-xforms-filter</filter-name>
  <url-pattern>*.myxforms</url-pattern>
</filter-mapping>


What I would like to do/have, as a fully satisfied end user of Orbeon Forms :), to be able to use the web.xml described in listing 1, i.e. to use Orbeon Forms XForms Engine without affecting my web application architecture/file structure.

By referring to the use case presented above, could it be possible to assign other than XML content (XHTML+XForms), e.g. images and CSS files, to Orbeon Forms XForms Filter in the future? i.e. end users would not have to bother about what is being filtered, because all XForms markups would be filtered automatically. By adding this feature, it would be even more easier to "integrate" one´s web application to Orbeon Forms XForms Engine.

Another questions/observations: At the moment, it takes 5-10 seconds to transform a (simple) web page via OPS XForms Filter in my development environment (running in "Separate deployment"). Is this a normal behaviour or is it going to be fixed in the next release? On the other hand, the demos on your website worked fast/normally.

I also noticed that when using an element named <var> the transformation fails. Think this is due to the fact that the "var" word is a reserved word in JavaScript. This leads to my next question, could it be possible use reserved words as element names in the future?



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re[3]: Loading Resources In

BitByter
Hello mplaine,

I assume the easiest solution for that kind of problem would be to add a
parameter to the XForms Filter that allows to skip certain resources like
images, CSS, etc. by file extension from being processed by the filter
itself. That would be just a few lines of code and it would be possible to
declare which resources should not be processed by the filter, although they
are within the context path of the filter.

Cheers,
bitbyter




Monday, May 7, 2007, 12:07:22 PM, you wrote:

> -- BitByter wrote :
> Monday, April 16, 2007, 11:41:22 PM, Alex wrote:

>> I think that everything under /xforms will go through the filter,
>> which will perform the forwarding the Orbeon Forms web application,
>> which in turn will assume that what it gets is XML. So if your
>> web.xml, you map /xforms to the Orbeon Forms filter, then you should
>> make sure not to have any image under /xforms. Have you tried moving
>> the images under say /images?

> Yes, that's what I meant. Probably I was not clear enough. So it is not
> possible to keep binary resources (images, pdf, etc.) in a subfolder of the
> xforms app. It's not nice, but I could live with that.

> - bitbyter

> ---------------------- 8< ----------------------

> Last week, I also decided to try out Orbeon Forms XForms Engine in
> "Separate Deployment" mode (I havenŽt use Orbeon Forms before) in a
> research project. It was pretty easy to take in use by following the
> instructions/documentation. Finally a working XForms Processor (native
> XForms browsers and XForms plugins are still in progress)!!! :) However, I
> faced few problems when "integrating" it with my web application, one
> concerning OPS XForms Filter (I am using Orbeon Forms 3.5.1.200705030906).

> Basically, I have the same problem as BitByter has. When I put CSS files,
> images etc. under the OPS XForms Filter folder they become useless. This
> can be fixed by moving images etc. under a different folder than the one defined by OPS XForms Filter.

> However, in my case this is a bit problematic. I am having a generic
> servlet which takes care of all requests. If the requested resource has a
> certain file extension (configurated in myapp-conf.xml) the file content
> (including XForms) will be transformed into something else before
> outputting, otherwise the requested resource will be returned as such.
> Here is a part of my web.xml (listing 1):
> <!-- Filter Mappings -->
> <!-- Any web resource under /* is processed by the XForms engine -->
> <filter-mapping>
>   <filter-name>ops-xforms-filter</filter-name>
>   <url-pattern>/*</url-pattern>
> </filter-mapping>

> ...

> <!-- Servlet Mappings -->
> <servlet-mapping>
>   <servlet-name>generic_servlet</servlet-name>
>   <url-pattern>/*</url-pattern>
> </servlet-mapping>


> So, by using these configuration settings my web application works fine
> except that CSS files, images etc. become useless. To fix the problem, I
> could change Orbeon Forms XForms Filter to match the same file extension
> as configurated in myapp-conf.xml, but in that case the same configuration
> needs to be done into two different files --> error prone. Here is a part of my modified web.xml (listing 2):
> <!-- Filter Mappings -->
> <!-- Any web resource under *.myxforms is processed by the XForms engine
-->>
> <filter-mapping>
>   <filter-name>ops-xforms-filter</filter-name>
>   <url-pattern>*.myxforms</url-pattern>
> </filter-mapping>


> What I would like to do/have, as a fully satisfied end user of Orbeon
> Forms :), to be able to use the web.xml described in listing 1, i.e. to
> use Orbeon Forms XForms Engine without affecting my web application architecture/file structure.

> By referring to the use case presented above, could it be possible to
> assign other than XML content (XHTML+XForms), e.g. images and CSS files,
> to Orbeon Forms XForms Filter in the future? i.e. end users would not have
> to bother about what is being filtered, because all XForms markups would
> be filtered automatically. By adding this feature, it would be even more
> easier to "integrate" oneŽs web application to Orbeon Forms XForms Engine.

> Another questions/observations: At the moment, it takes 5-10 seconds to
> transform a (simple) web page via OPS XForms Filter in my development
> environment (running in "Separate deployment"). Is this a normal behaviour
> or is it going to be fixed in the next release? On the other hand, the
> demos on your website worked fast/normally.

> I also noticed that when using an element named <var> the transformation
> fails. Think this is due to the fact that the "var" word is a reserved
> word in JavaScript. This leads to my next question, could it be possible
> use reserved words as element names in the future?







--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re[3]: Loading Resources In

Markku Laine
> I assume the easiest solution for that kind of problem would be to add a
> parameter to the XForms Filter that allows to skip certain resources like
> images, CSS, etc. by file extension from being processed by the filter
> itself. That would be just a few lines of code and it would be possible to
> declare which resources should not be processed by the filter, although they
> are within the context path of the filter.

Yup, that could be a working solution for the problem. Thanks for the tip.
Have to see if I have time to implement that at some point.


>> Another questions/observations: At the moment, it takes 5-10 seconds to
>> transform a (simple) web page via OPS XForms Filter in my development
>> environment (running in "Separate deployment"). Is this a normal behaviour
>> or is it going to be fixed in the next release? On the other hand, the
>> demos on your website worked fast/normally.

BitByter, are you also experiencing long XForms filtering times when using
Separate Deployment? Any idea why it takes so long?


>> I also noticed that when using an element named <var> the transformation
>> fails. Think this is due to the fact that the "var" word is a reserved
>> word in JavaScript. This leads to my next question, could it be possible
>> use reserved words as element names in the future?

Any comments on this one?

Best Regards


-Markku Laine



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
123