[richfaces-issues] [JBoss JIRA] Updated: (RF-5460) Strange a4j resource prefix with url-based servlet mappings

Nick Belaevski (JIRA) jira-events at lists.jboss.org
Fri Dec 26 13:53:54 EST 2008


     [ https://jira.jboss.org/jira/browse/RF-5460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Belaevski updated RF-5460:
-------------------------------

    Fix Version/s: Future
         Assignee: Nick Belaevski
         Priority: Minor  (was: Major)


> Strange a4j resource prefix with url-based servlet mappings
> -----------------------------------------------------------
>
>                 Key: RF-5460
>                 URL: https://jira.jboss.org/jira/browse/RF-5460
>             Project: RichFaces
>          Issue Type: Bug
>    Affects Versions: 3.2.2
>         Environment: JSF RI 1.2.11, RF 3.2.2SR1, Facelets 1.1.15b1, Glassfish v2.
>            Reporter: Fab Mars
>            Assignee: Nick Belaevski
>            Priority: Minor
>             Fix For: Future
>
>
> My web.xml has several servlet mappings.
>  <servlet-mapping>
>   <servlet-name>Faces Servlet</servlet-name>
>   <url-pattern>*.jsf</url-pattern>
>  </servlet-mapping>
>  <servlet-mapping>
>   <servlet-name>Faces Servlet</servlet-name>
>   <url-pattern>/somepath1/*</url-pattern>
>  </servlet-mapping>
>  <servlet-mapping>
>   <servlet-name>Faces Servlet</servlet-name>
>   <url-pattern>/somepath999/*</url-pattern>
>  </servlet-mapping>
> I'm doing this because I'm using some phaselistener that preproceses some things and also enables short-urls.
> Now, any page has a4j resources written like this:
> <script type="text/javascript" src="/MyContext/somepath999/a4j/g/3_2_2.SR1org/richfaces/renderkit/html/scripts/skinning.js">
> That is all a4j resources are now comprising the LAST servlet-mapping, just between the context name and the /a4j/ path part.
> I tried to workaround it, by putting the *.jsf mapping as the last in the web.xml but to no avail: the last servlet mapping path was always used.
> To reproduce, just download the demo application: http://download.jboss.com/jboss-richfaces/richfaces-demo-3.2.2.SR1-jee5.war
> Edit web.xml and add to the existing *.jsf mapping the following:
>  <servlet-mapping>
>   <servlet-name>Faces Servlet</servlet-name>
>   <url-pattern>/yeswecan/*</url-pattern>
>  </servlet-mapping>
> Then deploy and look at the source of any page:
> <img class="rich-spacer " height="1" id="j_id258" src="/richfaces/yeswecan/a4j/g/3_2_2.SR1images/spacer.gif" width="1" style="height:10px;" />
> I'm not sure this is a bug or a feature of some sort. The code obviously takes ANY valid servlet mapping, which is fair enough. But maybe it should just check whether there is an extension-based mapping amongst them, and if yes, use it.
> Worse, this issue is also probably (conceptually) linked to https://jira.jboss.org/jira/browse/RF-3586
> Anyway, you're free to requalify this issue if you want. I'm reporting what I found and I'll find a workaround in the meantime.
> Thanks.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the richfaces-issues mailing list