2:03 AM
To: Tomcat Users List
Subject: RE: How to install a simple servlet in Tomcat?
> Unless you're tasked with development or maintenance of an old
> application environment, I'd suggest moving up to the current 5.5.x
> version of Tomcat.
I should turn a java program into a
> Unless you're tasked with development or maintenance of an old
> application environment, I'd suggest moving up to the current 5.5.x
> version of Tomcat.
I should turn a java program into a servlet and run it in Tomcat. The idea is
this repeatedly called java program would work more efficie
From: Daniel Guggi
> Basically you have to set up a context for your webapp.
Which context is actually used by the default examples?
Ok, I think..., when I move my class file to the directory where I find the
examples:
"C:\Program Files\Apache Group\Tomcat 4.1\webapps\examples\WEB-INF\classe
One addition, my version of Tomcat is 4.1
I read somewhere that the default way to install a servlet is changed, from 3.x
to 4.x, at least I think that is what was said, so the Tomcat version probably
matters in this question.
Marc
You must put the class in a .jar itself located in the WEB-INF/lib
folder of a .war or you must put the class in WEB-INF/classes of a .war
You must also setup your servlet un WEB-INF/web.xml
Then you must deploy you .war in tomcat (the easiest way is to use the
manager: http://tomcat.apache.org/to
To display a servlet, open your browser, and in address bar type in
%TOMCAT_HOME%(the path to your Tomcat installation)/webapps/myapp (the name of
the
dir where your app is located)/servlet/HelloIZ, and lo an behold, your servlet
should pop up!
Jimmy
Take a look at the servlet specification.
Basically you have to set up a context for your webapp. The web.xml file
describes your web-app. This means that you define your servlets and the
servlet-mapping (which urls will be mapped to which servlet) in web.xml
you could use something like this for
> From: Marc Wentink [mailto:[EMAIL PROTECTED]
> Subject: RE: How to install a simple servlet in Tomcat?
>
> One addition, my version of Tomcat is 4.1
Unless you're tasked with development or maintenance of an old
application environment, I'd suggest moving up to the cu