GeeCON Prague 2014*
The moose likes Servlets and the fly likes TomCat 3.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "TomCat 3.0 " Watch "TomCat 3.0 " New topic
Author

TomCat 3.0

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I have been trying to get hold of TomCat 3.0 so that I can run
some JSP's, can anybody help.
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
http://jakarta.apache.org/downloads/binindex.html


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Ajay Kumar
Ranch Hand

Joined: Apr 28, 2000
Posts: 87
Hi All,
I have downloaded Tomcat from the site mentioned above. I even unzipped the Tomcat file and it is residing on c:\Tomcat directory. I made all the changes to the CLASSPATH in the Autoexec.bat file.
But when I run the startup.bat a DOS window just flashes at me and thats it. Nothing happens. (I am running on Windows 98). Could anyone please tell me what am I doing wrong?
Any help would be highly appreciated.
Thanks
Ajay Kumar


Regds<BR>Ajay Kumar
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Do I need to download all of the following to c:\
jakarta-ant.tar.Z 18-Apr-2000 11:43 1.2M
jakarta-ant.tar.gz 18-Apr-2000 11:20 388k
jakarta-ant.zip 18-Apr-2000 11:47 588k
jakarta-tomcat.tar.Z 18-Apr-2000 13:26 3.1M
jakarta-tomcat.tar.gz 18-Apr-2000 12:31 1.8M
jakarta-tomcat.zip 18-Apr-2000 13:54 2.3M
jakarta-tools.tar.Z 18-Apr-2000 14:22 1.2M
jakarta-tools.tar.gz 18-Apr-2000 14:08 888k
jakarta-tools.zip 18-Apr-2000 14:29 888k
jakarta-watchdog.tar 18-Apr-2000 15:10 3.5M
jakarta-watchdog.tar.gz 18-Apr-2000 15:37 2.6M
jakarta-watchdog.zip 18-Apr-2000 16:03 2.7M
Thanx
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi Umesh,
I think you just down load jakarta-tomcat.zip
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
You do not have to download all that stuff if you just want to experiment with Tomcat. I also had some difficulty getting it going on Win 98 - here are my recommendations:
1. Run the startup.bat from an open MSDOS window so you can see the error messages. Comment out the @echo off lines in startup.bat and tomcat.bat for initial work.
2. Set your environment variables TOMCAT_HOME and JAVA_HOME
3. Be sure you have the JDK 1.2.2 - the 1.2.1 release causes weird problems for some reason. People have also reported that the 1.3 JDK works
4. If you have copies of the old Sun servlet DK on your system, be sure to remove the JAR file that comes with it.
5. Read the readme file.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi William,
I have setup the environment variables TOMCAT_HOME and JAVA_HOME
I also commented out @echo off lines in startup.bat and tomcat.bat. On starting tomcat using tomcat start or startup I get the following messages
out of environment space
starting tomcat in new window
using classpath .;c:\jdk1.3\lib\tools.jar
The new window that pops up for approx 3sec displays some
sort of thread exception error.
If I still enter the URL http://127.0.0.1:8080/ in the
web browser I get TOMCAT initial page. On selecting any of the
jsp examples I get the following error page:-
'The page cannot be displayed, web site experiencing technical
difficulty or may need to adjust browser settings'
I have looked for the jsdk.jar file within the dir jre\lib\ext
but none exists to remove.
I'm using JDK 1.3, IE5 on windows 95.
Sorry for my lack of knowledge, can you help.
Ajay Kumar
Ranch Hand

Joined: Apr 28, 2000
Posts: 87
Hi William,
I tried it a number of ways but I could not get to work.
I have unzipped the jakarta-tomcat.zip
into to c:\tomcat with the startp.bat and shutdown.bat in the directory c:\tomcat\bin.
I WANTED TO KNOW IF THIS IS THE CORRECT PROCEDURE.
Next I set the TOMCAT_HOME as c:\TOMCAT and JAVA_HOME as c:\JDK1.2.2\bin.
I then commented out the @echo off in the startup.bat and tomcat.bat files.
When I run startup front he DOS prompt I see a bunch of messages (but no errors or warnings - I kept track by hitting the pause key) and a java window flases by and nothing happens. When I try to access from a web browser noting happens.
I know that the server is not starting up.
Could someone please help me thru this. I would appreciate it very much.
Thanks
Ajay Kumar
[This message has been edited by Ajay Kumar (edited May 27, 2000).]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
It is probably the environment space problem that is keeping you from running. Each MSDOS process gets a fixed amount of space to store environment variables and TomCat needs to have several set.
Bring up a MS-DOS prompt window.
Click in the upper left corner to get the menu and select the Properties dialog.
From the Memory tab, set the Initial environment value - I am using 2816 and it seems to work, but you may need more if you have a lot of environment variables set already - such as a big PATH setting.
Click "Apply" - then ok and exit the Properties dialog.
Close that MS-Dos window and start a new one.
You can see the environment variables in a MSDOS window by using the SET command.
Ajay Kumar
Ranch Hand

