myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Eisenträger (JIRA) <>
Subject [jira] Created: (TRINIDAD-1804) Resources not found(404) errors
Date Tue, 04 May 2010 11:12:56 GMT
Resources not found(404) errors 

                 Key: TRINIDAD-1804
             Project: MyFaces Trinidad
          Issue Type: Bug
    Affects Versions: 1.2.13-core 
            Reporter: Tobias Eisenträger

The error I got was when clicking the calendar icon and expecting a cal popup. Instead I got:
"description The requested resource (.../__ADFv__.jsp) is not available."

As it potentially affects a lot of other components beyond this trinidad one, I marked it
major as these components just don't work anymore.
E.g. MF mailing list with topic "RE: [Trinidad] HTTP 404 (file not found) while using DialogFramework"
points that out.

We first thought that this was a bug in Myfaces core, but Leonardo Uribe confirmed that it
is a Trinidad issue, here is his last comment from bug MYFACES-1794(more info in this jira)
Leonardo Uribe added a comment - 04/May/10 06:57 AM
Thanks for the test. That's the spirit! ;-)

The error is on trinidad, not in myfaces. I tried the test with ri 1.2_14 and it fails too.

In trinidad there is a class called org.apache.myfaces.trinidadinternal.renderkit.core.pages.GenericEntry
. This one has a method called getGenericEntryPath that has this code:

  static public String getGenericEntryPath(FacesContext context)
    String url = context.getApplication().getViewHandler().
      getActionURL(context, _GENERIC_ENTRY_VIEW_ID);

    return url;

  static private final String _GENERIC_ENTRY_VIEW_ID = "/__ADFv__";

It delegates to the default view handler, Both trinidad and facelets does not override this
method, so in myfaces this is handled by JspViewHandlerImpl.

JSF 1.2 rev A spec section 7.5.2 Default ViewHandler Implementation says the following about

"....The getActionURL() method must fulfill the following responsibilities:
■ If the specified viewId does not start with a "/", throw
■ If prefix mapping (such as "/faces/*") is used for FacesServlet, prepend the context
path of the current application, and the specified prefix, to the specified viewId and return
the completed value. For example "/cardemo/faces/chooseLocale.jsp".
■ If suffix mapping (such as "*.faces") is used for FacesServlet, and the specified
viewId ends with the specified suffix, replacing the suffix with the value specified by the
context initialization parameter named by the symbolic constant
ViewHandler.DEFAULT_SUFFIX_NAME (if no such context initialization parameter
is present, use the value of the symbolic constant ViewHandler.DEFAULT_SUFFIX as the
replacement suffix), prefix this value with the context path for the current web
application, and return the result. For example "/cardemo/chooseLocale.faces" ....."

Trinidad does not append the default suffix to the constant, so when extension mapping is
used the algorithm of the spec does not replace the expected suffix, just append the constant
to the url, causing the 404 error.

The wrong link is rendered like this:


and it should be rendered like this:


Could you open an issue on trinidad issue tracker and reference this issue, so someone in
trinidad could commit the solution proposed? 

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

View raw message