• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Problem running Servlet

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys
I installed and configured the tomcat4.0.I tested it and is o.k.It works for html and jsp but it gives me error 404 for HelloServlet.
my window is 2000 professional.
CATALINA_HOME = d:\tomcat4\tomcat
My development directory is "servletsdevel"
I created the dir"classes" under ROOT\WEB-INF.
can you please write me the correct "CLASSPATH" AND CATALINA_HOME variable.
I have jdk1.4.
Any help will be appreciated
[ May 01, 2002: Message edited by: Muhammad Saghir ]
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
CATALINA_HOME should be the directory that contains (among many others) the following folders:
bin
conf
lib
logs
webapps

CLASSPATH does not matter *at all* except when you compile a servlet through an IDE or Textpad.

JAVA_HOME should be set to the root of your jdk1.4 (most likely something like C:\jdk1.4)

For development "best practices" read the following two pages:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/deployment.html
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/source.html
 
Muhammad Saghir
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Mike for the reply
but still i have some confusion
i tried to understand the links but i could't.My question is where i will create the CATALINA_HOME directory and what is the relations b/t my installation directory and development directory.
My isntallation directory is D:\tomcat4\tomcat
My development directory is D:\servletsdevel
what will be my CATALINA_HOME variable.
Thanks for help
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your CATALINA_HOME *always* points to the tomcat installation. It is a system variable used by the Tomcat startup scripts, so it must always point to Tomcat.

As for the development directory, is there a good reason you're not developing right in the instance of Tomcat ? I mean... why not do something like this?

CATALINA_HOME
|-webapps
|- mywebappName

mywebappName is the directory used to store all your files for the 'mywebappName' application. This way, there is no difficulty in 'moving' your files between development and deployment directories - they are the same! Your development directory becomes a live test environment.

The only reason not to do this, is if the box we're talking about is a 'live' production box. Otherwise, since it's your development box, why not develop your application right inside Tomcat?
 
reply
    Bookmark Topic Watch Topic
  • New Topic