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

[jsr372-experts] Re: 1099-ViewsInDedicatedFolder

From: manfred riem <manfred.riem_at_oracle.com>
Date: Fri, 20 Feb 2015 09:56:02 -0600

Hi all,

Unless there are any other objections voiced before EOB next Friday
(2/27) I am going ahead with this contribution from Arjan (which from a
security aspect is a good thing). Note this one will be behind the 2.3
switch.

Frank, the WEB-INF/views still allows you to do WEB-INF/views/account
which is semantically equivalent to a request to
/account/ from the outside. This change merely makes the default
location not be the web application root, but WEB-INF/views.

Thanks!
Manfred


On 2/4/15, 8:30 AM, arjan tijms wrote:
> Hi,
>
> On Wed, Feb 4, 2015 at 2:57 PM, Frank Caputo<frank_at_frankcaputo.de> wrote:
>> I don’t like the /views folder, because this forces JSF developers to structure their facelets technically. If the developers work domain driven, they usually structure by the domain. E.g. a folder /account will have all facelets belonging to the domain account including the corresponding views.
> I think they can largely still do that, /views just becomes an
> alternative root folder, albeit for top level views only.
>
> So
>
> /views
> /account
> order.xhtml
> /admin
> dashboard.xhtml
>
> etc
>
> This will then correspond to the following URL requests (assuming
> .xhtml to .xhtml mapping):
>
> localhost:8080/account/order.xhtml
> localhost:8080/admin/dashboard.xhtml
>
> It's true that any includes and such that these top level views use
> can best be put in a separate folder ,e.g. WEB-INF/includes (not a
> standard folder, but something the user can choose freely). This is a
> best practice even today, as you don't really want includes being
> directly world readable.
>
> At any length developers will never be forced to use this, it's an
> optional folder. The regular archive root is still there.
>
> Kind regards,
> Arjan Tijms
>
>
>
>
>> Ciao Frank
>>
>>