You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Bill Dudney <bi...@dudney.net> on 2004/11/08 04:36:10 UTC

'normal' files and the JspTilesViewHandlerImpl

Hi All & esp Thomas,

When playing around with the tiles view handler I've run into a 
problem. I have css (resources/styles.css) files that are loaded by 
some of my JSP's. When they are sent through the 
JspTilesViewHandlerImpl the request gets turned into 
resources/styles.tiles. Which of course can't be found. I'm using the 
faces/* mapping. I've not tried the extension (*.jsf) mapping.

I've put in a solution to get the view handler to ignore certain file 
extensions (the list is config driven in the web.xml file). This 
approach works but I' not sure that I like it. I don't like forcing 
another configuration. What do you think of by default only 
transforming .jsp requests (or the extension defined in the extension 
mapping) and then having a configuration option to transform any 
others. Then the default would work for most cases and configuration 
would only be required for the non-typical case.

I was also thinking of trying to find the mapping as is done now then 
if that fails try the original request and see if it succeeds (which 
might also have problems).

Anyway your thoughts on this would be most appreciated. I would also be 
glad to post an issue if this is going to need tracking before it gets 
resolved.

TTFN,

-bd-


Re: 'normal' files and the JspTilesViewHandlerImpl

Posted by Bill Dudney <bi...@dudney.net>.
Hi Thomas,

Thanks, that worked like a champ.

TTFN,

-bd-

On Nov 8, 2004, at 2:26 AM, Thomas Spiegl wrote:

> Hi Bill,
>
> i just fixed JspTilesViewHandlerImpl to meet your needs.
>
> If no isExtensionMapping is found for the request,
> the viewHanlder checks if viewId ends with
> default suffux (config-param javax.faces.DEFAULT_SUFFIX).
> If default_suffix is null ".jsp" will be used.
> If the check returns true, then tiles-support will be used.
> On false, the viewHanlder dispatches to viewId without
> manipulation to it.
>
> Does this work for you?
> HTH, thomas
>> Hi All & esp Thomas,
>>
>> When playing around with the tiles view handler I've run into a
>> problem. I have css (resources/styles.css) files that are loaded by
>> some of my JSP's. When they are sent through the
>> JspTilesViewHandlerImpl the request gets turned into
>> resources/styles.tiles. Which of course can't be found. I'm using the
>> faces/* mapping. I've not tried the extension (*.jsf) mapping.
>>
>> I've put in a solution to get the view handler to ignore certain file
>> extensions (the list is config driven in the web.xml file). This
>> approach works but I' not sure that I like it. I don't like forcing
>> another configuration. What do you think of by default only
>> transforming .jsp requests (or the extension defined in the extension
>> mapping) and then having a configuration option to transform any
>> others. Then the default would work for most cases and configuration
>> would only be required for the non-typical case.
>>
>> I was also thinking of trying to find the mapping as is done now then
>> if that fails try the original request and see if it succeeds (which
>> might also have problems).
>>
>> Anyway your thoughts on this would be most appreciated. I would also 
>> be
>> glad to post an issue if this is going to need tracking before it gets
>> resolved.
>>
>> TTFN,
>>
>> -bd-
>>
>
> -- 
> NEU +++ DSL Komplett von GMX +++ http://www.gmx.net/de/go/dsl
> GMX DSL-Netzanschluss + Tarif zum supergünstigen Komplett-Preis!
>


Re: 'normal' files and the JspTilesViewHandlerImpl

Posted by Thomas Spiegl <ro...@gmx.net>.
Hi Bill,

i just fixed JspTilesViewHandlerImpl to meet your needs.

If no isExtensionMapping is found for the request,
the viewHanlder checks if viewId ends with
default suffux (config-param javax.faces.DEFAULT_SUFFIX).
If default_suffix is null ".jsp" will be used.
If the check returns true, then tiles-support will be used.
On false, the viewHanlder dispatches to viewId without
manipulation to it.

Does this work for you?
HTH, thomas
> Hi All & esp Thomas,
> 
> When playing around with the tiles view handler I've run into a 
> problem. I have css (resources/styles.css) files that are loaded by 
> some of my JSP's. When they are sent through the 
> JspTilesViewHandlerImpl the request gets turned into 
> resources/styles.tiles. Which of course can't be found. I'm using the 
> faces/* mapping. I've not tried the extension (*.jsf) mapping.
> 
> I've put in a solution to get the view handler to ignore certain file 
> extensions (the list is config driven in the web.xml file). This 
> approach works but I' not sure that I like it. I don't like forcing 
> another configuration. What do you think of by default only 
> transforming .jsp requests (or the extension defined in the extension 
> mapping) and then having a configuration option to transform any 
> others. Then the default would work for most cases and configuration 
> would only be required for the non-typical case.
> 
> I was also thinking of trying to find the mapping as is done now then 
> if that fails try the original request and see if it succeeds (which 
> might also have problems).
> 
> Anyway your thoughts on this would be most appreciated. I would also be 
> glad to post an issue if this is going to need tracking before it gets 
> resolved.
> 
> TTFN,
> 
> -bd-
> 

-- 
NEU +++ DSL Komplett von GMX +++ http://www.gmx.net/de/go/dsl
GMX DSL-Netzanschluss + Tarif zum superg�nstigen Komplett-Preis!