Joined: Apr 28, 2000
Posts: 87
Hi William,
Thanks a lot for UR patience in replying. I could finally get started with Tomcat.
Thanks
Ajay Kumar
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi William,
It works fine, thanks for helping out; without your help
I would not have got it working.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
Glad it worked!
I am currently writing a book on Java servlets and JavaServer Pages so I want to keep track of things that have given people problems.
WBB
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
Someone mentioned that JAVA_HOME should be set to the \bin directory and I'm not sure about that but *cannot* verify now. I'm away from home or office. It may be the C:\JDK1.3 or C:\JDK1.2.2 DIR; that is, the top DIR in which you have the JDK installed.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi Tony,
I think your correct in saying SET JAVA_HOME=c:\jdk1.2
JSP work ok with the above setting.
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
Aha! So my memory is not failing yet! Ha Ha!
DC Dalton
Ranch Hand

Joined: May 28, 2001
Posts: 287
Well I hate to jump on the band wagon at this late moment but I got sick & tired of running servlets on my laptop today & decided to attempt installing everything on my Win98 monster. Ive got the jdk (1.3) installed & running console apps just fine. I downloaded & installed tomcat 3.2.2 onto c:\jakarta-tomcat-3.2.2. Ive got the Java Home variable set to C:\jdk. Im getting an error message when running startup.bat after it loads the classes & says starting tomcat in a new window. The error is: cannot find file '\bin\java' or one of it's components. Did I misss something on the installation notes......It can't find this file because it doesnt exist in either the jdk\bin or the tomcat bin. Any & all help would be much appreciated....I can't take another day staring at this laptop!
DC Dalton
Ranch Hand

Joined: May 28, 2001
Posts: 287
A new twist to my last note. Last night I had forgotten to set tomcat home as described in the instructions. When I do (either in DOS or in the .bat file) I get a bad command or file name when I try to run startup from the approriate folder, so it seems Ive got at least 2 flys in the old ointment. I still cant figure out the /bin/java that is descibed in the previous posting.......Thanks again for any & all help!
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

I was helping someone else out with getting Tomcat to run under Win9x... There is a command in the batch files that is not recognized under WinME, and could also be a problem under 9x. I am only going from memory... but I think startup.bat calls tomcat.bat with the 'start' command? This makes it open in it's own DOS window... WinME doesn't recognize this, so after removing the word 'start' (or whatever it was), everything worked fine. Perhaps this is the problem.

I'm thinking this way because "bad command or file name" is a DOS error, not a Tomcat error.
Jimi Rock
Ranch Hand

Joined: Feb 19, 2001
Posts: 134
I have tried tomcat under win98. It works fine.
I needed to set my starting memory and then cd tomcat -> cd bin
-> tomcat start.
Regards,
Jimi.
DC Dalton
Ranch Hand

Joined: May 28, 2001
Posts: 287
I tried commenting out the start command from this line in startup.bat:
:start
call "%TOMCAT_HOME%\bin\tomcat" start %1 %2 %3 %4 %5 %6 %7 %8 %9
that still gives me the missing file error above after setting TOMCAT_HOME to C:\tomcat. I have the memory set at 4096 as recommended to the others. When I try it Jimi's way without setting TOMCAT_HOME it get this error: Unable to locate serlet.jar CHECK THE VALUE OF TOMCAT_HOME. After setting tomcat home again (above) Im back to the cant find 'bin\java'. Can one of you check your installation (if any of you have win98) & see if there is supposed to be a java directory or file in the bin folder........Im at a loss here but I do thank you all for your efforts
Jimi Rock
Ranch Hand

Joined: Feb 19, 2001
Posts: 134
Dalton,
I am actually using Win98. so, I think that what I am telling you should work.
*You have told that you have set your memory.
*start->run->sysedit. and then write the following:
PATH=%PATH%;.;C:\jdk1.3\bin
set classpath=C:\jdk1.3\lib\tools.jar;.;D:\tomcat\lib\servlet.jar
set TOMCAT_HOME=C:\tomcat
set JAVA_HOME=C:\jdk1.3
*Restart your computer
*open your command prompt and check your variables by typing
path
set
*if every thing is ok then cd tomcat-> cd bin-> tomcat start.
Tell if it works or problem occured.
Regards,
Jimi.
DC Dalton
Ranch Hand

Joined: May 28, 2001
Posts: 287
You guys are the greatest! Works like a charm now. Many many thanks for your patience & help especially Jimi!
Jimi Rock
Ranch Hand

Joined: Feb 19, 2001
Posts: 134
Happy for you Dalton, keep working
Regards,
Jimi.
Jay Thorn
Greenhorn

Joined: Aug 10, 2001
Posts: 6
I'm not sure if anyone can help me after all this time, but I am tyring to install the Tomcat into either my win98 or winME machine, but given all the different instructions that I have seen posted from one site to another I'm at a lost.
Is there a clear cut approach that will help you walk through this or is just a trail and error approach?
Just for informations sake, I have the jdk1.2.2 installed on both machines and working fine as well PWS. I also have the Apache download for the Tomcat fpr installation, but editing the tomcat.bat file is where I am getting lost at.
If anyone can tell me exactly which line I should goto to find the JAVA_HOME variable to point it to my c:\jdk1.2.2 that would be great.
Also is it true that if you comment out the "echo tomcat (start^|run^|env^|stop)" line that will allow it to work in these two environments?
Sorry to be asking for so much but I am fairly new to this and trying to get my feet as wet as possible.
Thanks in advance.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

Is there a clear cut approach that will help you walk through this or is just a trail and error approach?

yes there are clear answers, just ask the right qstn and
we can help you. See, each person has a different way of
doing things and so you probably find varying solutions.
You should recognize the fact that each of us has a brain
and we think differently. ah well! enough of my phylosophy...

Just for informations sake, I have the jdk1.2.2 installed on both machines and working fine as well PWS. I also have the Apache download for the Tomcat fpr installation, but editing the tomcat.bat file is where I am getting lost at.

are you trying to run tomcat in association with apache?

If anyone can tell me exactly which line I should goto to find the JAVA_HOME variable to point it to my c:\jdk1.2.2 that would be great.

