[ 
https://issues.apache.org/jira/browse/MYFACES-1798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555557#action_12555557
 ] 

Simon Kitching commented on MYFACES-1798:
-----------------------------------------

What about paths like:
    /my.strange.path/faces/welcome

Using just "lastIndexOf" will not return the expected value. Agreed, it is no 
worse than the current solution, but if this is being fixed now, it would be 
nice to fix it properly. How about looking for lastIndexOf("/") and only 
falling into the "extension mapping" case when the last dot is after the last 
slash?

And is it valid to have an extension with two dots, eg ".faces.jsf"? Ideally, 
it would be best to first look up what suffixes we expect, then use "endsWith" 
to determine which one is present on the url..don't know if that is possible or 
not though..

> DefaultViewHandlerSupports fails detecting extension if there are dots in the 
> path
> ----------------------------------------------------------------------------------
>
>                 Key: MYFACES-1798
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1798
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions:  1.2.0
>            Reporter: Mario Ivankovits
>            Assignee: Mario Ivankovits
>             Fix For: 1.2.2-SNAPSHOT
>
>
> For example: With "/myStrange.path/view.jsp" the extension ".path/view.jsp" 
> will be derived.
> In DefaultViewHandlerSupport a wrong regular expression is used to extract 
> the extension.
> I'll try to change this to a simple string.lastIndexOf('.') as this should do 
> exactly what we want.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to