jsr372-experts@javaserverfaces-spec-public.java.net

[jsr372-experts] Re: [jsr372-experts mirror] Re: Url mapping PROVISIONALLY CLOSED

From: arjan tijms <arjan.tijms_at_gmail.com>
Date: Tue, 24 Feb 2015 01:17:12 +0100

Hi,

On Mon, Feb 23, 2015 at 10:27 PM, Edward Burns <edward.burns_at_oracle.com> wrote:
> As Leonardo's proposal is too much, the question is: what can we do in
> the "url mapping" topic for JSF 2.3? If there are no replies, we can
> safely call this closed for 2.3.

What I'd like to see is an extremely simple, barebones "mapping",
that's purely by convention and is essentially the exact same
structure as we have today, but without the extension (extensionless
mapping).

E.g.

WebContent folder
    foo.xhtml
    promotion
        register.xhtml

With extensionless "mapping", you could request:

http://localhost:8080/foo
http://localhost:8080/promotion/register

Just as today you have:

http://localhost:8080/foo.xhtml
http://localhost:8080/promotion/register.xhtml

There's no arbitrary mapping with patterns in xml files or otherwise.
There's just the view and normal Servlet things like
HttpServletRequest's getRequestParameter, getPathInfo, etc, just
without an extension.

I agree this may be disappointing for users who had expected a big
feature with powerful mapping features. Still, I think this relatively
tiny change will bring a lot of the benefits of arbitrary mapping for
a fraction of the cost, while still being 1:1 aligned with the
existing view and folder structure of JSF.

We use this kind of structure in practice for both the OmniFaces
showcase and zeef.com, see e.g.

* http://showcase.omnifaces.org/components/messages
* https://zeef.com/subjects

Kind regards,
Arjan Tijms


>
> Sincerely,
>
> Ed
>
> --
> | edward.burns_at_oracle.com | office: +1 407 458 0017
> | 10 days til DevNexus 2015
> | 20 days til JavaLand 2015
> | 30 days til CONFESS 2015