tom cat
  1. tom cat (8 messages)

    I downloaded tomcat

    I Set TOMCAT_HOME to c:\jakarta-tomcat the directory where

    I installed tom cat

    I also have JAVA-HOME set to JAVA_HOME=c:\jdk1.2.2
     
    I have the class path also

    setCLASSPATH=C:\jdk1.2.2\lib\tools.jar;c:\jakarta-tomcat\bin

    PATH is set as
     SET PATH=%PATH%;c:\jdk1.2.2\bin;c:\jakarta-tomcat\bin;

    but when running the tomcat startup.bat I am getting
    " bad command or file name"

    WHEN I went to tomcat-home\bin and double clicked the
     startup bat file icon I am getting the same error
    " bad command or file name"

    When i tried to run the tomcat.bat in the same directory
    I am getting same error message

    " bad command or file name"

    I am using win98

    please help to start the server




    Threaded Messages (8)

  2. tom cat[ Go to top ]

    Hi Preethi,

    It shuld be the path problem.. the command u trying to execute is not in the path ..

    Explore startup.bat and u will find some command is not comes under the path..

    check also in the current command prompt whether the path is latest...

    Hope this helps

    Saran
  3. tom cat[ Go to top ]


    hi
    it is not path problem

    I checked the path
    jakarta-tomcat\bin is there in path(see below)

    C:\WINDOWS>path
    PATH=
    C:\WINDOWS;C:\WINDOWS\COMMAND;C:\JDK1.2.2\BIN;
    C:\JAKARTA-TOMCAT\BIN;

    I am getting only one line when running the bat files
    ( startup.bat and tomcat.bat)
    "bad command or file name"
    even if I go to the directory directly and clicking the
    icons for the bat fies( by exploring)
    I GET THE SAME ERROR MESSAGE
    I am using win98
    Preethi
  4. tom cat[ Go to top ]

    Hi,

    if possible send me the batch files..

    saran_v at yahoo dot com

    Saran
  5. tom cat[ Go to top ]

    hi
    I have not written the bat file
    It is there in jakarta-tomcat\bin
    startup.bat is as under@echo off
    rem $Id: startup.bat,v 1.7 2000/03/31 19:40:02 craigmcc Exp $
    rem Startup batch file for tomcat servner.

    rem This batch file written and tested under Windows NT
    rem Improvements to this file are welcome

    if not "%TOMCAT_HOME%" == "" goto start

    SET TOMCAT_HOME=.
    if exist %TOMCAT_HOME%\bin\tomcat.bat goto start

    SET TOMCAT_HOME=..
    if exist %TOMCAT_HOME%\bin\tomcat.bat goto start

    SET TOMCAT_HOME=
    echo Unable to determine the value of TOMCAT_HOME.
    goto eof

    :start
    call %TOMCAT_HOME%\bin\tomcat start %1 %2 %3 %4 %5 %6 %7 %8 %9

    :eof

    tomcat.bat is as below

    @echo off
    rem A batch file to start/stop tomcat server.

    rem This batch file written and tested under Windows NT
    rem Improvements to this file are welcome

    rem Guess TOMCAT_HOME if it is not present

    if not "%TOMCAT_HOME%" == "" goto gothome

    SET TOMCAT_HOME=.
    if exist %TOMCAT_HOME%\bin\tomcat.bat goto gothome

    SET TOMCAT_HOME=..
    if exist %TOMCAT_HOME%\bin\tomcat.bat goto gothome

    SET TOMCAT_HOME=
    echo Unable to determine the value of TOMCAT_HOME.
    goto eof

    :gothome

    rem Set up the CLASSPATH that we need

    set cp=%CLASSPATH%

    set CLASSPATH=.
    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

    if "%cp%" == "" goto next

    rem else
    set CLASSPATH=%CLASSPATH%;%cp%

    :next
    if "%1" == "start" goto startServer
    if "%1" == "stop" goto stopServer
    if "%1" == "run" goto runServer
    if "%1" == "env" goto setupEnv
    if "%1" == "ant" goto runAnt
    if "%1" == "jspc" goto runJspc

    echo Usage:
    echo tomcat (start^|run^|env^|stop)
    echo start - start tomcat in a separate window
    echo run - start tomcat in the current window
    echo env - setup the environment for tomcat
    echo stop - stop tomcat
    echo ant - run ant with tomcat context
    echo jspc - run jsp pre compiler
    goto cleanup

    :startServer
    echo Starting tomcat in new window
    echo Using classpath: %CLASSPATH%
    start java %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
    goto cleanup

    :runServer
    rem Start the Tomcat Server
    echo Using classpath: %CLASSPATH%
    java %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
    goto cleanup

    :stopServer
    rem Stop the Tomcat Server
    echo Using classpath: %CLASSPATH%
    java %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat -stop %2 %3 %4 %5 %6 %7 %8 %9
    goto cleanup
    goto cleanup

    :runAnt
    rem Run ant
    set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\ant.jar
    echo Using classpath: %CLASSPATH%
    java %ANT_OPTS% -Dant.home="%TOMCAT_HOME%" -Dtomcat.home="%TOMCAT_HOME%" org.apache.tools.ant.Main %2 %3 %4 %5 %6 %7 %8 %9
    goto cleanup

    :runJspc
    rem Run ant
    echo Using classpath: %CLASSPATH%
    java %JSPC_OPTS% -Dtomcat.home="%TOMCAT_HOME%" org.apache.jasper.JspC %2 %3 %4 %5 %6 %7 %8 %9
    goto cleanup

    :setupEnv
    set cp=%CLASSPATH%

    :cleanup
    rem clean up

    set CLASSPATH=%cp%
    set port=
    set host=
    set test=
    set jsdkJars=
    set jspJars=
    set beanJars=
    set miscJars=
    set appJars=
    set appClassPath=
    set cp=

    rem pause
    :eof

    but I am getting only
    "bad command or file name" error when i run it
    on win 98
    I HAVE SET TOMCAT-HOME , JAVA-HOME ETC PROPERLY AS IN MESSAGE1
    my path also is correct see message2
    thanks
    preethi









    ------------------

  6. tom cat[ Go to top ]

    hi preethi
     all u need to do is whenever u did some change in autoexec.bat, run the autoexec.bat again or restart the machine, it will automatically takes the bat file changes

    check ur path variables

    set Tomcat_HOME= "your path of tomcat 3.2"
    set JAVA_HOME="your jdk installation path"

    and that will do

    also in case of Win98, go to msdos prompt, and in properties tab , goto memory tab. in that instead of AUTO, set to 2816.
    restart ur dos mode and try tomcatenv.bat

    i think it works

  7. tom cat[ Go to top ]

    hi
    I have already set
    TOMCAT-HOME, JAVA-HOME , PATH Properly
    see messages 1, 3 and 5
    all are included in path also
    there is no memory out of space problem and I ALREADY SET IT
    RESTARTED THE SYSTEM
    NO USE
    if I run the startup.bat, tomcat.bat either at command prompt or going directly to the bin directory and double clicking the it

    I am getting the batch file finished with one line message

    "bad command or file name"

    If tomcatenv.bat is run I AM GETTING ONLY ONE LINE

    "OFF"

    IN WIN98
    PLEASE HELP TO RUN TOMCAT
    THANKS
    PREETHI
  8. tom cat[ Go to top ]

    I finally found part of the problem
    this bat files in tomcat/bin are for windowNT
    I am using win98

    SO I made a bat file
    it is working partially
    but when i call the startup.bat it is giving
     "badcommand or file name"
    when it calls startup.bat
    so I COPIED THE STARTUP.BAT INTO THE FILE
    Till that point is ok
    but when it executes the startup.bat file commands I copied gives error
    so I have to modify it for win98
    any ideas

    the bat file i made
    ------------
    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 java

    //till here it is ok. the commands below is what I copied
    // from startup.bat (not working see error )

    @echo off
    rem $Id: startup.bat,v 1.7 2000/03/31 19:40:02 craigmcc Exp $
    rem Startup batch file for tomcat servner.

    rem This batch file written and tested under Windows NT
    rem Improvements to this file are welcome

    if not "%TOMCAT_HOME%" == "" goto start

    SET TOMCAT_HOME=.
    if exist %TOMCAT_HOME%\bin\tomcat.bat goto start

    SET TOMCAT_HOME=..
    if exist %TOMCAT_HOME%\bin\tomcat.bat goto start

    SET TOMCAT_HOME=
    echo Unable to determine the value of TOMCAT_HOME.
    goto eof

    :start
    call %TOMCAT_HOME%\bin\tomcat start %1 %2 %3 %4 %5 %6 %7 %8 %9

    :eof


    OUTPUT
    -------------

    C:\jakarta-tomcat\bin>set CLASSPATH=C:\jakarta-tomcat \classes ;C:\jakarta-tomca
    t \lib\webserver.jar ;C:\jakarta-tomcat \lib\jasper.jar

    C:\jakarta-tomcat\bin>set CLASSPATH=C:\jakarta-tomcat \classes ;C:\jakarta-tomca
    t \lib\webserver.jar ;C:\jakarta-tomcat \lib\jasper.jar ;C:\jakarta-tomcat \lib\
    xml.jar

    C:\jakarta-tomcat\bin> set CLASSPATH=C:\jakarta-tomcat \classes ;C:\jakarta-tomc
    at \lib\webserver.jar ;C:\jakarta-tomcat \lib\jasper.jar ;C:\jakarta-tomcat \lib
    \xml.jar;C:\jakarta-tomcat \lib\servlet.jar

    C:\jakarta-tomcat\bin>set CLASSPATH=C:\jakarta-tomcat \classes ;C:\jakarta-tomca
    t \lib\webserver.jar ;C:\jakarta-tomcat \lib\jasper.jar ;C:\jakarta-tomcat \lib\
    xml.jar;C:\jakarta-tomcat \lib\servlet.jar ;c:\jdk1.2.2\lib\tools.jar java

    C:\jakarta-tomcat\bin>
    C:\jakarta-tomcat\bin>
    C:\jakarta-tomcat\bin>
    C:\jakarta-tomcat\bin>
    Bad command or file name

    C:\jakarta-tomcat\bin>



  9. tom cat[ Go to top ]

    Hi,
    I am also using tomcat.Initially when i had the same problem i made the following changes and now my tomcat is working perfectly.
    So, inside tomcat bin directory you will see one file called tomcatEnv.bat, now remove the contents of the file and place the following contents,


    set TOMCAT_HOME=c:\tomcat
    set JAVA_HOME=c:\jdk1.1.8
    set CLASSPATH=.;c:\tomcat\lib\servlet.jar;c:tomcat\lib\jspengine.jar;%CLASSPATH%
    set path=%path%;c:\jdk1.1.8\bin;c:\tomcat\bin

    So whenever you want to start tomcat before that just type tomcatEnv in your command prompt.Then start tomcat.That's it.
    Try this if not reply.
    Praja