• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

mdotting vs Tomcat part 2

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all I really appreciate everybody's help in getting all this figured out. I decided to go with tomcat's latest version, 4.0. I installed it and configured it in one try, how about that BUT, I'm having problems with the classpath variable. I'm running windows 98 and was told to go into autoexec.bat and type underneath my previous classpath for my jdk:
set classpath=c:\tomcat\lib\%CLASSPATH%
does this sound right? Anyways it doesn't work. When I compile my HelloWorld servlet it comes back with a zillion 'cannot resolve symbol' errors. I'm assuming that's the classpath error right. Anyways if anybody has any input on classpaths on win 98 I'd greatly appreciate it. Also I was told I need to change my user name to a two name format, do I do that through my profile or do I just re-register? Thanks for all the help!!
 
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
welcome back.
You know that for Tomcat4 home environment-variable is not yet TOMCAT_HOME. Its CATALINA_HOME?
I found some other usefull information:
If you are using Window98 environment variables are set by editing the C:\autoexec.bat file. Add the following lines:
set CATALINA_HOME=C:\<name_OF_Dir>
set JAVA_HOME=C:\jdk1.3
AND NOW:
Under Window98 you will also need to increase the environmental space available, by rightclicking on your DOS prompt window, selecting Properties, going to the Memory tab, and setting the initial environment to 4096.

co-ranchero mdotting please tell me that this was the little, little error after which solving you are able to play peacefully 2, 3, 4, 5 or even 6 hours number guessing game jsp. You deserve that.
good luck
 
mdotting
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Alright, so I went in and fiddled with my autoexec.bat to try and get my classes to compile. No luck, in fact now my server doesn't even start up. In tomcat 4.0 there's actually an installation so I'm given an icon off the Start menu to startup and shutdown my server. When I click on the start up the dos screen flashes and it looks like it says something about an exception being raised, it's too fast to tell anything though. Anyways I took the liberty of copying my autoexec.bat file. Maybe somebody can spot an error:
PATH=C:\jdk1.3\bin; (LINE)
SET CLASSPATH=.;c:\tomcat\lib\servlet.jar;c:\tomcat\lib\jasper.jar;c:\tomcat%CLASSPATH%(LINE)
SET JAVA_HOME=C:\jdk1.3(LINE)
SET CATALINA_HOME=C:\TOMCAT(LINE)
SET COBDIR=C:\MFCOBOL(LINE)
SET COBHNF=C:\MFCOBOL(LINE)
REM C:\WINDOWS\SYSTEM\WAVEINIT.EXE(LINE)
REM C:\WINDOWS\SYSTEM\WAVETSR.COM(LINE)
REM ****** TRIDENT MICROSYSTEMS, INC. PCI AUDIO DOS UTILS ******(LINE)
I typed those (LINE) comments in here just so you see that it's actually one whole line on my screen and not two separate lines as it might be shown in this forum. Anyways, the second line, where I set CLASSPATH I know is wrong because I don't know where the servlet.jar and jsp.jar files are located in the tomcat directory. The next two lines after that are self-explanatory. The lines after that I'm wondering if I can just get rid of, I think they refer to an old cobol compiler I haven't used in years. Much appreciation to anyone who can help!
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

mdotting: Start it from the Dos-Window.
Open the commandLine window.
Your tomcat is in C:\tomcat???
Type C:
Type cd tomcat
Type cd bin
Type Startup
Open browser. Enter http://127.0.0.1:8080
good luck
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
AND
SET CLASSPATH=.;c:\tomcat\lib\servlet.jar;c:\tomcat\lib\jasper.jar;c:\tomcat%CLASSPATH%(LINE)
This line looks strange.
1. I think you do not need this.
2. Inf you think you need it try:
CLASSPATH=.;c:\tomcat\lib\servlet.jar;c:\tomcat\lib\jasper.jar;c:\tomcat;c:\tomcat\bin;%CLASSPATH%(LINE)
 
mdotting
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Axel, starting the server from the command line worked. I also found out where the servlet.jar file is located in the tomcat 4.0 directory. install_dir\common\lib. But when I set my classpath to it, nothing. Do I have to restart my computer everytime I change autoexec.bat in order for the changes to take effect? I've been doing that. Anyways, I'll keep trying every possible combination. I'm wondering what is this: .; before my classpath, I know . represents the current directory but if I'm saying C:\tomcat\common\lib do I really need the .; preceding it? Also %CLASSPATH% what's this? THanks for the help!
 
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
On Win98, yes a restart is required.

; is the separater in CLASSPATH statements, so you *do* need it.

.; at the very beginning is just a way to make sure that javac will check the current directory first, when it attempts to import classes. If you are *in* the c:\tomcat\common\lib directory when you try to compile your servlet, it wouldn't really be necessary.

%CLASSPATH% is a DOS batch file representation of "current contents of CLASSPATH" and it is used to concatenate entries. Think of it like:
in java: i=i+1
in batch file: set classpath=%classpath%;1
 
"I know this defies the law of gravity... but I never studied law." -B. Bunny Defiant tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic