• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

url-mapping

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have done that also that is also not working
kindly give me some solution
Rishi
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Maybe he went home and went to bed. And took this tiny ad with him:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic