File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes mapping question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "mapping question" Watch "mapping question" New topic
Author

mapping question

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

Hey all.
my questions is about servlet mapping.
what is the difference btw :
<servlet-mapping>/faces/</servlet-mapping> and
<servlet-mapping>/faces/*</servlet-mapping>
thanks.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29220
    
135

John,
The first one only maps to the user typing ".../faces" in the URL or link. You would use the first one if you wanted your servlet to correspond to a very specific URL.

The second one allows the user to type ".../faces/otherStuff". You would use the second one if your servlet was acting as a controller or you wanted to hit all URLs.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mapping question
 
Similar Threads
Switching from Reference Implementation to MyFaces
Servlet mapping
Problems with running JSF in Eclipse 3.1
my first jsf app is giving error, can someone please help me!
JSF Components does not appear on the browser