Problem
"Chris Midwood" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <000501c3a972$440e9c80$70187ad5@HOST> |
Using the following example:
Simple XMLC Example back to top
a.. Hello.html, compiled to HelloHTML.class
<HTML>
<HEAD>
<TITLE>Hello World</TITLE>
<BODY>
<H1>Hello World</H1>
<P>Hello, my name is <SPAN ID="name">ah, Clem</SPAN>.
<P>Today's date is <SPAN ID="date">Oct 6, 2001</SPAN>.
</HTML>
b.. DOM hierarchy for Hello.html
HTMLDocument
HTMLHtmlElement: html
HTMLHeadElement: head
HTMLTitleElement: title
Text: text="Hello World"
HTMLBodyElement: body
HTMLHeadingElement: h1
Text: text="Hello World"
HTMLParagraphElement:
Text: text="Hello, my name is"
HTMLElement: span: id='name'
Text: text="ah, Clem"
Text: text="."
HTMLParagraphElement: p
Text: text="Today's date is "
HTMLElement: span: id='date'
Text: text="Oct 6, 2001"
Text: text="."
a.. Hello.java
public class Hello implements HttpPresentation {
public void run(HttpPresentationComms comms) {
HelloHTML htmlObj = new HelloHTML();
XMLCUtil.getFirstText(htmlObj.getElementName().setData(getRandomName()));
XMLCUtil.getFirstText(htmlObj.getElementDate()).setData(getDate());
comms.response.writeHTML(htmlObj.toString());
}
}___________________________________________________________________________
__________________________________b.. I compile the Hello.html file using
the -dump option to see the DOM and I get returned this with lazyText and
other differences is this correct??DOM hierarchy: LazyHTMLDocument%[T]:
HTMLHtmlElementImpl: HTML HTMLHeadElementImpl: HEAD
HTMLTitleElementImpl: TITLE LazyText: Hello World
HTMLBodyElementImpl: BODY HTMLHeadingElementImpl: H1
LazyText: Hello World HTMLParagraphElementImpl: P
LazyText: Hello, my name is LazyHTMLElement: SPAN:
id="name" LazyText: ah, Clem
LazyText: . HTMLParagraphElementImpl: P
LazyText: Today's date is LazyHTMLElement: SPAN:
id="date" LazyText: Oct 6, 2001
LazyText: .c.. I then compile to a class called HelloHTML.classd.. Then I
try to compile the Hello.java code stated above and get the following errors
returned.e.. Hello.java:1: cannot resolve symbolsymbol : class
HttpPresentationlocation: class Hellopublic class Hello implements
HttpPresentation { ^Hello.java:2: cannot
resolve symbolsymbol : class HttpPresentationCommslocation: class Hello
public void run(HttpPresentationComms comms) {
^Hello.java:3: cannot resolve symbolsymbol : class HelloHTMLlocation: class
Hello HelloHTML htmlObj = new HelloHTML(); ^Hello.java:3:
cannot resolve symbolsymbol : class HelloHTMLlocation: class Hello
HelloHTML htmlObj = new HelloHTML();
^Hello.java:4: cannot resolve symbolsymbol : method getRandomName
()location: class Hello
XMLCUtil.getFirstText(htmlObj.getElementName().setData(getRandomName()));
^Hello.java:4: cannot resolve symbolsymbol : variable XMLCUtillocation:
class Hello
XMLCUtil.getFirstText(htmlObj.getElementName().setData(getRandomName()));
^Hello.java:5: cannot resolve symbolsymbol : method getDate ()location:
class Hello
XMLCUtil.getFirstText(htmlObj.getElementDate()).setData(getDate());
^Hello.java:5: cannot resolve symbolsymbol : variable XMLCUtillocation:
class Hello
XMLCUtil.getFirstText(htmlObj.getElementDate()).setData(getDate());
^8 errorsf.. Please can someone point me to where I am going
wrong?ThanksChris Midwood----- Original Message -----
From: "Jacob Kjome" <[email protected]>
To: <[email protected]>
Sent: Wednesday, November 12, 2003 6:30 PM
Subject: Re: [Barracuda] How much use are people getting oput of barracuda?
> Hi Chris,
>
> Sounds like a simple classpath issue. How are you building your
> project? You can download the latest XMLC binary release which contains 3
> example applications that are XMLC only, not Barracuda stuff. That should
> make things a bit more clear on the XMLC side of things. There is a
Tomcat
> example as well. Take a look at how things work there. If you still
> aren't getting it, you might want to send your compile error. There are
> various dependencies that also have to be in the classpath at compile
> time. That might be tripping you up as well.
>
> http://forge.objectweb.org/projects/xmlc/
>
> Jake
>
>
> At 06:15 PM 11/12/2003 +0000, you wrote:
> >Hi,
> >
> >I am relatively new to all this XMLC stuff, I understand the creation of
the
> >class file, but everytime I try to write some java code to manipulate the
> >HTML page that has been converted to a class it never compiles and states
> >that the class does not exist. I'm sorry for sending such a simple email
> >but I just can't get it to work at moment.
> >
> >
> >Chris Midwood
> >
> >
> >_______________________________________________
> >Barracuda mailing list
> >[email protected]
> >http://barracudamvc.org/lists/listinfo/barracuda
>
> _______________________________________________
> Barracuda mailing list
> [email protected]
> http://barracudamvc.org/lists/listinfo/barracuda
>