You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Turner, John" <JT...@AAS.com> on 2002/09/09 20:39:33 UTC

RE: help getting up and running

What are the error messages?  What do the logs say?

John


> -----Original Message-----
> From: Grant C. Peters [mailto:grantcpeters@earthlink.net]
> Sent: Monday, September 09, 2002 2:42 PM
> To: Tomcat Users List; Jacob Kjome
> Subject: help getting up and running
> 
> 
> I have uninstalled my working tomcat 3.2.3 in favor of tomcat 
> 4.1 (so that I
> could upgrade my jdk/jre to 1.4) and it is not loading 
> classes properly, the
> classes in %CATALINA_HOME%\examples\WEB-INF\classes are not 
> found nor are
> the classes in %CATALINA_HOME%\lib or anywhere else they are 
> supposed to be,
> I have set my %CATALINA_HOME%\ env var to the correct 
> location, I am running
> tomcat on win2k pro
> Please help
> thanks
> 
> 
> Grant C. Peters
> grantcpeters@earthlink.net
> phone  : 415.948.7030
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Configuring Tomcat 4.0

Posted by Mauro Daniel Ardolino <ma...@altersoft.com.ar>.
Well.  I think is better to tell you how I did to make a servlet work.
First of all I created a folder under "webapps" (e.g. miFirstServlet).
After that I put a simple html file called index.html inside this folder.

Example of simple index.html:
<html>
<head><title>My first servlet</title></head>
<body>
<h1>This is really my first servlet!</h1>
<a href=http://localhost:8080/miFirstServlet/servlet/miFirstServlet/First>Click here to see the servlet working</a>
</body>
</html>

Explanation of the URL:
/miFirstServlet    :  the name of the application folder
/servlet           :  indicates that is a servlet (see down).
/miFirstServlet    :  name of the package
/First             :  name of the class

Put First.class in webapps/WEB-INF/classes/miFirstServlet/.
(make sure the name of the package of First.class is "miFirstServlet")

The web.xml file is simple an is explained inside the example web.xml
file that you can download at:
http://localhost:8080/tomcat-docs/appdev/deployment.html
Make sure to declare the servlet and his <servlet-class> like this:
...
     <servlet-class>miFirstServlet.First</servlet-class>
...

This file goes here:
webapps/WEB-INF/.

What you are doing is putting an application on Tomcat.  There are
2 ways of doing so:
1) Doing what I have just explained before.
2) Putting a .war instead of the folder webapps/miFirstServlet 
   (e.g. miFirstServlet.war)

I hope this can help you. Bye,

Mauro



On Mon, 9 Sep 2002, srilatha sagar wrote:

> Hi!
> 
> 
> I've copied the .class files
> c:\tomcat4\webapps\ROOT\WEB-INF\classes
> 
> 
> I've include the following lines in autoexec.bat:
> set JAVA_HOME=c:\jdk1.2
> set
> CLASSPATH=.;C:\tomcat4\common\lib\servlet.jar;%CLASSPATH%
> 
> set PATH=%PATH%;%JAVA_HOME%\bin
> 
> I've uncommented the following line in
> c:\tomcat4\conf\server.xml: 
> <Context path="" docBase="ROOT" debug="0"/>
> 
> 
> I did not create the web.xml.If required,where should
> it be created and what should be included in that
> file.
> 
> I've wriiten a simple servlet and not in a package,and
> the URL to access it is:
> (First.class is the servlet)
> 
> http://localhost:8080/First
> 
> 
> Thanks,
> SriLatha.
> 
> 
> 
> --- Mauro Daniel Ardolino <ma...@altersoft.com.ar>
> wrote:
> > Some questions:
> > 
> > Where did you put the files of your applications?
> > (*.class, *.jsp, *.html)
> > Did you create the web.xml file?
> > If so, did you declare your servlet there?
> > How did you write the URL to access your servlet?
> > Is your servlet in a package?
> > 
> > 
> > More information at:
> >
> http://localhost:8080/tomcat-docs/appdev/deployment.html
> > 
> > (notice "localhost:8080" means in your own PC with
> > Tomcat running).
> > 
> > 
> > Mauro
> > 
> > 
> > 
> > On Mon, 9 Sep 2002, srilatha sagar wrote:
> > 
> > > Hi!
> > > I've installed tomcat 4.0 and jdk1.2 on windows 98
> > > machine.The server is installed and i'm able to
> > run
> > > the examples/jsp and examples/servlet files.
> > > 
> > > But when it comes to my own Servlet files,it's
> > giving
> > > the error:HTTP 404,file not found.
> > > 
> > > Please let me know,as how to configure tomcat 4.0
> > on
> > > win98 machine,so as to execute servlets and also
> > where
> > > to set the environment variables,and which system
> > > files to be updated for configuration.
> > > 
> > > Thanks,
> > > SriLatha.
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Yahoo! Finance - Get real-time stock quotes
> > > http://finance.yahoo.com
> > > 
> > > --
> > > To unsubscribe, e-mail:  
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > > 
> > > 
> > 
> > -- 
> > Ing.Mauro Daniel Ardolino
> > Departamento de Desarrollo y Servicios
> > Altersoft
> > Billinghurst 1599 - Piso 9
> > C1425DTE - Capital Federal
> > Tel/Fax: 4821-3376 / 4822-8759
> > mailto: mauro@altersoft.com.ar
> > website: http://www.altersoft.com.ar
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes
> http://finance.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 

-- 
Ing.Mauro Daniel Ardolino
Departamento de Desarrollo y Servicios
Altersoft
Billinghurst 1599 - Piso 9
C1425DTE - Capital Federal
Tel/Fax: 4821-3376 / 4822-8759
mailto: mauro@altersoft.com.ar
website: http://www.altersoft.com.ar


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Configuring Tomcat 4.0

Posted by srilatha sagar <sr...@yahoo.com>.
Hi!


I've copied the .class files
c:\tomcat4\webapps\ROOT\WEB-INF\classes


I've include the following lines in autoexec.bat:
set JAVA_HOME=c:\jdk1.2
set
CLASSPATH=.;C:\tomcat4\common\lib\servlet.jar;%CLASSPATH%

set PATH=%PATH%;%JAVA_HOME%\bin

I've uncommented the following line in
c:\tomcat4\conf\server.xml: 
<Context path="" docBase="ROOT" debug="0"/>


I did not create the web.xml.If required,where should
it be created and what should be included in that
file.

I've wriiten a simple servlet and not in a package,and
the URL to access it is:
(First.class is the servlet)

http://localhost:8080/First


Thanks,
SriLatha.



--- Mauro Daniel Ardolino <ma...@altersoft.com.ar>
wrote:
> Some questions:
> 
> Where did you put the files of your applications?
> (*.class, *.jsp, *.html)
> Did you create the web.xml file?
> If so, did you declare your servlet there?
> How did you write the URL to access your servlet?
> Is your servlet in a package?
> 
> 
> More information at:
>
http://localhost:8080/tomcat-docs/appdev/deployment.html
> 
> (notice "localhost:8080" means in your own PC with
> Tomcat running).
> 
> 
> Mauro
> 
> 
> 
> On Mon, 9 Sep 2002, srilatha sagar wrote:
> 
> > Hi!
> > I've installed tomcat 4.0 and jdk1.2 on windows 98
> > machine.The server is installed and i'm able to
> run
> > the examples/jsp and examples/servlet files.
> > 
> > But when it comes to my own Servlet files,it's
> giving
> > the error:HTTP 404,file not found.
> > 
> > Please let me know,as how to configure tomcat 4.0
> on
> > win98 machine,so as to execute servlets and also
> where
> > to set the environment variables,and which system
> > files to be updated for configuration.
> > 
> > Thanks,
> > SriLatha.
> > 
> > 
> > 
> > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Finance - Get real-time stock quotes
> > http://finance.yahoo.com
> > 
> > --
> > To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> > 
> > 
> 
> -- 
> Ing.Mauro Daniel Ardolino
> Departamento de Desarrollo y Servicios
> Altersoft
> Billinghurst 1599 - Piso 9
> C1425DTE - Capital Federal
> Tel/Fax: 4821-3376 / 4822-8759
> mailto: mauro@altersoft.com.ar
> website: http://www.altersoft.com.ar
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Configuring Tomcat 4.0

Posted by Mauro Daniel Ardolino <ma...@altersoft.com.ar>.
Some questions:

Where did you put the files of your applications? (*.class, *.jsp, *.html)
Did you create the web.xml file?
If so, did you declare your servlet there?
How did you write the URL to access your servlet?
Is your servlet in a package?


More information at:
http://localhost:8080/tomcat-docs/appdev/deployment.html

(notice "localhost:8080" means in your own PC with Tomcat running).


Mauro



On Mon, 9 Sep 2002, srilatha sagar wrote:

> Hi!
> I've installed tomcat 4.0 and jdk1.2 on windows 98
> machine.The server is installed and i'm able to run
> the examples/jsp and examples/servlet files.
> 
> But when it comes to my own Servlet files,it's giving
> the error:HTTP 404,file not found.
> 
> Please let me know,as how to configure tomcat 4.0 on
> win98 machine,so as to execute servlets and also where
> to set the environment variables,and which system
> files to be updated for configuration.
> 
> Thanks,
> SriLatha.
> 
> 
> 
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes
> http://finance.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 

-- 
Ing.Mauro Daniel Ardolino
Departamento de Desarrollo y Servicios
Altersoft
Billinghurst 1599 - Piso 9
C1425DTE - Capital Federal
Tel/Fax: 4821-3376 / 4822-8759
mailto: mauro@altersoft.com.ar
website: http://www.altersoft.com.ar


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Configuring Tomcat 4.0

Posted by srilatha sagar <sr...@yahoo.com>.
Hi!
I've installed tomcat 4.0 and jdk1.2 on windows 98
machine.The server is installed and i'm able to run
the examples/jsp and examples/servlet files.

But when it comes to my own Servlet files,it's giving
the error:HTTP 404,file not found.

Please let me know,as how to configure tomcat 4.0 on
win98 machine,so as to execute servlets and also where
to set the environment variables,and which system
files to be updated for configuration.

Thanks,
SriLatha.






__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: help getting up and running

Posted by "Grant C. Peters" <gr...@earthlink.net>.
It wouldn't compile %CATALINA_HOME%\webapps\ROOT\index.jsp throwing a
NoClassDefFoundError for the class org.apache.naming.JndiPermission
To fix that I placed every .jar in %CATALINA_HOME% in the lib\ext dir of
both my jdk 1.4 install and my jre 1.4 install (according to the tomcat docs
these jars should be found where they were but this was not working) this
fixed the problem and tomcat started serving simple jsps and the example
servlets, but when I tried to use the example jsp it would not compile the
numguess.jsp example saying the the package num did not exist but the source
and compiled class files are in
%CATALINA_HOME%\webapps\examples\WEB-INF\classes

Grant C. Peters
grantcpeters@earthlink.net
phone  : 415.948.7030

-----Original Message-----
From: Turner, John [mailto:JTurner@AAS.com]
Sent: Monday, September 09, 2002 14:40
To: 'Tomcat Users List'
Subject: RE: help getting up and running


What are the error messages?  What do the logs say?

John


> -----Original Message-----
> From: Grant C. Peters [mailto:grantcpeters@earthlink.net]
> Sent: Monday, September 09, 2002 2:42 PM
> To: Tomcat Users List; Jacob Kjome
> Subject: help getting up and running
>
>
> I have uninstalled my working tomcat 3.2.3 in favor of tomcat
> 4.1 (so that I
> could upgrade my jdk/jre to 1.4) and it is not loading
> classes properly, the
> classes in %CATALINA_HOME%\examples\WEB-INF\classes are not
> found nor are
> the classes in %CATALINA_HOME%\lib or anywhere else they are
> supposed to be,
> I have set my %CATALINA_HOME%\ env var to the correct
> location, I am running
> tomcat on win2k pro
> Please help
> thanks
>
>
> Grant C. Peters
> grantcpeters@earthlink.net
> phone  : 415.948.7030
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>