Thanks Steve but as I'm not familiar with Ant and I don't understand the
connection between compiling my code and that link I'm still stuck.
I've had a stab at the ant method with a modified version of the file you
gave me:
<project name="HowTo" default="compile">
<property name="src.java" value="." />
<property name="build.classes" value="." />
<property name="cocoon.lib"
value="C:\jakarta-tomcat-4.1.24\webapps\cocoon\WEB-INF\lib" />
<property name="build" location="build"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<path id="build.cp">
<pathelement path="${build.classes}" />
<path>
<fileset dir="${cocoon.lib}" includes="**.jar" />
</path>
</path>
<target name="compile" depends="init">
<javac srcdir="${src.java}" destdir="${build.classes}"
debug="true" classpathref="build.cp" />
</target>
</project>
But I get:
C:\jakarta-tomcat-4.1.24\webapps\cocoon\samples\xmlform\howto>ant >
build.txt
[javac]
C:\jakarta-tomcat-4.1.24\webapps\cocoon\samples\xmlform\howto\HowtoW
izardAction.java:97: cannot resolve symbol
[javac] symbol : class HowToBean
[javac] location: class
org.apache.cocoon.samples.xmlform.howto.HowtoWizardA
ction
[javac] HowToBean jBean = (HowToBean) getForm().getModel();
[javac] ^
[javac]
C:\jakarta-tomcat-4.1.24\webapps\cocoon\samples\xmlform\howto\HowtoW
izardAction.java:97: cannot resolve symbol
[javac] symbol : class HowToBean
[javac] location: class
org.apache.cocoon.samples.xmlform.howto.HowtoWizardA
ction
[javac] HowToBean jBean = (HowToBean) getForm().getModel();
[javac] ^
[javac] Note:
C:\jakarta-tomcat-4.1.24\webapps\cocoon\samples\xmlform\howto\
HowtoWizardAction.java uses or overrides a deprecated API.
[javac] Note: Recompile with -deprecation for details.
[javac] 2 errors
BUILD FAILED
file:C:/jakarta-tomcat-4.1.24/webapps/cocoon/samples/xmlform/howto/build.xml
:24:
Compile failed; see the compiler error output for details.
Total time: 6 seconds
Given that I simply copy/ pasted the HowToWizardAction.java source from the
example I don't understand why it doesn't work. Perhaps my build file is
wrong? There is a VERY steep learning curve with these technologies I'm
finding. Can anyone help me further?
Phil
-----Original Message-----
From: Steven Noels [mailto:[EMAIL PROTECTED]
Sent: 24 August 2003 08:39
To: [EMAIL PROTECTED]
Subject: Re: XMLForm HowTo example
Cocoon wrote:
> If I then use the -classpath:
> javac -classpath
>
.;C:\jakarta-tomcat-4.1.24\webapps\cocoon\WEB-INF\lib\cocoon-xmlform-block.j
ar
> HowtoWizardAction.java
> I get several messages sarting with:
> cannot access org.apache.avalon.excalibur.pool.Poolable
> file org\apache\avalon\excalibur\pool\Poolable.class not found
You need more than only the xmlform block in your classpath, but all
Cocoon libs. Using Ant, this might be easier than the commandline:
<property name="build.classes" value="${build}/classes" />
<property name="cocoon.lib" value="${cocoon.webapp}/WEB-INF/lib" />
<path id="build.cp">
<pathelement path="${build.classes}" />
<path>
<fileset dir="${cocoon.lib}" includes="**.jar" />
</path>
</path>
<target name="compile" depends="init">
<javac srcdir="${src.java}" destdir="${build.classes}"
debug="true" classpathref="build.cp" />
</target>
You might take a look at
http://wiki.cocoondev.org/Wiki.jsp?page=YourCocoonBasedProject which
describes how you can set up a Cocoon-based project.
HTH,
</Steven>
--
Steven Noels http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org stevenn at apache.org
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]