You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jon Pratt <jo...@yahoo.com> on 2000/12/18 22:10:44 UTC

Getting Tomcat to run

I downloaded Apache and got it to run.  I downloaded Tomcat 3.2.1 build and tried to compile the java files. Got tons of errors. Can anyone point me at a definitive step by step Howto?  
I did the following (from Tomcat - A Minimalistic User's guide):
  a.. Download the zip/tar.gz/whatever file from http://jakarta.apache.org/downloads/binindex.html. 
  b.. Unzip the file into some directory (say foo). This should create a new subdirectory named "tomcat". 
  c.. Change directory to "tomcat" and set a new environment variable (TOMCAT_HOME) to point to the root directory of your Tomcat hierarchy. 
    1.. On Win32 you should type: 
    "set TOMCAT_HOME=foo\tomcat" 
    2.. On UNIX you should type: 
    for bash/sh "TOMCAT_HOME=foo/tomcat ; export TOMCAT_HOME"
    for tcsh "setenv TOMCAT_HOME foo/tomcat" 
  d.. Set the environment variable JAVA_HOME to point to the root directory of your JDK hierarchy, then add the Java interpreter to your PATH environment variable. 
That's it! You can now execute Tomcat and it will run as a stand-alone (type 1) servlet container...........BUT that's not IT.


Better Tomcat manual

Posted by Andreas Sheriff <ma...@asheriff.com>.
Can someone *please* put together a better Tomcat manual than is already
there?  Especially where it talks about the <host> configuration element in
the server.xml file.  Wait a minute, there are only two references in the
entire site to <host>, and neither of them are of any help.  :(


Re: Getting Tomcat to run / Installation Error Fixes and Testing

Posted by Jon Pratt <jo...@yahoo.com>.
Hey thanks!
To test per your item 7 below, I put a copy of colrs.jsp from webapps/jsp to
webapps/root/jsp (I created as you did).  Got the following:
org.apache.jasper.JasperException: Unable to compile class for
JSPC:\GameD\tomcat\work\localhost_8080\_0002fjsp_0002fcolrs_0002ejspcolrs_js
p_0.java:63: Class colors.ColorGameBean not found.
                colors.ColorGameBean cb = null;
                      ^
C:\GameD\tomcat\work\localhost_8080\_0002fjsp_0002fcolrs_0002ejspcolrs_jsp_0
.java:66: Class colors.ColorGameBean not found.
                    cb= (colors.ColorGameBean)
                               ^
C:\GameD\tomcat\work\localhost_8080\_0002fjsp_0002fcolrs_0002ejspcolrs_jsp_0
.java:71: Class colors.ColorGameBean not found.
                            cb = (colors.ColorGameBean)
Beans.instantiate(this.getClass().getClassLoader(), "colors.ColorGameBean");
                                        ^
3 errors

 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:254)
 at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462)
 at
org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
 at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:152)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:164)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)

I don't know enough about what I'm doing here but I sure appreciate your
guidance.  Thanks in advance.
----- Original Message -----
From: "jang won koh" <jw...@ilstu.edu>
To: <to...@jakarta.apache.org>
Sent: Tuesday, December 19, 2000 1:13 AM
Subject: Re: Getting Tomcat to run / Installation Error Fixes and Testing


