Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

strange tomcat when compiling

Status
Not open for further replies.

tongm

Programmer
Jul 8, 2003
2
HK
hi all,

i found some strange errors when compiling tomcat 4.1.24 from source using JDK 1.4...

env var.

$PATH added :/usr/local/jakarta-ant-1.5/bin
$JAVA_HOME : /usr/java/j2sdk1.4.1_03
$J2EE_HOME : /usr/java/j2sdkee1.3.1

classpath added:
./javac -classpath /usr/java/j2sdkee1.3.1/lib/j2ee.jar

after enter : ant dist
errors occurred...

below are the errors output..

------------------------------

build-static:

[copy] Copying 4 files to /usr/local/jakarta-tomcat-4.1.24-src/jasper/build/bin

build-only:

[javac] Compiling 79 source files to /usr/local/jakarta-tomcat-4.1.24-src/jasper/build/shared/classes
[javac] /usr/local/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/BeanRepository.java:72: package javax.servlet does not exist
[javac] import javax.servlet.ServletException;
:
:
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -deprecation for details.
[javac] 100 errors

BUILD FAILED

file:/usr/local/jakarta-tomcat-jasper/jasper2/build.xml:127: Compile failed; see the compiler error output for details.
------------------------------

could you help me to solve the problem? really thanks alot!!

rgds,

tongm
 
Why are the errors strange ?!!

You are missing the servlet API, found in a package called servlet.jar

You most likely have it on your PC (it comes with tomcat), do a search the file, and then point your CLASSPATH at it, or dump it in JAVA_HOME\jre\lib\ext.
 
Really thanks for your advice first ^_^

actually i followed the tomcat source manual and downloaded the binary distribution,

and i've set the appropriate link in build.properties file.

dunno why the errors still exist...

someone note me to set classpath point to the servlet.jar.

i did it...
CLASSPATH=$CLASSPATH/usr/tomcat_custom/jakarta-servletapi-4/lib/servlet.jar

but it still errors....do u have any ideas on this strange errors?

thanks for your great help.

tongm

 
Yes, when you set your CLASSPATH (I take it you are on linux/unix due to your use of $ rather than %%) you need to export the variable, and also seperate differing paths using ':' - eg

export CLASSPATH=$CLASSPATH:/usr/tomcat_custom/jakarta-servletapi-4/lib/servlet.jar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top