Tomcat rookie needs help building application

2005-03-20 Thread Barry Kimelman






 I need help building my 1st Tomcat application.
 
My system is a Windows XP PC. My version of Tomcat is 5.5.8.
I have tomcat installed under the directory    C:\Tomcat5.5
 
I have verified that the installation of Tomcat was successfull by visiting http://localhost:8080.
Once at the test page, I also ran some of the JSP examples to verify that everything was working correctly.
 
My problem is that I can't build an application successfully. I have searched the Tomcat documentation and several mailing list archives, but I have not found any documentation that states, "This is how to build a Tomcat application". I have organized my source code as described/recommended in the Tomcat documentation.
I did have some success with Tomcat 5.0.16 under Linux Redhat9 a year ago, and as I recall, you compiled your application from the command line using the "Ant" utility. So I changed my current directory to the toplevel of my project and issued the command "ant compile". I received the following error message :
 
 BUILD FAILED
 C:\barry\myproject\build.xml:146: taskdef class org.apache.cataline.ant.DeployTask cannot be found
 
Line 146 of my build.xml file is as follows :
    
 
I searched the JAR files under my Tomcat installation and found that the JAR file located at
C:\Tomcat5.5\server\lib\catalina-ant.jar   conatins the "missing" class.
 
According to the Tomcat documentation that I read, JAR files placed under $CATALINA_HOME/common/lib
are available both to web applications and internal Tomcat code. So I copied the JAR file under that directory and once again attempted to build my project/application. However, I received the same error message
 
What do I need to do in order to build/compile my Tomcat5 project ? Is there a "How to build a Tomcat5 Project" document ?
 
Please help a confused rookie.
 
*
 
Barry KimelmanToronto, Ontario, Canadaemail :  [EMAIL PROTECTED] , [EMAIL PROTECTED]









Re: Tomcat rookie needs help building application

2005-03-20 Thread Hassan Schroeder
Barry Kimelman wrote:
So I changed my current directory to the 
toplevel of my project and issued the command "ant compile". I received 
the following error message :
 
 BUILD FAILED
 C:\barry\myproject\build.xml:146: taskdef class 
org.apache.cataline.ant.DeployTask cannot be found
 
Line 146 of my build.xml file is as follows :
  
 
I searched the JAR files under my Tomcat installation and found that the 
JAR file located at C:\Tomcat5.5\server\lib\catalina-ant.jar conatins the 
> "missing" class.
 
According to the Tomcat documentation that I read, JAR files placed 
under $CATALINA_HOME/common/lib are available both to web applications 
> and internal Tomcat code.
But you're neither of those :-) so it's *your* CLASSPATH that needs
to include "C:\Tomcat5.5\server\lib\catalina-ant.jar" when you run
ant from the command line.
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat rookie needs help building application

2005-03-20 Thread Dakota Jack
First of all, welcome to the wonderful, wacky world of Java web programming.  

Second, Tomcat is the server that "serves up" your application.  You
are so new it is hard to tell what you know and don't know.  Do you
know the basic structure a web application must have in Tomcat
including where web.xml is, whre the WEB-INF is, etc.?

Third, you seem to be focusing on compiling classes, right?  Tomcat
does not build or compile web applications for you.  Tomcat "serves
up" the applications that are already running.  Many times you have a
development Tomcat server on which you run your applications so that
you can easily test the applications.

Different people have different levels of experience doing different
things regarding compiling.  The best thing you can do to learn about
class compiling and loading is to learn all about CLASSPATH and
ClassLoaders in Java.  Then you can choose what to do, such as use Ant
for compiling your classes, etc.

Fourth, you might want to think about using a standard web framework
at the start to assist your building a web application.  A web
framework, like Struts, codes some things you would have to do for
yourself anyway.  You can take the time it would take you to write all
that framework code to pick out a good one that is pre-built for you. 
So, don't worry if it takes a little time.

Jack


On Sun, 20 Mar 2005 10:11:08 -0500 (Eastern Standard Time), Barry
Kimelman <[EMAIL PROTECTED]> wrote:
>  
>  
>  I need help building my 1st Tomcat application. 
>   
> My system is a Windows XP PC. My version of Tomcat is 5.5.8. 
> I have tomcat installed under the directoryC:\Tomcat5.5 
>   
> I have verified that the installation of Tomcat was successfull by visiting
> http://localhost:8080. 
> Once at the test page, I also ran some of the JSP examples to verify that
> everything was working correctly. 
>   
> My problem is that I can't build an application successfully. I have
> searched the Tomcat documentation and several mailing list archives, but I
> have not found any documentation that states, "This is how to build a Tomcat
> application". I have organized my source code as described/recommended in
> the Tomcat documentation. 
> I did have some success with Tomcat 5.0.16 under Linux Redhat9 a year ago,
> and as I recall, you compiled your application from the command line using
> the "Ant" utility. So I changed my current directory to the toplevel of my
> project and issued the command "ant compile". I received the following error
> message : 
>   
>  BUILD FAILED 
>  C:\barry\myproject\build.xml:146: taskdef class
> org.apache.cataline.ant.DeployTask cannot be found 
>   
> Line 146 of my build.xml file is as follows : 
>  classname="org.apache.catalina.ant.DeployTask"/>
>  
>   
> I searched the JAR files under my Tomcat installation and found that the JAR
> file located at 
> C:\Tomcat5.5\server\lib\catalina-ant.jar   conatins the "missing" class. 
>   
> According to the Tomcat documentation that I read, JAR files placed under
> $CATALINA_HOME/common/lib 
> are available both to web applications and internal Tomcat code. So I copied
> the JAR file under that directory and once again attempted to build my
> project/application. However, I received the same error message 
>   
> What do I need to do in order to build/compile my Tomcat5 project ? Is there
> a "How to build a Tomcat5 Project" document ? 
>   
> Please help a confused rookie. 
>   
> * 
>   
> Barry Kimelman
> Toronto, Ontario, Canada
> email :  [EMAIL PROTECTED] , [EMAIL PROTECTED] 
>  
>  


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]