>
> These are all the errors I encountered and fixed overnight during Tomcat
> installation. ):-(
>
> 1. Error Message, "Out of environment space:" --> right click on
startup.bat
> and click on property and click memory tab and choose initial environment
> drop-down box and choose 2048 or bigger. It doesn't have to be 2048+ but a
> bigger number has the better chance of working. You can choose property by
> clicking the top left corner of the console window.
>
> For reference, I saw in a website a guy says - To solve the 'Out of
> Environment Space' error you must edit CONFIG.SYS (again, the old MS-DOS
not
> so defunct operating system presence). You must add the following line:
> SHELL=C:\COMMAND.COM /E:8192 /P
> please replace C:\COMMAND.COM to the correct location if you moved
> COMMAND.COM to another location. The "/E:8192" allocates 8k to be used by
> environment variables. The maximum allowed is 32k (35736). The last
> parameter, "/P", is used to make this COMMAND.COM instance resident in
> memory and owner of main environment space (from which every process
> receives a copy).
>
> 2. Error Message, "only DOS 8.3 names may be used in TOMCAT_HOME!"--> You
> are using Windows Explorer folder name find dos name of the folder(=
> directory) using DIR command in DOS console. If you have long dir name in
> windows explorer such as "jakarta-tomcat-3.2.1", it will show up as
jakart~1
> in DOS. Use this 8 character long name.
>
> 2a. Use simple folder(=directory) names for JDK(=J2SDK 1.3) and TOMCAT. I
> used default names "j2sdk1.3" and "jakarta-tomcat-3.2.1" They caused
> conflicts in *.bat files when starting tomcat. Especially DON'T USE "." in
> those folder names. USE 8 characters-long name, or find matching DOS DIR
> name for the windows explorer long folder names. So I uninstalled and
> reinstalled JDK in the folder,"j2sdk" and tomcat in the folder, "tomcat".
>
> 3. Common and Hard-to-find ERROR: Type in SET JAVA_HOME=C:\JDK in the
first
> line after REM lines (REM lines are comment lines so they are ignored in
> execution)in startup.bat file. ***** VERY IMPORTANT NOT TO HAVE SPACES
> before and after "=" *****
>
> 4. Include tomcat\lib\servlet.jar and tomcat\lib\jasper.jar(or
> jspengine.jar or somthing similar) in classpath. For example, add a line
in
> c:\AUTOEXEC.BAT
>
classpath=e:\java\tomcat\lib\jasper.jar;e:\java\tomcat\lib\servlet.jar;%clas
spath%
>
> 5. Testing. run startup.bat. It should show 2 DOS console windows. 2nd DOS
> console window should show date and contextmanager blah blah in several
> lines. This means tomcat is running.
> 6. Testing Servlet. Write and compile a servlet. Move the compile servlet
> class file(let's say HelloWorld.class) to
> tomcat\webapps\root\web-inf\classes. In browser, go to
> URL:http//localhost:8080/servlet/HelloWorld . You can replace localhost
> with 127.0.0.1 or another IP and port number if you know. To test servlets
> in tomcat\webapps\test\web-inf\classes or
> tomcat\webapps\examples\web-inf\classes
> http://localhost:8080/test/servlet/HelloWorld or replace test with
examples.
> 7. Testing JSP. Move a jsp file(let's say test.jsp) to
> tomcat/webapps/root/jsp. I created that folder. Go to
> URL:http://localhost:8080/jsp/test.jsp.
>
>
> At 03:10 PM 12/18/2000 -0600, you wrote:
> >I downloaded Apache and got it to run.  I downloaded Tomcat 3.2.1 build
> >and tried to compile the java files. Got tons of errors. Can anyone point
> >me at a definitive step by step Howto?
> >I did the following (from Tomcat - A Minimalistic User's guide):
> >    * Download the zip/tar.gz/whatever file from
> >
<http://jakarta.apache.org/downloads/binindex.html>http://jakarta.apache.org
/downloads/binindex.html.
> >
> >    * Unzip the file into some directory (say foo). This should create a
> > new subdirectory named "tomcat".
> >    * Change directory to "tomcat" and set a new environment variable
> > (TOMCAT_HOME) to point to the root directory of your Tomcat hierarchy.
> >        * On Win32 you should type:
> >        * "set TOMCAT_HOME=foo\tomcat"
> >        * On UNIX you should type:
> >        * for bash/sh "TOMCAT_HOME=foo/tomcat ; export TOMCAT_HOME"
> >        * for tcsh "setenv TOMCAT_HOME foo/tomcat"
> >    * Set the environment variable JAVA_HOME to point to the root
> > directory of your JDK hierarchy, then add the Java interpreter to your
> > PATH environment variable.
> >That's it! You can now execute Tomcat and it will run as a stand-alone
> >(type 1) servlet container...........BUT that's not IT.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Re: Getting Tomcat to run / Installation Error Fixes and Testing

Posted by jang won koh <jw...@ilstu.edu>.
These are all the errors I encountered and fixed overnight during Tomcat
installation. ):-(

1. Error Message, "Out of environment space:" --> right click on startup.bat
and click on property and click memory tab and choose initial environment
drop-down box and choose 2048 or bigger. It doesn't have to be 2048+ but a
bigger number has the better chance of working. You can choose property by
clicking the top left corner of the console window.

For reference, I saw in a website a guy says - To solve the 'Out of
Environment Space' error you must edit CONFIG.SYS (again, the old MS-DOS not
so defunct operating system presence). You must add the following line:
SHELL=C:\COMMAND.COM /E:8192 /P
please replace C:\COMMAND.COM to the correct location if you moved
COMMAND.COM to another location. The "/E:8192" allocates 8k to be used by
environment variables. The maximum allowed is 32k (35736). The last
parameter, "/P", is used to make this COMMAND.COM instance resident in
memory and owner of main environment space (from which every process
receives a copy).

2. Error Message, "only DOS 8.3 names may be used in TOMCAT_HOME!"--> You
are using Windows Explorer folder name find dos name of the folder(=
directory) using DIR command in DOS console. If you have long dir name in
windows explorer such as "jakarta-tomcat-3.2.1", it will show up as jakart~1
in DOS. Use this 8 character long name.

2a. Use simple folder(=directory) names for JDK(=J2SDK 1.3) and TOMCAT. I
used default names "j2sdk1.3" and "jakarta-tomcat-3.2.1" They caused
conflicts in *.bat files when starting tomcat. Especially DON'T USE "." in
those folder names. USE 8 characters-long name, or find matching DOS DIR
name for the windows explorer long folder names. So I uninstalled and
reinstalled JDK in the folder,"j2sdk" and tomcat in the folder, "tomcat".

3. Common and Hard-to-find ERROR: Type in SET JAVA_HOME=C:\JDK in the first
line after REM lines (REM lines are comment lines so they are ignored in
execution)in startup.bat file. ***** VERY IMPORTANT NOT TO HAVE SPACES
before and after "=" *****

4. Include tomcat\lib\servlet.jar and tomcat\lib\jasper.jar(or 
jspengine.jar or somthing similar) in classpath. For example, add a line in 
c:\AUTOEXEC.BAT 
classpath=e:\java\tomcat\lib\jasper.jar;e:\java\tomcat\lib\servlet.jar;%classpath% 

5. Testing. run startup.bat. It should show 2 DOS console windows. 2nd DOS 
console window should show date and contextmanager blah blah in several 
lines. This means tomcat is running.
6. Testing Servlet. Write and compile a servlet. Move the compile servlet 
class file(let's say HelloWorld.class) to 
tomcat\webapps\root\web-inf\classes. In browser, go to 
URL:http//localhost:8080/servlet/HelloWorld . You can replace localhost 
with 127.0.0.1 or another IP and port number if you know. To test servlets 
in tomcat\webapps\test\web-inf\classes or 
tomcat\webapps\examples\web-inf\classes 
http://localhost:8080/test/servlet/HelloWorld or replace test with examples.
7. Testing JSP. Move a jsp file(let's say test.jsp) to 
tomcat/webapps/root/jsp. I created that folder. Go to 
URL:http://localhost:8080/jsp/test.jsp.


At 03:10 PM 12/18/2000 -0600, you wrote:
>I downloaded Apache and got it to run.  I downloaded Tomcat 3.2.1 build 
>and tried to compile the java files. Got tons of errors. Can anyone point 
>me at a definitive step by step Howto?
>I did the following (from Tomcat - A Minimalistic User's guide):
>    * Download the zip/tar.gz/whatever file from 
> <http://jakarta.apache.org/downloads/binindex.html>http://jakarta.apache.org/downloads/binindex.html. 
>
>    * Unzip the file into some directory (say foo). This should create a 
> new subdirectory named "tomcat".
>    * Change directory to "tomcat" and set a new environment variable 
> (TOMCAT_HOME) to point to the root directory of your Tomcat hierarchy.
>        * On Win32 you should type:
>        * "set TOMCAT_HOME=foo\tomcat"
>        * On UNIX you should type:
>        * for bash/sh "TOMCAT_HOME=foo/tomcat ; export TOMCAT_HOME"
>        * for tcsh "setenv TOMCAT_HOME foo/tomcat"
>    * Set the environment variable JAVA_HOME to point to the root 
> directory of your JDK hierarchy, then add the Java interpreter to your 
> PATH environment variable.
>That's it! You can now execute Tomcat and it will run as a stand-alone 
>(type 1) servlet container...........BUT that's not IT.