Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-5460

Strange a4j resource prefix with url-based servlet mappings



      My web.xml has several servlet mappings.

      <servlet-name>Faces Servlet</servlet-name>
      <servlet-name>Faces Servlet</servlet-name>
      <servlet-name>Faces Servlet</servlet-name>

      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-name>Faces Servlet</servlet-name>

      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.


        Gliffy Diagrams




              • Assignee:
                fabmars Fabien Marsaud
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: