I am using Tomcat. The sample jsp and servlet examples come with it are working fine. I was going through the UserGuide and tried to use the 'build' tool in C:\jakarta-tomcat\doc\appdev\sample directory. This 'build' tool is equivalent to 'makefile' which automatically recompiles the newer source files and copies the latest files to the deployment dir of the server. I thought it is very good feature during development since we need not manually copy all the latest files to the corresponding deployment dir in the server. But when I tried 'build' at the command prompt in the above 'sample' dir, I am getting the following error. 'BUILD CONFIG ERROR' Can't open config file build.xml due to : org.xml.sax.SAXParseException. Attribute names must not start with "<" characters' Anybody succeeded in the build? I have all the 5 jars in the classpath. (ant.jar ,jasper.jar, servlet.jar, xml.jar, webserver.jar). I didn't touch the build.xml or build.bat or the build file in the sample dir. Any idea what this error says about? regds maha anna
[This message has been edited by maha anna (edited October 01, 2000).]
Joined: Sep 26, 2000
that build.xml file has a bug in it. the first line is:
when it should be:
I had some other problems after that though, looks like the example is a bit dated...
Joined: Jan 31, 2000
Thanks George. I changed the "/>" part. The build passed 1 level. Next "srcdir" not found error came. I figured out the 'lib' dir was not there in sample dir, but the .xml file tried to copy the '/sample/lib' dir to the deployment dir. So I manually created a 'lib' dir in sample dir. Now I passed the 2nd level. Now comes the next error. The famous 'NoClassFoundError'. I know it is related with the classpath. But still trying how to setup the classpath in the build.xml file. Outside from the Dos prompt javac and java works. The build.xml file part which poses this 'NoClassFoundError sun/tools/javac/Main' error is
Do you remember what you did. regds maha anna
Joined: Jun 03, 2000
maha: see if the tools.jar file is in your classpath or not. Generally, it is in the JAVA_HOME\lib dir. HTH. Regds. - satya
Thanks Satya. I just made it work and about to say to George. I did exactly what you said, edited autoexec.bat and put the c:\jdk1.2.2\lib\tools.jar file in the classpath. Now I am able to build,build all,build javadoc, build dist I like the 'ant' utility. Just make 1 ***.war file of our web application by 'build dist' and upload to internet.
regds maha anna [This message has been edited by maha anna (edited October 02, 2000).]