• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

url-mapping

 
Rishi Yagnik
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I am reading Hanumant Deshmukh for preparing web component devloper exam.......
i have got chapters in cd when i am deploying any web app from chapter say chapter01
i just need to type http://loclahost:8080/chapterxx/servlet/TestServlet
i don't need to specify any package name in url.....
but when i am making my test web application i need to specify in url as follows
http://loclahost:8080/test/servlet/test.TestServlet
how can i avoid that pls do tell me i have tried all the possibilities i have tried servlet-mapping it did not work.....
pls help me
Rishi
 
Subir Mukherjee
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You probably have to place the compiled .java file for the servlet, directly under web-apps/classes, for you to use the url:
http://localhost:8080/servlet/YourServletName.
Ref: Application deployed on a Tomcat 4.0.1 server
Thanks / Subir
 
Rishi Yagnik
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have done that also that is also not working
kindly give me some solution
Rishi
 
mehtasidd
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by rishi, yagnik:
Hello all,
I am reading Hanumant Deshmukh for preparing web component devloper exam.......
i have got chapters in cd when i am deploying any web app from chapter say chapter01
i just need to type http://loclahost:8080/chapterxx/servlet/TestServlet
i don't need to specify any package name in url.....
but when i am making my test web application i need to specify in url as follows
http://loclahost:8080/test/servlet/test.TestServlet
how can i avoid that pls do tell me i have tried all the possibilities i have tried servlet-mapping it did not work.....
pls help me
Rishi

Can u please cut and paste servlet mapping from web.xml
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"methasidd", please review our naming policy and change your display name. Thanks.
- Peter
 
Rishi Yagnik
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
i did not include servlet-mapping in web.xml
it is without mapping...
what i had a doubt when it runs for books examples why didn't work for test web apps.......
Rishi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic