• 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

First steps with tomcat

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You guys must be getting sick of posts like this one...perhaps. But I really have tried my hardest, and searched BBS for help...so if you could help, I'd appreciate it.
I use Windows XP.
I'm just trying to get a simple JSP working. I downloaded tomcat. What I should say is that I downloaded what I understood to be a preconfigured (as much as you can preconfigure it) version of tomcat. I've followed my Wrox book for modifying the classpath, path, etc. My simple jsp file just will not work. Its not an error in the jsp code, I know that much. When I got tomcat I didn't have to instal it in the true sense. After unzipping the file I was presented with all relevant tomcat files in their correct folders, subfolders, etc. I'll have to say, I think that may be the problem. The Apache web site, I find, just isn't very illuminating. I am not sure if I need other software to be install aswell as tomcat. I have j2sdk1.4.0 already installed. I had problems getting servlets working on my university network during my MSc as well. I just find the whole thing, at the moment, frustrating. But I really want to learn JSP.
I also cannot see how to get tomcat started up - with this not being a normal instal of a piece of software. I have tried it from the command line, but with no luck. Its quite likely that tomcat isn't running at all. But I can't see how to get a copy of tomcat that will actually install - after many searches on the web, and looking at the Apache site I still non the wiser.
 
Raymond Sabbatini
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm the original poster. Since posting, I have got a few more results from the command prompt:
when I try to run the tomcat startup file at the command line I get -
CATALINE_HOME environmental variable is not defined correctly
This environmental variable is needed to run this program
In my CATALINA_HOME environmental variable I have:
c:\Program Files\MyPrograms\jakarta-tomcat-5.0.12
my JAVA_HOME is set at:
c:\Program Files\MyPrograms\j2sdk1.4.0
my CLASSPATH variable is set at:
%CATALINA_HOME%\common\lib\servlet\jar;
finally, my path includes the following:
;%JAVA_HOME%\bin;%CATALINA_HOME%\bin
 
Raymond Sabbatini
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey, this is a learning process...
Have now got tomcat running. I placed the autoexec batch file at the root of the jakarta-tomcat folder, and ran startup from the command line. Incidently, how could I create a shortcut for this on the start menu: can't see how to do this. I don't mean just how to create a shortcut - but how to actually run tomcat from a windows shortcut, rather than the command line.
Unfortunately my test jsp file still can't be read in the browser, so anyone interested could be a great help to me.
 
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
I recommend removing everything you've done so far, and try using the Windows Installer.

It will modify any system variables you need, place shortcuts in the Start Menu, and plus it installs a Service if you want Tomcat to start automatically when your computer starts.

http://apache.mirrored.ca/jakarta/tomcat-4/v4.1.29/bin/jakarta-tomcat-4.1.29.exe
 
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
oops, you're using 5.x
http://apache.mirror.mcgill.ca/jakarta/tomcat-5/v5.0.16/bin/jakarta-tomcat-5.0.16.exe

Also...
Put double quotes around JAVA_HOME and CATALINA_HOME paths. The DOS startup scripts don't like encountering spaces.

classpath should be :
%CATALINA_HOME%\common\lib\servlet.jar
- servlet.jar , not servlet\jar
- no trailing semicolon, unless there's something after this entry
 
Raymond Sabbatini
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 - am dowloading it, and will let you know how I get on.
 
Raymond Sabbatini
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its working! Thanks again Mike, I followed your advice to the letter.
Not sure why I didn't spot the servlet\jar servlet.jar error the first time round.
Also not sure why Apache don't give the links (as you kindly did) to the exe files.
At one point (just before I got it working) I had my test jsp file in a WEB-INF folder, which itself was inside the tomcat 'webapps' folder. That didn't work, despite it being the advice given in my Wrox 'Beginning JSP 2.0' book. I simply moved the test jsp into the webapps folder (ignoring any WEB-INFO folder, and hey presto...
Anyway, I'm not here to complain about Wrox or Apache, just glad to get things up and running.
 
Ranch Hand
Posts: 2378
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Even after installing the EXE version, I am getting a strage tomcat startup problem recently in my xp box.
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic