File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes apache tomcat is arrogant...........huh Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "apache tomcat is arrogant...........huh" Watch "apache tomcat is arrogant...........huh" New topic

apache tomcat is arrogant...........huh

shashikanth penumadula
Ranch Hand

Joined: May 26, 2005
Posts: 32
hi group,how r u doing?
my system configuration is 63mb ram and 14gb harddisk, and i am working on windows 98.from the last 3 days i had been loading apache tomcat into my system,but its not happening.i dont understand what the problem is?
first its asking to enter a password and whatever the pwd i enter i am being told as invalid service name.then its getting loaded into c drive in my system.and when i click start.bat its teling invalid service name and the server is not running.even i couldnot compile my java programs(servlets).i am using j2sdk1.4.1.but the same thing when i work in my lab is happening fine.
any input will be of great help.
Abdulla Mamuwala
Ranch Hand

Joined: Jan 09, 2004
Posts: 225
Have a look at this site to configure tomcat

Marty Hall

It has got preconfigured tomcat files which makes things much easier, if this is the first time you are playing with tomcat.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
Windows 98 users must set a larger memory space for environment variables. The Tomcat startup uses lots of environment variables. A google search for "win98 tomcat environment" should find you more details.
shashikanth penumadula
Ranch Hand

Joined: May 26, 2005
Posts: 32
the port no. by default its taking as 8080
username by default its taking as admin
the pwd i am setting is manager(even i've tried server as my pwd)
then i am getting an error
error 2185:the service name is invalid.make sure you are specifying a valid service name and then try again.

for compilation
C:\Program Files\Apache Group\Tomcat 4.1\webapps\shashiservlets\WEB-INF\classes>javac
bad command or file name

this is the problem i am facing.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Originally posted by shashikanth penumadula:

for compilation
C:\Program Files\Apache Group\Tomcat 4.1\webapps\shashiservlets\WEB-INF\classes>javac
bad command or file name
this is the problem i am facing.

This has nothing to do with Tomcat. It's a Java issue.

If you're not already comfortable compiling and running simple Java command line apps, I would break away from Tomcat for a while and follow some Java Tutorials. The "First Cup of Java" tutorial on Sun's site is an excellent primer. Whatever time you invest learning Java fundamentals now will more than pay itself back when you resume with more advanced subjects such as Servlet programming.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
shashikanth penumadula
Ranch Hand

Joined: May 26, 2005
Posts: 32
hi ben souther,
yeah i've seen ur reply.the path which i gave for compilation i,e:
C:\Program Files\Apache Group\Tomcat 4.1\webapps\shashiservlets\WEB-INF\classes>javac
is a correct one.there's no error in that.coz i've set my path to c:\j2sdk1.4.1\bin.
And the path {C:\Program Files\Apache Group\Tomcat 4.1\webapps\shashiservlets\WEB-INF\classes>javac}
is like i've put my helloservlet program(that is .java file) in classes folder,which is WEB-INF folder,which is in shashiservlets folder,which is in webapps folder,which is in tomcat 4.1 folder,which is in apache group folder,which is in my program files.
as i am new to servlets i was taught to put my .java file in there.the folders shashiservlets,WEB-INF and classes are all created by me.and the webapps folder is provided by tomcat server itself.


while tomcat installation:the path it has taken is(by default)
C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin

the path of jvm installed on my system is
C:\Program Files\JavaSoft\JRE\1.2

when i open the server by clicking, startup.bat
c:\prgram files\apache software foundation\tomcat 5.0\bin
the error i am facing is:
The catalina_home environment variable is not defined correctly
This environment variable is needed to run this program

so i had to install the server to a folder in C drive& the name of it is tomcat5.0
i created a cpath.bat in C:\Tomcat5.0\bin.
The file(cpath.bat) contains
set CATALINA_HOME=C:\Tomcat5.0
set classpath=C:\ProgramFiles\Java\j2re1.4.1\lib;D:\%CATALINA_HOME%\common\lib\servlet-api.jar;d:\%

and in the command window i did.......


i was shown:

C:\Tomcat5.0\bin>set CATALINA_HOME=C:\Tomcat5.0

C:\Tomcat5.0\bin>set classpath=C:\ProgramFiles\Java\j2re1.4.1\lib;D:\C:\Tomcat5.0\common\lib\servlet-api.jar;d:\


to start the server i did:


then the error i am facing was:

The JAVA_HOME environment variable is not defined
This environment variable is needed to run this program
Invalid switch
Using CATALINA_BASE: C:\Tomcat5.0
Using CATALINA_HOME: C:\Tomcat5.0
Using CATALINA_TMPDIR: C:\Tomcat5.0\temp
Invalid switch - -DJAVA.ENDORSED.DIRS=

i thought there cod be some installation problem so i reinstalledtomcat5.0 C drive and also i've installed j2sdk1.4.1 also in c drive. and i've copied the cpath.bat file to tomcat5.0/bin in c drive,which contains
set CATALINA_HOME=C:\Tomcat5.0
set classpath=C:\j2sdk1.4.1\jre\lib;D:\%CATALINA_HOME%\common\lib\servlet-api.jar;d:\%

and in the command window i performed:

C:\Tomcat5.0>cd bin


and it has shown

C:\Tomcat5.0\bin>set CATALINA_HOME=C:\Tomcat5.0

C:\Tomcat5.0\bin>set classpath=C:\j2sdk1.4.1\jre\lib;D:\%CATALINA_HOME%\common\lib\servlet-api.jar;d:\%


and then i started


and i got this error
Out of environment space
Cannot find
This file is needed to run this program

sir,if there are any errors in these steps performed by me.....then plzzzzz reply so that i could install the apache tomcat server at the earliest.
waiting for a reply
I agree. Here's the link:
subject: apache tomcat is arrogant...........huh
jQuery in Action, 3rd edition