• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Default mapping in DD ?

 
Kanishka Ajwani
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An excerpt from whizlabs explanation:

There are four types of mapping the deployment descriptor:
1)Explicit mapping, e.g., /Hello.html
2)Path prefix mapping, e.g., /ReportServlet/*
3)Extension mapping, e.g., *.html
4)Default mapping, "/" identifies the default servlet for the web application.

Can someone please explain the last point (4) to me? Thanks.
 
Dieter Quickfend
Bartender
Posts: 543
4
Java Netbeans IDE Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you map a servlet to "/", then it means that servlet will basically act as a welcome file to the webapp. So if you put <url-pattern>/</url-pattern> in your web inf, going http://localhost:8080/MyWebApp/ will send you to the servlet with that url-pattern.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic