You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Al...@t-systems.com on 2008/06/12 13:24:35 UTC

[Trinidad] tr:inputDate and dialog:xyz results in HTTP404 resource not found

Hi all,

 

we are currently developing a JSF-1.2/Facelets application using
MyFaces-1.2.3, Hibernate-3.2 and Trinidad 1.2.8. Target server is
Tomcat-6.0.16. 

 

We encounter problems both in displaying popup dialogs using the dialog
framework as well as tr:inputDate controls not being displayed. 

 

When enabling LIGHTWEIGHT_DIALOGS popup dialogs are displayed, but no
tr:inputDate control shows up (I have not tested other popup controls
but I am pretty sure, that the problem will be the same). With
LIGHTWEIGHT_DIALOGS being disabled, both popup dialogs and tr:inputDate
launch a separate HTTP 404 browser page ('description  The requested
resource (/IRMAT/__ADFv__) is not available', where IRMAT is the name of
the project/WebApp root folder). This has been tested with
Firefox-2.0.0.14. IE7 though, does not display anything in the latter
case, not even the tr:inputDate control icon is displayed. IE7 instead
has some 'page error' notes instead, but which show no real hint on the
error at all. The HTTP 404 description above shows up for the simple
test page replacing the startup. When running the actual application
then the description turns into 'The requested resource
(/IRMAT/views/%5Bobject%20Window%5D) is not available.' (the pages are
using a template). As the effect is the same for both use cases I
suppose we have a general configuration error or else. I tried several
servlet mappings but nothing helped.

 

Additionally in the server output console window we get a lot of 

13:16:59,734 ERROR DebugUtils:232 - javax.faces.FacesException: Could
not get property facetCount of component j_id2

Maybe that gives someone a clue, I am not sure, if this has something to
do with the problems with the popup windows.

 

This is the code of the simple test page for the tr:inputDate:

 

<body>

<ui:composition>

      <tr:form id="testForm">

            <tr:inputDate id="testDate" label="Date"
value="#{teamBean.date}" />

      </tr:form>

</ui:composition>

</body>

 

This is the code for the popup dialog (Delete-commandLink):

 

<body>

<ui:composition template="/templates/page-template.xhtml">

 

      <ui:define name="title">#{msg['team-edit.title']}</ui:define>

 

      <ui:define name="breadcrumbs">Administration ->
#{teamBean.editMode} Team</ui:define>

 

      <ui:define name="body">

            <tr:messages globalOnly="true" />

 

            <tr:form defaultCommand="buttonSaveTeam"
styleClass="noPrint">

                  <tr:panelHeader text="#{teamBean.editMode} Team" />

 

                  <tr:panelFormLayout>

                        <tr:inputText id="teamNameInput"
label="#{msg['team.name']}"

                             value="#{teamBean.team.name}"
required="true" maximumLength="16">

                        </tr:inputText>

                        <div id="teamNameErr"><h:message
for="teamNameInput" /></div>

 

                  </tr:panelFormLayout>

 

                  <tr:spacer height="10px" />

 

                  <tr:panelButtonBar>

                        <tr:commandButton id="buttonSaveTeam"
styleClass="airbusButton"

                             text="#{teamBean.selectedTeamId == null ?
'Create' : 'Save'}"

                             inlineStyle="width:120px"
action="#{teamBean.saveTeam}">

                        </tr:commandButton>

 

                  </tr:panelButtonBar>

 

            </tr:form>

      </ui:define>

</ui:composition>

</body>

 

Here's our Trinidad config file:

 

<trinidad-config xmlns="http://myfaces.apache.org/trinidad/config">

 

      <client-validation>INLINE</client-validation>

      

      <client-validation>DISABLED</client-validation>

 

      <skin-family>airbus</skin-family>

 

      <!-- Enable debug output here -->

      <debug-output>false</debug-output>

 

      <!-- Improve a4j compatibility -->

      <accessibility-mode>inaccessible</accessibility-mode>

</trinidad-config>

 

 

This is the content of our web.xml:

 

 
<!--####################################################################
#-->

    <!--# Tomcat begin
#-->

 
<!--####################################################################
#-->

    

      <welcome-file-list>

            <welcome-file>test_page.xhtml</welcome-file>

      </welcome-file-list>

 

 
<!--####################################################################
#-->

    <!--# Tomcat end
#-->

 
<!--####################################################################
#-->

    

 

 
<!--####################################################################
#-->

    <!--# JSF begin
#-->

 
<!--####################################################################
#-->

 

    <!-- Faces Servlet implementation -->

    <servlet>

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

        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

        <load-on-startup>1</load-on-startup>

    </servlet>

 

    <!-- Faces Servlet Mapping -->

    <servlet-mapping>

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

        <url-pattern>/faces/*</url-pattern>

        <url-pattern>*.xhtml</url-pattern>

    </servlet-mapping>

    

    <!-- default faces pages suffix -->

    <context-param>

        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>

        <param-value>.xhtml</param-value>

    </context-param>

 

    <!-- JSF parameters -->

    <context-param>

        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

        <param-value>client</param-value>

    </context-param>

    

    <!-- Optional JSF-RI Parameters to Help Debug -->

    <context-param>

        <param-name>com.sun.faces.validateXml</param-name>

        <param-value>true</param-value>

    </context-param>

 

     <context-param>

        <param-name>com.sun.faces.verifyObjects</param-name>

        <param-value>true</param-value>

    </context-param>

 

 
<!--####################################################################
#-->

    <!--# JSF end
#-->

 
<!--####################################################################
#-->

 

 

 
<!--####################################################################
#-->

    <!--# Facelets (xhtml) begin
#-->

 
<!--####################################################################
#-->

    

    <!-- Facelets development mode (@todo disable in production) -->

    <context-param>

        <param-name>facelets.DEVELOPMENT</param-name>

        <param-value>true</param-value>

    </context-param>

 

    <!-- Skip comments in facelets xhtml files -->

    <context-param>

        <param-name>facelets.SKIP_COMMENTS</param-name>

        <param-value>true</param-value>

    </context-param>

 

 
<!--####################################################################
#-->

    <!--# Facelets (xhtml) end
#-->

 
<!--####################################################################
#-->

    

 

 
<!--####################################################################
#-->

    <!--# MyFaces JSF implementation begin
#-->

 
<!--####################################################################
#-->

    

    <!-- MyFaces Servlet -->

    <listener>

 
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener<
/listener-class>

    </listener>

 

    <session-config>

        <session-timeout>120</session-timeout>

    </session-config>

 

 
<!--####################################################################
#-->

    <!--# MyFaces JSF implementation end
#-->

 
<!--####################################################################
#-->

    

 

 
<!--####################################################################
#-->

    <!--# Trinidad begin
#-->

 
<!--####################################################################
#-->

    

    <!-- Trinidad Filter -->

    <filter>

        <filter-name>Trinidad</filter-name>

 
<filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-
class>

    </filter>

 

    <!-- Trinidad Filter mapping -->

    <filter-mapping>

        <filter-name>Trinidad</filter-name>

        <servlet-name>/faces/*</servlet-name>

    </filter-mapping>

 

    <servlet>

        <servlet-name>Trinidad Resources</servlet-name>

 
<servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servl
et-class>

    </servlet>

 

    <servlet-mapping>

        <servlet-name>Trinidad Resources</servlet-name>

        <url-pattern>/ADF/*</url-pattern>

    </servlet-mapping>

 

    <!-- Trinidad - as suggested by a4j-trinidad example-->

    <context-param>

 
<param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-na
me>

        <param-value>com.sun.facelets.FaceletViewHandler</param-value>

    </context-param>

 

    <!-- Trinidad by default uses an optimized client-side state saving

          mechanism. To disable that, change the value from 'token' to
'all' -->

    <context-param>

 
<param-name>org.apache.myfaces.trinidad.CLIENT_STATE_METHOD</param-name>

        <param-value>token</param-value>

    </context-param>

 

    <!-- For debugging, e.g. use more meaningful CSS style names -->

    <!-- @todo re-enable before production -->

    <context-param>

 
<param-name>org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION</par
am-name>

        <param-value>false</param-value>

    </context-param>

    

    <!-- iFrame-style dialogs rather than own popup -->

    <context-param>

 
<param-name>org.apache.myfaces.trinidad.ENABLE_LIGHTWEIGHT_DIALOGS</para
m-name>

        <param-value>false</param-value>

    </context-param>

 

    <!-- @todo re-enable before production -->

    <!-- 

    <context-param>

 
<param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-n
ame>

        <param-value>true</param-value>

    </context-param>

    -->

    

    <context-param>

 
<param-name>org.apache.myfaces.trinidad.CACHE_VIEW_ROOT</param-name>

        <param-value>false</param-value>

    </context-param>

 

 
<!--####################################################################
#-->

    <!--# Trinidad end
#-->

 
<!--####################################################################
#-->

    

    

 
<!--####################################################################
#-->

    <!--# other begin
#-->

 
<!--####################################################################
#-->

    

    <env-entry>

        <env-entry-name>Version</env-entry-name>

        <env-entry-type>java.lang.String</env-entry-type>

        <env-entry-value>1.0.0</env-entry-value>

    </env-entry>

 

 
<!--####################################################################
#-->

    <!--# other end
#-->

 
<!--####################################################################
#-->

 

In the server startup console output there are two lines, which seem
suspicious to me:

11:55:03,640 DEBUG WebXml:138 - adding mapping for servlet + Faces
Servlet urlpattern = *.xhtml

==>     We have set the urlpattern to /faces/* as well, why is it not
mentioned?

==>      

11:55:03,640 DEBUG WebXml:144 - ignoring servlet + Trinidad Resources
class org.apache.myfaces.trinidad.webapp.ResourceServlet (no
FacesServlet)

-          Does that mean, the servlet is not started?

 

Our faces config:

 

<faces-config>

      <application>

            <message-bundle>messageBundle</message-bundle>

 

            <default-render-kit-id>

                  org.apache.myfaces.trinidad.core

            </default-render-kit-id>

 

            <locale-config>

                  <supported-locale>en</supported-locale>

            </locale-config>

 

            <locale-config>

                  <default-locale>en</default-locale>

            </locale-config>

      </application>

 

            ... (managed beans, navigation rules)...

</faces-config>

 

I have copied the dialog code from another JSF-1.1 project using
MyFaces-1.1.5 and Trinidad-1.0.8 where everything just worked fine. The
config files are nearly the same, so I have really no clue, what's the
point. Any clues anybody?

 

TIA,

Alexander Pohl


Re: [Trinidad] tr:inputDate and dialog:xyz results in HTTP404 resource not found

Posted by Matthias Wessendorf <ma...@apache.org>.
Hi Alexander,

just a quick note, since nobody yet responded.

I just tested the following setting:
-jetty6x
-trinidad1.2.9
-myfaces-123
-JSPX
-w/ and w/o lightweight dialogs.

=> inputDate worked fine for me (just did a quick run of our little
demo app....)

But... it doesn't use Facelets... so... I am not really sure if that
did a kinda side effect on your
settings...

-Matthias


On Thu, Jun 12, 2008 at 4:24 AM,  <Al...@t-systems.com> wrote:
> Hi all,
>
>
>
> we are currently developing a JSF-1.2/Facelets application using
> MyFaces-1.2.3, Hibernate-3.2 and Trinidad 1.2.8. Target server is
> Tomcat-6.0.16.
>
>
>
> We encounter problems both in displaying popup dialogs using the dialog
> framework as well as tr:inputDate controls not being displayed.
>
>
>
> When enabling LIGHTWEIGHT_DIALOGS popup dialogs are displayed, but no
> tr:inputDate control shows up (I have not tested other popup controls but I
> am pretty sure, that the problem will be the same). With LIGHTWEIGHT_DIALOGS
> being disabled, both popup dialogs and tr:inputDate launch a separate HTTP
> 404 browser page ('description  The requested resource (/IRMAT/__ADFv__) is
> not available', where IRMAT is the name of the project/WebApp root folder).
> This has been tested with Firefox-2.0.0.14. IE7 though, does not display
> anything in the latter case, not even the tr:inputDate control icon is
> displayed. IE7 instead has some 'page error' notes instead, but which show
> no real hint on the error at all. The HTTP 404 description above shows up
> for the simple test page replacing the startup. When running the actual
> application then the description turns into 'The requested resource
> (/IRMAT/views/%5Bobject%20Window%5D) is not available.' (the pages are using
> a template). As the effect is the same for both use cases I suppose we have
> a general configuration error or else. I tried several servlet mappings but
> nothing helped.
>
>
>
> Additionally in the server output console window we get a lot of
>
> 13:16:59,734 ERROR DebugUtils:232 - javax.faces.FacesException: Could not
> get property facetCount of component j_id2
>
> Maybe that gives someone a clue, I am not sure, if this has something to do
> with the problems with the popup windows.
>
>
>
> This is the code of the simple test page for the tr:inputDate:
>
>
>
> <body>
>
> <ui:composition>
>
>       <tr:form id="testForm">
>
>             <tr:inputDate id="testDate" label="Date"
> value="#{teamBean.date}" />
>
>       </tr:form>
>
> </ui:composition>
>
> </body>
>
>
>
> This is the code for the popup dialog (Delete-commandLink):
>
>
>
> <body>
>
> <ui:composition template="/templates/page-template.xhtml">
>
>
>
>       <ui:define name="title">#{msg['team-edit.title']}</ui:define>
>
>
>
>       <ui:define name="breadcrumbs">Administration -> #{teamBean.editMode}
> Team</ui:define>
>
>
>
>       <ui:define name="body">
>
>             <tr:messages globalOnly="true" />
>
>
>
>             <tr:form defaultCommand="buttonSaveTeam" styleClass="noPrint">
>
>                   <tr:panelHeader text="#{teamBean.editMode} Team" />
>
>
>
>                   <tr:panelFormLayout>
>
>                         <tr:inputText id="teamNameInput"
> label="#{msg['team.name']}"
>
>                              value="#{teamBean.team.name}" required="true"
> maximumLength="16">
>
>                         </tr:inputText>
>
>                         <div id="teamNameErr"><h:message for="teamNameInput"
> /></div>
>
>
>
>                   </tr:panelFormLayout>
>
>
>
>                   <tr:spacer height="10px" />
>
>
>
>                   <tr:panelButtonBar>
>
>                         <tr:commandButton id="buttonSaveTeam"
> styleClass="airbusButton"
>
>                              text="#{teamBean.selectedTeamId == null ?
> 'Create' : 'Save'}"
>
>                              inlineStyle="width:120px"
> action="#{teamBean.saveTeam}">
>
>                         </tr:commandButton>
>
>
>
>                   </tr:panelButtonBar>
>
>
>
>             </tr:form>
>
>       </ui:define>
>
> </ui:composition>
>
> </body>
>
>
>
> Here's our Trinidad config file:
>
>
>
> <trinidad-config xmlns="http://myfaces.apache.org/trinidad/config">
>
>
>
>       <client-validation>INLINE</client-validation>
>
>
>
>       <client-validation>DISABLED</client-validation>
>
>
>
>       <skin-family>airbus</skin-family>
>
>
>
>       <!-- Enable debug output here -->
>
>       <debug-output>false</debug-output>
>
>
>
>       <!-- Improve a4j compatibility -->
>
>       <accessibility-mode>inaccessible</accessibility-mode>
>
> </trinidad-config>
>
>
>
>
>
> This is the content of our web.xml:
>
>
>
>
> <!--#####################################################################-->
>
>     <!--# Tomcat begin
> #-->
>
>
> <!--#####################################################################-->
>
>
>
>       <welcome-file-list>
>
>             <welcome-file>test_page.xhtml</welcome-file>
>
>       </welcome-file-list>
>
>
>
>
> <!--#####################################################################-->
>
>     <!--# Tomcat end
>        #-->
>
>
> <!--#####################################################################-->
>
>
>
>
>
>
> <!--#####################################################################-->
>
>     <!--# JSF begin
> #-->
>
>
> <!--#####################################################################-->
>
>
>
>     <!-- Faces Servlet implementation -->
>
>     <servlet>
>
>         <servlet-name>Faces Servlet</servlet-name>
>
>         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>
>         <load-on-startup>1</load-on-startup>
>
>     </servlet>
>
>
>
>     <!-- Faces Servlet Mapping -->
>
>     <servlet-mapping>
>
>         <servlet-name>Faces Servlet</servlet-name>
>
>         <url-pattern>/faces/*</url-pattern>
>
>         <url-pattern>*.xhtml</url-pattern>
>
>     </servlet-mapping>
>
>
>
>     <!-- default faces pages suffix -->
>
>     <context-param>
>
>         <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
>
>         <param-value>.xhtml</param-value>
>
>     </context-param>
>
>
>
>     <!-- JSF parameters -->
>
>     <context-param>
>
>         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>
>         <param-value>client</param-value>
>
>     </context-param>
>
>
>
>     <!-- Optional JSF-RI Parameters to Help Debug -->
>
>     <context-param>
>
>         <param-name>com.sun.faces.validateXml</param-name>
>
>         <param-value>true</param-value>
>
>     </context-param>
>
>
>
>      <context-param>
>
>         <param-name>com.sun.faces.verifyObjects</param-name>
>
>         <param-value>true</param-value>
>
>     </context-param>
>
>
>
>
> <!--#####################################################################-->
>
>     <!--# JSF end
> #-->
>
>
> <!--#####################################################################-->
>
>
>
>
>
>
> <!--#####################################################################-->
>
>     <!--# Facelets (xhtml) begin
> #--
>
> ...
>
> [Message clipped]



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org