You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Sampige, Srinivas" <sr...@boeing.com> on 2002/02/22 01:54:10 UTC
Configuring my own servlets on Tomcat4.0
Hi
I downloaded Tomcat4.0 just now and insalled it. I am able to run the
example servlets. When I try to create my own servlets OR whehn I try to
deploy and run those web apps that were working on the older version
(Tomcat3.2) the new servlets don't run. Any clues? I looked at the
documentation but could not find anything.
thanks
-Srinivas
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: Configuring my own servlets on Tomcat4.0
Posted by H Socks <ha...@yahoo.co.uk>.
I've also just installed Tomcat 4. I had a bit of
trouble at first, but got my servlets working in
the examples directory. Then I moved them to my own
application directory.
Things to look for:
1. I put a "package" statement in each servlet. e.g.
"mywebapp". Make a subdirectory called mywebapp
on the classes directory for your web application.
2. Set up the web.xml file for the application with
entries for each servlet. Since they are in
packages (e.g. package mywebapp;) then they
will be known as mywebapp.MyServlet (for class
from MyServlet.java).
The web.xml file needs lines like these for each
servlet (replace [ ] with lt and gt brackets):
[servlet]
[servlet-name]MyServlet[/servlet-name]
[servlet-class]mywebapp.MyServlet[/servlet-class]
[/servlet]
This then hides the mywebapp subdirectory when the
servlet is called, and the URL will be
http://localhost:8080/app_dir/servletMyServlet
This should work!
Rob
--- Dmitry Nikelshpur <dn...@yahoo.com> wrote: >
Don't know if your problem is same as what happened
> to me, but you may
> want to try this:
> Copy your application files into the examples
> directory. You may need to
> edit the web.xml file accordingly (maybe just for
> one servlet initially).
> See if the servlet is found...If this works then
> just rename the
> examples directory to whatever and voila....
>
> Dmitry
>
> I'll be surprised if this works, but it did the
> trick for me..very wierd
> stuff though.... :-)
>
> Sampige, Srinivas wrote:
>
> >Hi
> > I downloaded Tomcat4.0 just now and insalled it. I
> am able to run the
> >example servlets. When I try to create my own
> servlets OR whehn I try to
> >deploy and run those web apps that were working on
> the older version
> >(Tomcat3.2) the new servlets don't run. Any clues?
> I looked at the
> >documentation but could not find anything.
> >
> >thanks
> >-Srinivas
> >
> >--
> >To unsubscribe:
> <ma...@jakarta.apache.org>
> >For additional commands:
> <ma...@jakarta.apache.org>
> >Troubles with the list:
> <ma...@jakarta.apache.org>
> >
> >
> >
>
>
>
> --
> To unsubscribe:
> <ma...@jakarta.apache.org>
> For additional commands:
> <ma...@jakarta.apache.org>
> Troubles with the list:
> <ma...@jakarta.apache.org>
>
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: Configuring my own servlets on Tomcat4.0
Posted by Dmitry Nikelshpur <dn...@yahoo.com>.
Don't know if your problem is same as what happened to me, but you may
want to try this:
Copy your application files into the examples directory. You may need to
edit the web.xml file accordingly (maybe just for one servlet initially).
See if the servlet is found...If this works then just rename the
examples directory to whatever and voila....
Dmitry
I'll be surprised if this works, but it did the trick for me..very wierd
stuff though.... :-)
Sampige, Srinivas wrote:
>Hi
> I downloaded Tomcat4.0 just now and insalled it. I am able to run the
>example servlets. When I try to create my own servlets OR whehn I try to
>deploy and run those web apps that were working on the older version
>(Tomcat3.2) the new servlets don't run. Any clues? I looked at the
>documentation but could not find anything.
>
>thanks
>-Srinivas
>
>--
>To unsubscribe: <ma...@jakarta.apache.org>
>For additional commands: <ma...@jakarta.apache.org>
>Troubles with the list: <ma...@jakarta.apache.org>
>
>
>
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>