File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes regarding servlet-mapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "regarding servlet-mapping " Watch "regarding servlet-mapping " New topic
Author

regarding servlet-mapping

A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
can the below one is a valid URL mapping inside a <url-pattern> subelement of <servlet-mapping> element
/*.jsp (i.e can we put "/" before '*.jsp')
Sayak Banerjee
Ranch Hand

Joined: Nov 28, 2006
Posts: 292
"/" should not precede *.jsp


Turn on, tune in, drop out.
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
Thanks Sayak but how about this one

*/*
Sayak Banerjee
Ranch Hand

Joined: Nov 28, 2006
Posts: 292
*/* won't work but *.* would.
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
Thanks Sayak..

I am not getting the answer between these 2...mapppings

MyTest/*.jsp

and

MyTest

Which would work..??
Sayak Banerjee
Ranch Hand

Joined: Nov 28, 2006
Posts: 292
None of them would work....however /MyTest is fine

It appears that you really need to study url-mapping in detail....you're too confused...you can refer to the spec....that would help
[ January 08, 2007: Message edited by: Sayak Banerjee ]
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
Sure Sayak..
Bob CHOI
Ranch Hand

Joined: Nov 10, 2006
Posts: 127
three mapping scheme below,

- exact match, beginning with "/", e.g. /abc/efg
- path match, beginning with "/" and ending with *, e.g. /123/456/*
- extension match, simply like *.ext


Hard work rewards
 
 
subject: regarding servlet-mapping