Having troubles with JSP...

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

Having troubles with JSP...

Pierre-Julien VILLOUD
Hi everyone, I would like to know why Orbeon displays this message :

Fatal error: The content of elements must consist of well-formed
character data or markup.

when I put some jsp in my page. Whereas when i put the page in apache
directory, it works... Is there a particular directory to put jsp
files ?

I saw in the web.xml :

    <!-- All JSP files under /xforms-jsp go through the OPS filter -->

Does this mean that i have to create a directory in /xforms-jsp for my
app ? i'm quite stuck because i have a lot of pages that are just
xhtml now and i would like to put JSP...

Thanks for your time

Pierre-Julien



--
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: Having troubles with JSP...

Ryan Puddephatt
Pierre-Julien,
    The page Orbeon is loading isn't well-formed XML, try putting it in an XML editor that can check where your problem is. Remember HTML isn't XML! You must close all your tags!

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Pierre-Julien VILLOUD wrote:
Hi everyone, I would like to know why Orbeon displays this message :

Fatal error: The content of elements must consist of well-formed
character data or markup.

when I put some jsp in my page. Whereas when i put the page in apache
directory, it works... Is there a particular directory to put jsp
files ?

I saw in the web.xml :

   <!-- All JSP files under /xforms-jsp go through the OPS filter -->

Does this mean that i have to create a directory in /xforms-jsp for my
app ? i'm quite stuck because i have a lot of pages that are just
xhtml now and i would like to put JSP...

Thanks for your time

Pierre-Julien


-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Having troubles with JSP...

Pierre-Julien VILLOUD
Hi Ryan and thanks for your answer,

I can assure you that all my tags are closed, the problem comes from
the JSP part because when i put it off, it works and when the JSP page
is not in the Orbeon directory, it works too !!!

Thanks

Pierre-Julien



--
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]: Having troubles with JSP...

BitByter
Hello Pierre-Julien,

did you also ensure that the markup generated by your JSP is wellformed XML?
Maybe your JSP itself is wellformed, but not the markup generated by it.
This may be especially the case if you use some custom tag libraries.

- bitbyter


Monday, June 4, 2007, 9:10:26 AM, you wrote:

> Hi Ryan and thanks for your answer,

> I can assure you that all my tags are closed, the problem comes from
> the JSP part because when i put it off, it works and when the JSP page
> is not in the Orbeon directory, it works too !!!

> Thanks

> Pierre-Julien







--
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[2]: Having troubles with JSP...

Pierre-Julien VILLOUD
Hi BitByter,
I just do that :

                <% session.invalidate();%>

That's not good ?

Thanks

Pierre-Julien


2007/6/4, BitByter <[hidden email]>:

> Hello Pierre-Julien,
>
> did you also ensure that the markup generated by your JSP is wellformed XML?
> Maybe your JSP itself is wellformed, but not the markup generated by it.
> This may be especially the case if you use some custom tag libraries.
>
> - bitbyter
>
>
> Monday, June 4, 2007, 9:10:26 AM, you wrote:
>
> > Hi Ryan and thanks for your answer,
>
> > I can assure you that all my tags are closed, the problem comes from
> > the JSP part because when i put it off, it works and when the JSP page
> > is not in the Orbeon directory, it works too !!!
>
> > Thanks
>
> > Pierre-Julien
>
>
>
>
>
>
>
> --
> 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
>
>


--
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[4]: Having troubles with JSP...

BitByter
Hello Pierre-Julien,

I assume that invalidating the session has no effect on the generated
markup. Just make sure that in the generated markup the mentioned code
snippet does not appear.

I suggest that you set a breakpoint at Orbeons XForms servlet filter and
have a look at the markup that is being received by that filter. Make sure
it is wellformed XML.

- bitbyter



Monday, June 4, 2007, 10:35:32 AM, you wrote:

> Hi BitByter,
> I just do that :

>                 <% session.invalidate();%>

> That's not good ?

> Thanks

> Pierre-Julien


> 2007/6/4, BitByter <[hidden email]>:
>> Hello Pierre-Julien,
>>
>> did you also ensure that the markup generated by your JSP is wellformed XML?
>> Maybe your JSP itself is wellformed, but not the markup generated by it.
>> This may be especially the case if you use some custom tag libraries.
>>
>> - bitbyter
>>
>>
>> Monday, June 4, 2007, 9:10:26 AM, you wrote:
>>
>> > Hi Ryan and thanks for your answer,
>>
>> > I can assure you that all my tags are closed, the problem comes from
>> > the JSP part because when i put it off, it works and when the JSP page
>> > is not in the Orbeon directory, it works too !!!
>>
>> > Thanks
>>
>> > Pierre-Julien
>>
>>
>>
>>
>>
>>
>>
>> --
>> 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
>>
>>






--
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[4]: Having troubles with JSP...

Pierre-Julien VILLOUD
Can somebody tell me why JSP files have to be in the directory
xforms-jsp ??? why can't they be in the app directory ??? I'm having
the same error over an over even if i copy a jsp file of orbeon's
examples (in the xforms-jsp directory) that i paste in my app
directory !

please help me, I'm getting crazy...

Pierre-Julien



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

xforms:repeat & CSS

Markku Laine
Hi all!


I am trying to implement a simple editor using the xforms:repeat element.
I managed to implement the editor using Mozilla XForms, but now when I am
using Orbeon XForms Filter the form is not working anymore.

How should I modify the CSS code in the form in order to make it work with
Orbeon Forms i.e. how can I refer to ::repeat-item and ::repeat-index?

Regards


-Markku Laine


The code:
------------------ 8< ---------------
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
       xml:lang="en"
       lang="en"
       xmlns:ev="http://www.w3.org/2001/xml-events"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:xs="http://www.w3.org/2001/XMLSchema"
       xmlns:xforms="http://www.w3.org/2002/xforms">
  <head>
  <title>xforms:repeat editor</title>
  <xforms:model>
  <xforms:instance id="carlist-instance">
  <carlist xmlns="">
  <car>
  <model>Opel</model>
  <price>20 000 EUR</price>
  </car>
  <car>
  <model>Ferrari</model>
  <price>100 000
EUR</price>
  </car>
  <car>
  <model>Toyota</model>
  <price>10 000 EUR</price>
  </car>
  <car>
  <model>Volkswagen</model>
  <price>35 000 EUR</price>
  </car>
  </carlist>
  </xforms:instance>
  </xforms:model>
  <style type="text/css">
  /* Mozilla XForms */
  .xf-repeat-item > div {
  display: none;
  }
  .xf-repeat-item > input .xf-value {
  border: 0px;
  }
  .xf-repeat-index > div {
  background-color: #DDDDDD;
  display: block;
  }
  .xf-repeat-index > input {
  display: none;
  }
  </style>
  </head>
  <body>
  <h1>Cars</h1>
  <p>
  <xforms:repeat nodeset="car" id="repeatcarlist">
  <xforms:input ref="model" />
  <div>
  <h3>Car details</h3>
  <b>Model:</b> <xforms:output
ref="model" /><br />
  <b>Price:</b> <xforms:input
ref="price" /><br />
  </div>
  </xforms:repeat>
  </p>
  </body>
</html>
--------------- 8< --------------



--
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: Having troubles with JSP...

Ryan Puddephatt
In reply to this post by Pierre-Julien VILLOUD
Pierre,
    Its because of the xforms-filter (the part that handles JSP within Orbeon Forms) looks for them in that folder, search your web.xml for 'xforms-jsp' and you will see it. You can also change it there

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Pierre-Julien VILLOUD wrote:
Can somebody tell me why JSP files have to be in the directory
xforms-jsp ??? why can't they be in the app directory ??? I'm having
the same error over an over even if i copy a jsp file of orbeon's
examples (in the xforms-jsp directory) that i paste in my app
directory !

please help me, I'm getting crazy...

Pierre-Julien


-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Having troubles with JSP...

Alessandro Vernet
Administrator
In reply to this post by Pierre-Julien VILLOUD
Pierre-Julien,

On 6/4/07, Pierre-Julien VILLOUD <[hidden email]> wrote:
> I can assure you that all my tags are closed, the problem comes from
> the JSP part because when i put it off, it works and when the JSP page
> is not in the Orbeon directory, it works too !!!

You can also try to run your JSP without the Orbeon filter. The output
will go straight to your browser. From there do "view source", copy
the text, and paste it in an XML editor. The XML editor will point you
to issues with the well-formedness of the JSP output.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, 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: xforms:repeat & CSS

Alessandro Vernet
Administrator
In reply to this post by Markku Laine
Markku,

On 6/4/07, .::: Markku :::. <[hidden email]> wrote:
> I am trying to implement a simple editor using the xforms:repeat element.
> I managed to implement the editor using Mozilla XForms, but now when I am
> using Orbeon XForms Filter the form is not working anymore.
>
> How should I modify the CSS code in the form in order to make it work with
> Orbeon Forms i.e. how can I refer to ::repeat-item and ::repeat-index?

This example is causing a JavaScript error with the latest code when
changing the current row. I will first look at this and post a
follow-up message.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, 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: xforms:repeat & CSS

Markku Laine
Hi Alex!


> This example is causing a JavaScript error with the latest code when
> changing the current row. I will first look at this and post a
> follow-up message.

Thanks for your effort, Alex.

The example has been tested with Firefox 2.0.0.3 including Mozilla XForms
0.7.0.1. You will see what I am trying to achieve by running the example
in Firefox without using Orbeon Forms.

I would like to know is it possible to achieve the same functionality when
using Orbeon Forms i.e. how the code should be modified?

Regards


-Markku



--
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: xforms:repeat & CSS

Alessandro Vernet
Administrator
Markku,

On 6/5/07, .::: Markku :::. <[hidden email]> wrote:
> The example has been tested with Firefox 2.0.0.3 including Mozilla XForms
> 0.7.0.1. You will see what I am trying to achieve by running the example
> in Firefox without using Orbeon Forms.
>
> I would like to know is it possible to achieve the same functionality when
> using Orbeon Forms i.e. how the code should be modified?

See the attached example. You can run it as-is in the XForms sandbox.
A few comments:

* The first code you posted originally caused a JavaScript error
because inside the repeat, there was a <p> that contained a <div>.
This is invalid in HTML, and the browser closes the <p> when it finds
the opening tag for the <div>, but Orbeon Forms doesn't "know that"
and it ends up causing a JavaScript error.
* In Orbeon Forms, there is a class to style a "row" that is selected
(xforms-repeat-selected-item-1), but there is no class to style a row
that is not selected. So to display something different if the row is
selected, I have used a <xforms:group>. You can see the details in the
code.
* The "current row" has a yellow background by default with Orbeon
Form. Since you want a gray background, I defined that with the
xforms-repeat-selected-item-1 class.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, 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

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

Re: xforms:repeat & CSS

Markku Laine
Hi Alex,


> See the attached example. You can run it as-is in the XForms sandbox.
> A few comments:

Thanks for the example! Actually, I already knew how to style a
selected row (xforms-repeat-selected-1), but what I did not know was
how to style an unselected row. I looked through your example and
noticed how you have used the xforms:group element to achieve the same
effect as ::repeat-item, neat trick.

Is there a documentation or a list of supported CSS features related to
XForms available somewhere on the Orbeon web site? I mean, if one has used
standard-compliant styling for, e.g. repeat-index or repeat-item, then how
the same effect could be achieved using Orbeon Forms. At the moment, one
has to look through the transformed code in order to see new class names
etc.

Once again, thanks for your time and effort!


-Markku



--
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: xforms:repeat & CSS

Alessandro Vernet
Administrator
Markku,

On 6/7/07, .::: Markku :::. <[hidden email]> wrote:
> Is there a documentation or a list of supported CSS features related to
> XForms available somewhere on the Orbeon web site? I mean, if one has used
> standard-compliant styling for, e.g. repeat-index or repeat-item, then how
> the same effect could be achieved using Orbeon Forms. At the moment, one
> has to look through the transformed code in order to see new class names
> etc.

At the moment we don't. But I agree, we should. I pasted below the
link to the bug entry tracking this. Right now, the easiest way to
figure out the CSS classes used and the structure of the generated
HTML is to look at the generated HTML for your page. Firebug or the
Firefox DOM Inspector can help when you are doing this.

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

> Once again, thanks for your time and effort!

My pleasure!

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, 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