Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet mapping

 
Peixiao Lin
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to practice an example in HFS but failed. In my deployment environment, I created a directory named ch1 under webapps in tomcat. ch1 has subdirectories of WEB-INF and classes. a DD xml file was put in WEB-INF. A simple compiled servlet class file was put in classes and named Ch1Servlet. but I just can not got the servlet through the xml mapping even I try to get it through "http://localhost:8080/ch1/Ch1Servlet". It looks like the web server didn't go though the DD xml. Any suggestions?
 
Mikalai Zaikin
Ranch Hand
Posts: 3371
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not much info provided, but I try to help....

make sure:

  • Your "DD" as you say has the name web.xml and placed in WEB-INF directory:


  • Your servlet if belongs to default package exists in WEB-INF/classes directory:



  • The deployment descriptor contains following mapping:



  • Do not forget about Servlet Container's log files - they are your friends




  • regards,
    MZ
     
    Mikalai Zaikin
    Ranch Hand
    Posts: 3371
    12
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    ... and if you wish to read more about Servlet mappings, this page may help.

    regards,
    MZ
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic