users@glassfish.java.net

Re: [Jersey] Pointing web app welcome-file to Jersey Application causes StringIndexOutOfBoundsException

From: Dominik Dorn <dominik.dorn_at_gmail.com>
Date: Thu, 15 Apr 2010 20:42:44 +0200

hmm... as far as I understand, welcome-files are things that get
resolved if just
a directory is specified, like index.html, index.php, etc. and they are FILES!

so if you have
http://localhost:8080/yourapp/
it will call
http://localhost:8080/yourapp/index.html

if you create a directory test
http://localhost:8080/yourapp/test/
it will call
http://localhost:8080/yourapp/test/index.html

so, while your mapping of webresources/myresource
could theoretically work on
http://localhost:8080/yourapp/
it would fail on
http://localhost:8080/yourapp/test/

I think the way specified in your mail is really misusing the feature and
if it works, its a bug in my opinion.

What you are trying to achieve looks like a case for a url-rewriting filter like
http://ocpsoft.com/prettyfaces/ or http://tuckey.org/urlrewrite

kr,
dominik


-- 
[url=http://www.dominikdorn.com]Dominik Dorn[/url]
Tausche Deine [url=http://www.studyguru.eu] Lernunterlagen auf
http://www.studyguru.eu[/url]!