So, I understand that you are trying to edit tomcat.bat
to introduce the JAVA_HOME env variable. If so, I don't
like it one bit (sorry, din't mean to be rude, but...).
Personally, I would suggest you declare the env variable in your autoexec.bat file to point to C:\jdk.1.2.2.

Also is it true that if you comment out the "echo tomcat (start^|run^|env^|stop)" line that will allow it to work in these two environments?

Well, as I said earlier, I wouldn't like to change the
generic bat files that come with the std download.

Sorry to be asking for so much but I am fairly new to this and trying to get my feet as wet as possible.

no problems, just ask what you want and someone will help you...
<font color=red>javaranch - a friendly place for java greenhorns.</font>
regds.
- satya

[This message has been edited by Madhav Lakkapragada (edited August 10, 2001).]


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Jay Thorn
Greenhorn

Joined: Aug 10, 2001
Posts: 6
Thanks for replying Madhav.
<!-- are you trying to run tomcat in association with apache? -->
I actually have been trying to use this Sams teach yourself JSP (which is probably where I started off wrong) and the instructions for installing just the Tomcat server was to edit the tomcat.bat file.
<!-- Personally, I would suggest you declare the env variable in your autoexec.bat file to point to C:\jdk.1.2.2. -->
Now I do have the autoexe.bat file pointing to the c:\jdk1.2.2 when I installed the jdk, unless you are meaning I need to edit a new line in the autoexe.bat file.
AS far as commenting out the comment out the "echo tomcat (start^|run^|env^|stop)" line, if I left this line intact will win98 or winME know when to start since this is based on an NT format?
Jay Thorn
Greenhorn

Joined: Aug 10, 2001
Posts: 6
HEY Madhav!! I got it to work!!
I know you said you didn't recommend me editing the tomcat.bat file, but I was reading back through some previous replies and I read "William Brogden" reply on "May 27, 2000 10:06 AM" so I first made a backup copy of my startup.bat and tomcat.bat files then "rem" out the @echo off lines.
Then I added the c:\jdk1.2.2\bin to the line set CLASSPATH=.
(Which I added below for visuals just incase someone else new comes along)
set CLASSPATH=c:\JDK1.2.2\bin.
set CLASSPATH=%TOMCAT_HOME%\classes
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\webserver.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\jasper.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\xml.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\servlet.jar
set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar

I went to my command window changed dir's to the tomcat\binary\bin and entered tomcat start. A new dos window popped open an I open my browser enter the http://localhost:8080 addr and whalla I AM IN!!
Whew I though I was lost for a minute there.
Thanks again I am sure I will have other questions shortly since I tested this out in win95 first.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

Good luck.
- satya
Jay Thorn
Greenhorn

Joined: Aug 10, 2001
Posts: 6
Sorry slight mistake on last message...
in the Startup.bat file set the
<!-- if not "%TOMCAT_HOME%" == "" goto start -->
to
<-- if not "%TOMCAT_HOME%c:\Tomcat" == "" goto start -->
or

<-- if not "%TOMCAT_HOME%c:\Tomcat\binary" == "" goto start -->
if your download comes with the Bin folder located in the Binary folder like mine did.
Then in the Tomcat.bat file set the
<-- if not "%TOMCAT_HOME%" == "" goto gothome -->
to
<-- if not "%TOMCAT_HOME%c:\Tomcat" == "" goto gothome -->
then scroll down set the path for the jdk line from
<!-- set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar -->

to
<!-- set CLASSPATH=%CLASSPATH%;%JAVA_HOME%c:\JDK1.2.2\lib\tools.jar -->
save each
goto DOS window enter path to Tomcat\bin enter startup and second window should appear. If the last line in the second DOS window does not say "Starting tomcat install" close that wnndow and re-enter "startup" in the first DOS window until that line shows up or the Server will not be running.
This works for both win95 and win98, haven't tried winME yet.
Also, if you have a PWS loaded on your PC you will need to go into the tomcat\conf folder and alter the server.xml page where it says <Parameter name="port" value="8080"/>.
Change that value to another number I used port 80. When you tyoe in the "http://localhost:8080" addr it would not display unless you change that port value first then type "http://localhost:80".
I hope this helps out anyone else, happy coding.
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
This is about environment space and not tomcat.
Originally posted by William Brogden:
It is probably the environment space problem that is keeping you from running. Each MSDOS process gets a fixed amount of space to store environment variables and TomCat needs to have several set.
Bring up a MS-DOS prompt window.
Click in the upper left corner to get the menu and select the Properties dialog.
From the Memory tab, set the Initial environment value - I am using 2816 and it seems to work, but you may need more if you have a lot of environment variables set already - such as a big PATH setting.
Click "Apply" - then ok and exit the Properties dialog.
Close that MS-Dos window and start a new one.
You can see the environment variables in a MSDOS window by using the SET command.

I don't know if this method works beyond reboots, but I'd guess it doesn't. I have the following line in my C:\config.sys to increase environment space:
shell=C:\command.com /e:8192 /p
I use 8192 but you can use whatever you want. I like to have a lot of space because I use a pretty big classpath and path, plus and extra copy of the classpath for jikes.
Jay Thorn
Greenhorn

Joined: Aug 10, 2001
Posts: 6
Originally posted by David Garland:
This is about environment space and not tomcat.
I don't know if this method works beyond reboots, but I'd guess it doesn't. I have the following line in my C:\config.sys to increase environment space:
shell=C:\command.com /e:8192 /p
I use 8192 but you can use whatever you want. I like to have a lot of space because I use a pretty big classpath and path, plus and extra copy of the classpath for jikes.


David I tried this method with winME but it doesn't seem to prevent the second DOS window from flashing when it runs the startup.bat file.
I'm not sure if this is also a reason but I installed jdk1.3.1 on my winME pc, which will run precompiled java code but it doesn't allow me to compile any new java code. Are these issues strickly associated with winME? I am able to run my PWS and Tomcat simultaneously in win98.
Jay Thorn
Greenhorn

Joined: Aug 10, 2001
Posts: 6
Well I was able to find my answer at Sun's site. I was changing the path in my Autexec.bat file, which in winME doesn't allow it to point directly to the jdk. Here's the instructs I got from Sun's site on where to find the correct configuration utility.
"Windows ME - To set the PATH permanently:
From the start menu, choose programs, accessories, system tools, and system information. This brings up a window titled "Microsoft Help and Support". From here, choose the tools menu, then select the system configuration utility. Click the environment tab, select PATH and press the edit button. Now add the SDK to your path PATH C:\WINDOWS;C:\WINDOWS\COMMAND;C:\JDK1.3.1\BIN . After you've added the location of the SDK to your PATH, save the changes and reboot your machine when prompted."
Yes it does allow you to run both PWS and Tomcat as well as long as you leave the Tomcat's localhost port value set at 8080 since PWS uses the port value 80 as default.
Thanks for replying guys to get me up and running you are great!!
 
GeeCON Prague 2014
 
subject: TomCat 3.0