create new web application

Hi,
I want to create a webapplication called 'test' in Tomcat 5.0.28.
I want to deploy a simple servet which says helloworld.
Can anybody give me some tips as to how to create a web application and delpy it?
Anu
anumitAsked:
Who is Participating?
 
ramazanyichCommented:
under $TOMCAT_HOME/webapps sirectory create directory test
Create following directory structure under test:

WEB-INF--
           --lib
           -- classes
         
put web.xml file into test/WEB-INF directory.
copy your servlet class files into test/WEB-INF/classes directory.
make mapping to your servlet in web.xml file.

access you servlet by calling:
http://localhost:8080/test/servletPath

replace servletPath by path which you defined in web.xml
0
 
anumitAuthor Commented:
Hi,
Thanks for your help. I got it working.
I had to lok for syntax of web.xml file on the net.
This is a sample web.xml file.
http://www.hccfl.edu/pollock/AJava/WAR/webXmlSrc.htm
Thanks,
Anu
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.