You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Jorge Vásquez <jv...@3eyegroup.com> on 2006/07/26 20:07:37 UTC

Navigation problems with FACELETS

Greetings to all,

Alter having many problems with JSP+JSF I decided to give it a try with
Facelets.  Everything started fine, my login page appeared on screen and I
was starting to get excited but unfortunately in our profession excitement
doesn´t lasts much and I am getting problems with navigation where I get no
message at all, no log, etc.  I followed the application in debug mode and
after clicking the submit button it went to the corresponding action method
in the managed bean and reached the end and returned the respective String
which in the faces-config is mapped to another page but nothing happens and
the same page is reloaded with no message at all.  Here I confess that I am
completely lost, how can I debug this?  Has anyone had a similar problem
with MyFaces+Facelets?  

Regards,

JV


RE: Navigation problems with FACELETS

Posted by Adam Brod <AB...@intralinks.com>.
Jorge-

In general, it is better to use a *.faces mapping instead of *.xhtml.  So 
all links from the browser would be to http://yourhost/index.faces.  I 
have modified your code and included it below in red.

</context-param>
 <filter>
  <filter-name>extensionsFilter</filter-name>
  <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</
filter-class>
  <init-param>
   <param-name>uploadMaxFileSize</param-name>
   <param-value>100m</param-value>
  </init-param>
  <init-param>
   <param-name>uploadThresholdSize</param-name>
   <param-value>100k</param-value>
  </init-param>
 </filter>
<filter-mapping>
  <filter-name>extensionsFilter</filter-name>
  <!-- associate the extensionsFilter to any request handled by the Faces 
Servlet -->
  <servlet-name>Faces Servlet</servlet-name>
 </filter-mapping>
<servlet>
  <servlet-name>Faces Servlet</servlet-name>
  <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
  <load-on-startup>1</load-on-startup>
 </servlet>
 <servlet-mapping>
  <servlet-name>Faces Servlet</servlet-name>
  <!-- The Faces Servlet will process any request ending with .faces -->
  <url-pattern>*.faces</url-pattern>
 </servlet-mapping>
 
And in the index.html which loads as startup page I also changed it 
respectively to invoke logon.xhml
 
<html>
<header>
<!-- now that we modified the Faces Servlet to look for *.faces, all 
browser requests should go to .faces-->
<meta http-equiv="Refresh" content="0;url=pages/logon.faces">
</header>
</html>

One other thing to note, inside your faces-config.xml you should still 
reference the file names with logon.xhtml or logon.jsp - you don't want to 
reference logon.faces in your faces-config.xml.

I hope this is clear.  This is generally the recommended setup.  Here is 
another explaination: 
http://myfaces.apache.org/tomahawk/extensionsFilter.html, but they use the 
*.jsf extension instead of *.faces.  *.faces is probably a better choice.

Adam Brod
Product Development Team


Jorge Vásquez <jv...@3eyegroup.com> 
07/26/2006 04:51 PM
Please respond to
"MyFaces Discussion" <us...@myfaces.apache.org>


To
"'MyFaces Discussion'" <us...@myfaces.apache.org>
cc

Subject
RE: Navigation problems with FACELETS






Thanks Andrew so much!!!!  
I finally was able to find the error, it was related to the web.xml.  I 
changed the following: (to reflect the new .xhtml extension) in order for 
the filters and servlet mappings to operate accordingly on each page:
 
</context-param>
 <filter>
  <filter-name>extensionsFilter</filter-name>
  <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</
filter-class>
  <init-param>
   <param-name>uploadMaxFileSize</param-name>
   <param-value>100m</param-value>
  </init-param>
  <init-param>
   <param-name>uploadThresholdSize</param-name>
   <param-value>100k</param-value>
  </init-param>
 </filter>
<filter-mapping>
  <filter-name>extensionsFilter</filter-name>
  <url-pattern>*.xhtml</url-pattern>
 </filter-mapping>
<servlet>
  <servlet-name>Faces Servlet</servlet-name>
  <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
  <load-on-startup>1</load-on-startup>
 </servlet>
 <servlet-mapping>
  <servlet-name>Faces Servlet</servlet-name>
  <url-pattern>*.xhtml</url-pattern>
 </servlet-mapping>
 
And in the index.html which loads as startup page I also changed it 
respectively to invoke logon.xhml
 
<html>
<header>
<meta http-equiv="Refresh" content="0;url=pages/logon.xhtml">
</header>
</html>
 
Again thanks a lot for those valuable debugging tips and for your interest 
in helping.
 
Best regards,
JV
 
 

De: Andrew Robinson [mailto:andrew.rw.robinson@gmail.com] 
Enviado el: miércoles, 26 de julio de 2006 15:30
Para: MyFaces Discussion
Asunto: Re: Navigation problems with FACELETS
 
Add debugging output from the navigation handler to your log4j.xml

Example taken from a JBoss log4j.xml:

   <category name="org.apache.myfaces.application.NavigationHandlerImpl">
     <priority value="TRACE" class=" org.jboss.logging.XLevel"/>
   </category>

This will print out all matches and tell you if it couldn't find a result 
or not:
2006-07-25 11:49:30,989 DEBUG [NavigationHandlerImpl] handleNavigation 
fromAction=#{ bean.action} outcome=yourOutcome no matching navigation-case 
found, staying on current ViewRoot

or:

2006-07-25 11:48:54,393 DEBUG [NavigationHandlerImpl] handleNavigation 
fromAction=#{bean.action} outcome=yourOutcome toViewId =/view.xhtml 
redirect=true 


On 7/26/06, Jorge Vásquez <jv...@3eyegroup.com> wrote:
Hi Adam,
Thanks for your kind welcome to Facelets and your valuable help.
I currently have the messages in my page as follows:
 
< h:messages errorClass = "errorMessage" globalOnly = "false" showDetail = 
"true" lang = "en" /> 
 
There´s one important note and is that the action method is getting 
executed and as I remember the validation and conversion phases happen 
before so I guess that my problem is directly related with navigation or 
probably library stuff.
 
I also have the following lines in my web.xml:
 
< context-param >
  < param-name > javax.faces.DEFAULT_SUFFIX </ param-name >
  < param-value > .xhtml </ param-value >
  </ context-param >
?.
< context-param >
  < param-name > facelets.DEVELOPMENT </ param-name >
  < param-value > true </ param-value >
  </ context-param >
?
< 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 >
 
I have carefully followed all the guidelines suggested in the developer 
documentation.
 
My faces-config.xml rule is as follows:
 
< navigation-rule >
  < from-view-id > /pages/logon.xhtml </ from-view-id >
  < navigation-case >
   < from-outcome > alero.altSearch </ from-outcome >
   < to-view-id > /pages/tools/search/mainSearch_TRIAL.xhtml </ to-view-id 
>
  </ navigation-case >
  </ navigation-rule >
  < navigation-rule >
 
I am 100% sure that the action of the managed bean is getting executed, I 
followed it until the last line and it returns the String:  " 
alero.altSearch".  And it returns back to the login.xhtml.  By the way, 
all my files have the extension:  "*.xhtml" accordingly.  Something to 
note is that at first I was getting an exception related to some factory 
stuff, which I googled and found that it was related to the el-ri.jar 
library not being compatible with jdk1.4 and from a mailing list I saw 
that someone had solved a similar problem by getting Exadel´s 
corresponding library, and after using it the login page finally appeared 
but now I have this problem with the navigation. 
As you see I am feeling kind of blind here, do you have any ideas as to 
how to debug it? 
 
In case it helps this is my environment:
 
TOMCAT_VERSION:   5.0 (The one embedded with Exadel Studio PRO 3.5.1)
 
JDK:  j2sdk1.4.2_12
 
LIBRARIES:
-myfaces-api-1.1.4-SNAPSHOT.jar
-myfaces-impl-1.1.4-SNAPSHOT.jar
-commons-beanutils-1.7.0.jar
-commons-codec-1.3.jar
-commons-collections-3.1.jar
-commons-digester-1.6.jar
-commons-el-1.0.jar
-commons-fileupload-1.1.1.jar
-commons-lang-2.1.jar
-commons-logging-1.0.4.jar
-el-api.jar
-el-ri.jar
-jsf-facelets.jar
-log4j-1.2.13.jar
-tomahawk-1.1.5-SNAPSHOT.jar
-portlet.jar
-alerolib.jar
-ajaxanywhere-1.2-RC2.jar
 
 
Regards,
JV
 
 
 
 
 
 
 

De: Adam Brod [mailto:ABrod@intralinks.com] 
Enviado el: miércoles, 26 de julio de 2006 13:18
Para: MyFaces Discussion
Asunto: Re: Navigation problems with FACELETS
 

Hi Jorge- 

Welcome to Facelets!  I'm sure that we'll be able to get you through your 
current issue. 

First, I would make sure that you have < h:messages showDetail= "true" /> 
defined on your login page.  There might be a validation/model update 
problem that isn't being displayed. 

Secondly, I would make sure that you have the facelets.DEVELOPMENT 
parameter defined in your web.xml: 
<context-param > 
    <param-name>facelets.DEVELOPMENT </param-name> 
    <param-value>true </param-value> 
  </context-param> 

Often that will ensure you get a good error message. 

If those don't work, are you sure your action method is being invoked? 
Perhaps you could send the details of your login page so we can ensure 
that everything looks okay. 

I hope that helps.

Adam Brod
Product Development Team

Jorge Vásquez <jv...@3eyegroup.com> 
07/26/2006 02:07 PM 


Please respond to
"MyFaces Discussion" <users@myfaces.apache.org >



To
< users@myfaces.apache.org> 
cc
 
Subject
Navigation problems with FACELETS
 


 
 




Greetings to all, 
Alter having many problems with JSP+JSF I decided to give it a try with 
Facelets.  Everything started fine, my login page appeared on screen and I 
was starting to get excited but unfortunately in our profession excitement 
doesn´t lasts much and I am getting problems with navigation where I get 
no message at all, no log, etc.  I followed the application in debug mode 
and after clicking the submit button it went to the corresponding action 
method in the managed bean and reached the end and returned the respective 
String which in the faces-config is mapped to another page but nothing 
happens and the same page is reloaded with no message at all.  Here I 
confess that I am completely lost, how can I debug this?  Has anyone had a 
similar problem with MyFaces+Facelets? 
Regards, 
JV 
Disclaimer: This electronic mail and any attachments are confidential and 
may be privileged. If you are not the intended recipient, please notify 
the sender immediately by replying to this email, and destroy all copies 
of this email and any attachments. Thank you.
 
Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.


RE: Navigation problems with FACELETS

Posted by Jorge Vásquez <jv...@3eyegroup.com>.
Thanks Andrew so much!!!!  

I finally was able to find the error, it was related to the web.xml.  I
changed the following: (to reflect the new .xhtml extension) in order for
the filters and servlet mappings to operate accordingly on each page:

 

</context-param>

 <filter>

  <filter-name>extensionsFilter</filter-name>

 
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filte
r-class>

  <init-param>

   <param-name>uploadMaxFileSize</param-name>

   <param-value>100m</param-value>

  </init-param>

  <init-param>

   <param-name>uploadThresholdSize</param-name>

   <param-value>100k</param-value>

  </init-param>

 </filter>

<filter-mapping>

  <filter-name>extensionsFilter</filter-name>

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

 </filter-mapping>

<servlet>

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

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

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

 </servlet>

 <servlet-mapping>

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

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

 </servlet-mapping>

 

And in the index.html which loads as startup page I also changed it
respectively to invoke logon.xhml

 

<html>

<header>

<meta http-equiv="Refresh" content="0;url=pages/logon.xhtml">

</header>

</html>

 

Again thanks a lot for those valuable debugging tips and for your interest
in helping.

 

Best regards,

JV

 

 

  _____  

De: Andrew Robinson [mailto:andrew.rw.robinson@gmail.com] 
Enviado el: miércoles, 26 de julio de 2006 15:30
Para: MyFaces Discussion
Asunto: Re: Navigation problems with FACELETS

 

Add debugging output from the navigation handler to your log4j.xml

Example taken from a JBoss log4j.xml:

   <category name="org.apache.myfaces.application.NavigationHandlerImpl">
     <priority value="TRACE" class=" org.jboss.logging.XLevel"/>
   </category>

This will print out all matches and tell you if it couldn't find a result or
not:
2006-07-25 11:49:30,989 DEBUG [NavigationHandlerImpl] handleNavigation
fromAction=#{ bean.action} outcome=yourOutcome no matching navigation-case
found, staying on current ViewRoot

or:

2006-07-25 11:48:54,393 DEBUG [NavigationHandlerImpl] handleNavigation
fromAction=#{bean.action} outcome=yourOutcome toViewId =/view.xhtml
redirect=true 




On 7/26/06, Jorge Vásquez <jv...@3eyegroup.com> wrote:

Hi Adam,

Thanks for your kind welcome to Facelets and your valuable help.

I currently have the messages in my page as follows:

 

< h:messages errorClass = "errorMessage" globalOnly = "false" showDetail =
"true" lang = "en" /> 

 

There´s one important note and is that the action method is getting executed
and as I remember the validation and conversion phases happen before so I
guess that my problem is directly related with navigation or probably
library stuff.

 

I also have the following lines in my web.xml:

 

< context-param >

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

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

  </ context-param >

….

< context-param >

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

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

  </ context-param >

…

< 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 >

 

I have carefully followed all the guidelines suggested in the developer
documentation.

 

My faces-config.xml rule is as follows:

 

< navigation-rule >

  < from-view-id > /pages/logon.xhtml </ from-view-id >

  < navigation-case >

   < from-outcome > alero.altSearch </ from-outcome >

   < to-view-id > /pages/tools/search/mainSearch_TRIAL.xhtml </ to-view-id >

  </ navigation-case >

  </ navigation-rule >

  < navigation-rule >

 

I am 100% sure that the action of the managed bean is getting executed, I
followed it until the last line and it returns the String:  "
alero.altSearch".  And it returns back to the login.xhtml.  By the way, all
my files have the extension:  "*.xhtml" accordingly.  Something to note is
that at first I was getting an exception related to some factory stuff,
which I googled and found that it was related to the el-ri.jar library not
being compatible with jdk1.4 and from a mailing list I saw that someone had
solved a similar problem by getting Exadel´s corresponding library, and
after using it the login page finally appeared but now I have this problem
with the navigation.  

As you see I am feeling kind of blind here, do you have any ideas as to how
to debug it?  

 

In case it helps this is my environment:

 

TOMCAT_VERSION:   5.0 (The one embedded with Exadel Studio PRO 3.5.1)

 

JDK:  j2sdk1.4.2_12

 

LIBRARIES:

-myfaces-api-1.1.4-SNAPSHOT.jar

-myfaces-impl-1.1.4-SNAPSHOT.jar

-commons-beanutils-1.7.0.jar

-commons-codec-1.3.jar

-commons-collections-3.1.jar

-commons-digester-1.6.jar

-commons-el-1.0.jar

-commons-fileupload-1.1.1.jar

-commons-lang-2.1.jar

-commons-logging-1.0.4.jar

-el-api.jar

-el-ri.jar

-jsf-facelets.jar

-log4j-1.2.13.jar

-tomahawk-1.1.5-SNAPSHOT.jar

-portlet.jar

-alerolib.jar

-ajaxanywhere-1.2-RC2.jar

 

 

Regards,

JV

 

 

 

 

 

 

 

  _____  

De: Adam Brod [mailto:ABrod@intralinks.com] 
Enviado el: miércoles, 26 de julio de 2006 13:18
Para: MyFaces Discussion
Asunto: Re: Navigation problems with FACELETS

 


Hi Jorge- 

Welcome to Facelets!  I'm sure that we'll be able to get you through your
current issue. 

First, I would make sure that you have < h:messages showDetail= "true" />
defined on your login page.  There might be a validation/model update
problem that isn't being displayed. 

Secondly, I would make sure that you have the facelets.DEVELOPMENT parameter
defined in your web.xml: 
<context-param > 
    <param-name>facelets.DEVELOPMENT </param-name> 
    <param-value>true </param-value> 
  </context-param> 

Often that will ensure you get a good error message. 

If those don't work, are you sure your action method is being invoked?
Perhaps you could send the details of your login page so we can ensure that
everything looks okay. 

I hope that helps.

Adam Brod
Product Development Team


Jorge Vásquez <jv...@3eyegroup.com> 

07/26/2006 02:07 PM 


Please respond to
"MyFaces Discussion" <users@myfaces.apache.org >


To

< users@myfaces.apache.org <ma...@myfaces.apache.org> > 


cc

 


Subject

Navigation problems with FACELETS

 


 

 




Greetings to all, 
Alter having many problems with JSP+JSF I decided to give it a try with
Facelets.  Everything started fine, my login page appeared on screen and I
was starting to get excited but unfortunately in our profession excitement
doesn´t lasts much and I am getting problems with navigation where I get no
message at all, no log, etc.  I followed the application in debug mode and
after clicking the submit button it went to the corresponding action method
in the managed bean and reached the end and returned the respective String
which in the faces-config is mapped to another page but nothing happens and
the same page is reloaded with no message at all.  Here I confess that I am
completely lost, how can I debug this?  Has anyone had a similar problem
with MyFaces+Facelets?  
Regards, 
JV 

Disclaimer: This electronic mail and any attachments are confidential and
may be privileged. If you are not the intended recipient, please notify the
sender immediately by replying to this email, and destroy all copies of this
email and any attachments. Thank you.

 


Re: Navigation problems with FACELETS

Posted by Andrew Robinson <an...@gmail.com>.
Add debugging output from the navigation handler to your log4j.xml

Example taken from a JBoss log4j.xml:

   <category name="org.apache.myfaces.application.NavigationHandlerImpl">
     <priority value="TRACE" class="org.jboss.logging.XLevel"/>
   </category>

This will print out all matches and tell you if it couldn't find a result or
not:
2006-07-25 11:49:30,989 DEBUG [NavigationHandlerImpl] handleNavigation
fromAction=#{bean.action} outcome=yourOutcome no matching navigation-case
found, staying on current ViewRoot

or:

2006-07-25 11:48:54,393 DEBUG [NavigationHandlerImpl] handleNavigation
fromAction=#{bean.action} outcome=yourOutcome toViewId =/view.xhtml
redirect=true



On 7/26/06, Jorge Vásquez <jv...@3eyegroup.com> wrote:
>
>  Hi Adam,
>
> Thanks for your kind welcome to Facelets and your valuable help.
>
> I currently have the messages in my page as follows:
>
>
>
> <h:messages errorClass="errorMessage" globalOnly="false" showDetail="true"
> lang="en" />
>
>
>
> There´s one important note and is that the action method is getting
> executed and as I remember the validation and conversion phases happen
> before so I guess that my problem is directly related with navigation or
> probably library stuff.
>
>
>
> I also have the following lines in my web.xml:
>
>
>
> <context-param>
>
>   <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
>
>   <param-value>.xhtml</param-value>
>
>  </context-param>
>
> ….
>
> <context-param>
>
>   <param-name>facelets.DEVELOPMENT</param-name>
>
>   <param-value>true</param-value>
>
>  </context-param>
>
> …
>
> <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>
>
>
>
> I have carefully followed all the guidelines suggested in the developer
> documentation.
>
>
>
> My faces-config.xml rule is as follows:
>
>
>
> <navigation-rule>
>
>   <from-view-id>/pages/logon.xhtml</from-view-id>
>
>   <navigation-case>
>
>    <from-outcome>alero.altSearch</from-outcome>
>
>    <to-view-id>/pages/tools/search/mainSearch_TRIAL.xhtml</to-view-id>
>
>   </navigation-case>
>
>  </navigation-rule>
>
>  <navigation-rule>
>
>
>
> I am 100% sure that the action of the managed bean is getting executed, I
> followed it until the last line and it returns the String:  "
> alero.altSearch".  And it returns back to the login.xhtml.  By the way,
> all my files have the extension:  "*.xhtml" accordingly.  Something to note
> is that at first I was getting an exception related to some factory stuff,
> which I googled and found that it was related to the el-ri.jar library not
> being compatible with jdk1.4 and from a mailing list I saw that someone
> had solved a similar problem by getting Exadel´s corresponding library, and
> after using it the login page finally appeared but now I have this problem
> with the navigation.
>
> As you see I am feeling kind of blind here, do you have any ideas as to
> how to debug it?
>
>
>
> In case it helps this is my environment:
>
>
>
> TOMCAT_VERSION:   5.0 (The one embedded with Exadel Studio PRO 3.5.1)
>
>
>
> JDK:  j2sdk1.4.2_12
>
>
>
> LIBRARIES:
>
> -myfaces-api-1.1.4-SNAPSHOT.jar
>
> -myfaces-impl-1.1.4-SNAPSHOT.jar
>
> -commons-beanutils-1.7.0.jar
>
> -commons-codec-1.3.jar
>
> -commons-collections-3.1.jar
>
> -commons-digester-1.6.jar
>
> -commons-el-1.0.jar
>
> -commons-fileupload-1.1.1.jar
>
> -commons-lang-2.1.jar
>
> -commons-logging-1.0.4.jar
>
> -el-api.jar
>
> -el-ri.jar
>
> -jsf-facelets.jar
>
> -log4j-1.2.13.jar
>
> -tomahawk-1.1.5-SNAPSHOT.jar
>
> -portlet.jar
>
> -alerolib.jar
>
> -ajaxanywhere-1.2-RC2.jar
>
>
>
>
>
> Regards,
>
> JV
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>  ------------------------------
>
> *De:* Adam Brod [mailto:ABrod@intralinks.com]
> *Enviado el:* miércoles, 26 de julio de 2006 13:18
> *Para:* MyFaces Discussion
> *Asunto:* Re: Navigation problems with FACELETS
>
>
>
>
> Hi Jorge-
>
> Welcome to Facelets!  I'm sure that we'll be able to get you through your
> current issue.
>
> First, I would make sure that you have <h:messages showDetail="true" />defined on your login page.  There might be a validation/model update
> problem that isn't being displayed.
>
> Secondly, I would make sure that you have the facelets.DEVELOPMENTparameter defined in your
> web.xml:
> <context-param>
>     <param-name>facelets.DEVELOPMENT</param-name>
>     <param-value>true</param-value>
>   </context-param>
>
> Often that will ensure you get a good error message.
>
> If those don't work, are you sure your action method is being invoked?
>  Perhaps you could send the details of your login page so we can ensure that
> everything looks okay.
>
> I hope that helps.
> *
> Adam Brod**
> Product Development Team*
>
> *Jorge Vásquez <jv...@3eyegroup.com>*
>
> 07/26/2006 02:07 PM
>
> Please respond to
> "MyFaces Discussion" <us...@myfaces.apache.org>
>
>    To
>
> <us...@myfaces.apache.org>
>
> cc
>
>
>
> Subject
>
> Navigation problems with FACELETS
>
>
>
>
>
>
>
>
>
>
> Greetings to all,
> Alter having many problems with JSP+JSF I decided to give it a try with
> Facelets.  Everything started fine, my login page appeared on screen and I
> was starting to get excited but unfortunately in our profession excitement
> doesn´t lasts much and I am getting problems with navigation where I get no
> message at all, no log, etc.  I followed the application in debug mode and
> after clicking the submit button it went to the corresponding action method
> in the managed bean and reached the end and returned the respective String
> which in the faces-config is mapped to another page but nothing happens and
> the same page is reloaded with no message at all.  Here I confess that I am
> completely lost, how can I debug this?  Has anyone had a similar problem
> with MyFaces+Facelets?
> Regards,
> JV
>
> Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.
>
>

RE: Navigation problems with FACELETS

Posted by Adam Brod <AB...@intralinks.com>.
Well, everything looks correct to me.  It might be that some exception 
somewhere is getting swallowed.  Do you have your logging set up? 
Sometimes MyFaces swallows and logs certain exceptions that makes 
debugging difficult.  If not, you should make sure you have 
commons-logging.jar and log4j.jar in your WEB-INF/lib directory.  Then in 
WEB-INF/classes/log4j.properties you should have something like what I 
have below.  Otherwise, you can do the painful debugging of just stepping 
through the execution of NavigationHandlerImpl.handleNavigation(...). That 
method should be getting "alero.altSearch" as the outcome and finding the 
next page and rendering it.  It appears that something must be going wrong 
in there.

I hope this helps you isolate your problem.

log4j.rootLogger=WARN, stdout

log4j.logger.org.apache.myfaces = INFO
log4j.logger.javax.faces = INFO
log4j.logger.org.ajax4jsf = INFO

#***************************************
# Appender "stdout"
#***************************************
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %-5p %c - %m%n


Adam Brod
Product Development Team


Jorge Vásquez <jv...@3eyegroup.com> 
07/26/2006 03:45 PM
Please respond to
"MyFaces Discussion" <us...@myfaces.apache.org>


To
"'MyFaces Discussion'" <us...@myfaces.apache.org>
cc

Subject
RE: Navigation problems with FACELETS






Hi Adam,
Thanks for your kind welcome to Facelets and your valuable help.
I currently have the messages in my page as follows:
 
<h:messages errorClass="errorMessage" globalOnly="false" showDetail="true" 
lang="en" /> 
 
There´s one important note and is that the action method is getting 
executed and as I remember the validation and conversion phases happen 
before so I guess that my problem is directly related with navigation or 
probably library stuff.
 
I also have the following lines in my web.xml:
 
<context-param>
  <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
  <param-value>.xhtml</param-value>
 </context-param>
?.
<context-param>
  <param-name>facelets.DEVELOPMENT</param-name>
  <param-value>true</param-value>
 </context-param>
?
<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>
 
I have carefully followed all the guidelines suggested in the developer 
documentation.
 
My faces-config.xml rule is as follows:
 
<navigation-rule>
  <from-view-id>/pages/logon.xhtml</from-view-id>
  <navigation-case>
   <from-outcome>alero.altSearch</from-outcome>
   <to-view-id>/pages/tools/search/mainSearch_TRIAL.xhtml</to-view-id>
  </navigation-case>
 </navigation-rule>
 <navigation-rule>
 
I am 100% sure that the action of the managed bean is getting executed, I 
followed it until the last line and it returns the String:  ?
alero.altSearch?.  And it returns back to the login.xhtml.  By the way, 
all my files have the extension:  ?*.xhtml? accordingly.  Something to 
note is that at first I was getting an exception related to some factory 
stuff, which I googled and found that it was related to the el-ri.jar 
library not being compatible with jdk1.4 and from a mailing list I saw 
that someone had solved a similar problem by getting Exadel´s 
corresponding library, and after using it the login page finally appeared 
but now I have this problem with the navigation.  
As you see I am feeling kind of blind here, do you have any ideas as to 
how to debug it?  
 
In case it helps this is my environment:
 
TOMCAT_VERSION:   5.0 (The one embedded with Exadel Studio PRO 3.5.1)
 
JDK:  j2sdk1.4.2_12
 
LIBRARIES:
-myfaces-api-1.1.4-SNAPSHOT.jar
-myfaces-impl-1.1.4-SNAPSHOT.jar
-commons-beanutils-1.7.0.jar
-commons-codec-1.3.jar
-commons-collections-3.1.jar
-commons-digester-1.6.jar
-commons-el-1.0.jar
-commons-fileupload-1.1.1.jar
-commons-lang-2.1.jar
-commons-logging-1.0.4.jar
-el-api.jar
-el-ri.jar
-jsf-facelets.jar
-log4j-1.2.13.jar
-tomahawk-1.1.5-SNAPSHOT.jar
-portlet.jar
-alerolib.jar
-ajaxanywhere-1.2-RC2.jar
 
 
Regards,
JV
 
 
 
 
 
 
 

De: Adam Brod [mailto:ABrod@intralinks.com] 
Enviado el: miércoles, 26 de julio de 2006 13:18
Para: MyFaces Discussion
Asunto: Re: Navigation problems with FACELETS
 

Hi Jorge- 

Welcome to Facelets!  I'm sure that we'll be able to get you through your 
current issue. 

First, I would make sure that you have <h:messages showDetail="true" /> 
defined on your login page.  There might be a validation/model update 
problem that isn't being displayed. 

Secondly, I would make sure that you have the facelets.DEVELOPMENT 
parameter defined in your web.xml: 
<context-param> 
    <param-name>facelets.DEVELOPMENT</param-name> 
    <param-value>true</param-value> 
  </context-param> 

Often that will ensure you get a good error message. 

If those don't work, are you sure your action method is being invoked? 
Perhaps you could send the details of your login page so we can ensure 
that everything looks okay. 

I hope that helps.

Adam Brod
Product Development Team

Jorge Vásquez <jv...@3eyegroup.com> 
07/26/2006 02:07 PM 


Please respond to
"MyFaces Discussion" <us...@myfaces.apache.org>



To
<us...@myfaces.apache.org> 
cc
 
Subject
Navigation problems with FACELETS
 


 
 




Greetings to all, 
Alter having many problems with JSP+JSF I decided to give it a try with 
Facelets.  Everything started fine, my login page appeared on screen and I 
was starting to get excited but unfortunately in our profession excitement 
doesn´t lasts much and I am getting problems with navigation where I get 
no message at all, no log, etc.  I followed the application in debug mode 
and after clicking the submit button it went to the corresponding action 
method in the managed bean and reached the end and returned the respective 
String which in the faces-config is mapped to another page but nothing 
happens and the same page is reloaded with no message at all.  Here I 
confess that I am completely lost, how can I debug this?  Has anyone had a 
similar problem with MyFaces+Facelets? 
Regards, 
JV 
Disclaimer: This electronic mail and any attachments are confidential and 
may be privileged. If you are not the intended recipient, please notify 
the sender immediately by replying to this email, and destroy all copies 
of this email and any attachments. Thank you.
Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.


RE: Navigation problems with FACELETS

Posted by Jorge Vásquez <jv...@3eyegroup.com>.
Hi Adam,

Thanks for your kind welcome to Facelets and your valuable help.

I currently have the messages in my page as follows:

 

<h:messages errorClass="errorMessage" globalOnly="false" showDetail="true"
lang="en" /> 

 

There´s one important note and is that the action method is getting executed
and as I remember the validation and conversion phases happen before so I
guess that my problem is directly related with navigation or probably
library stuff.

 

I also have the following lines in my web.xml:

 

<context-param>

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

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

 </context-param>

….

<context-param>

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

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

 </context-param>

…

<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>

 

I have carefully followed all the guidelines suggested in the developer
documentation.

 

My faces-config.xml rule is as follows:

 

<navigation-rule>

  <from-view-id>/pages/logon.xhtml</from-view-id>

  <navigation-case>

   <from-outcome>alero.altSearch</from-outcome>

   <to-view-id>/pages/tools/search/mainSearch_TRIAL.xhtml</to-view-id>

  </navigation-case>

 </navigation-rule>

 <navigation-rule>

 

I am 100% sure that the action of the managed bean is getting executed, I
followed it until the last line and it returns the String:
“alero.altSearch”.  And it returns back to the login.xhtml.  By the way, all
my files have the extension:  “*.xhtml” accordingly.  Something to note is
that at first I was getting an exception related to some factory stuff,
which I googled and found that it was related to the el-ri.jar library not
being compatible with jdk1.4 and from a mailing list I saw that someone had
solved a similar problem by getting Exadel´s corresponding library, and
after using it the login page finally appeared but now I have this problem
with the navigation.  

As you see I am feeling kind of blind here, do you have any ideas as to how
to debug it?  

 

In case it helps this is my environment:

 

TOMCAT_VERSION:   5.0 (The one embedded with Exadel Studio PRO 3.5.1)

 

JDK:  j2sdk1.4.2_12

 

LIBRARIES:

-myfaces-api-1.1.4-SNAPSHOT.jar

-myfaces-impl-1.1.4-SNAPSHOT.jar

-commons-beanutils-1.7.0.jar

-commons-codec-1.3.jar

-commons-collections-3.1.jar

-commons-digester-1.6.jar

-commons-el-1.0.jar

-commons-fileupload-1.1.1.jar

-commons-lang-2.1.jar

-commons-logging-1.0.4.jar

-el-api.jar

-el-ri.jar

-jsf-facelets.jar

-log4j-1.2.13.jar

-tomahawk-1.1.5-SNAPSHOT.jar

-portlet.jar

-alerolib.jar

-ajaxanywhere-1.2-RC2.jar

 

 

Regards,

JV

 

 

 

 

 

 

 

  _____  

De: Adam Brod [mailto:ABrod@intralinks.com] 
Enviado el: miércoles, 26 de julio de 2006 13:18
Para: MyFaces Discussion
Asunto: Re: Navigation problems with FACELETS

 


Hi Jorge- 

Welcome to Facelets!  I'm sure that we'll be able to get you through your
current issue. 

First, I would make sure that you have <h:messages showDetail="true" />
defined on your login page.  There might be a validation/model update
problem that isn't being displayed. 

Secondly, I would make sure that you have the facelets.DEVELOPMENT parameter
defined in your web.xml: 
<context-param> 
    <param-name>facelets.DEVELOPMENT</param-name> 
    <param-value>true</param-value> 
  </context-param> 

Often that will ensure you get a good error message. 

If those don't work, are you sure your action method is being invoked?
Perhaps you could send the details of your login page so we can ensure that
everything looks okay. 

I hope that helps.

Adam Brod
Product Development Team


Jorge Vásquez <jv...@3eyegroup.com> 

07/26/2006 02:07 PM 


Please respond to
"MyFaces Discussion" <us...@myfaces.apache.org>


To

<us...@myfaces.apache.org> 


cc

 


Subject

Navigation problems with FACELETS

 


 

 




Greetings to all, 
Alter having many problems with JSP+JSF I decided to give it a try with
Facelets.  Everything started fine, my login page appeared on screen and I
was starting to get excited but unfortunately in our profession excitement
doesn´t lasts much and I am getting problems with navigation where I get no
message at all, no log, etc.  I followed the application in debug mode and
after clicking the submit button it went to the corresponding action method
in the managed bean and reached the end and returned the respective String
which in the faces-config is mapped to another page but nothing happens and
the same page is reloaded with no message at all.  Here I confess that I am
completely lost, how can I debug this?  Has anyone had a similar problem
with MyFaces+Facelets?  
Regards, 
JV 

Disclaimer: This electronic mail and any attachments are confidential and
may be privileged. If you are not the intended recipient, please notify the
sender immediately by replying to this email, and destroy all copies of this
email and any attachments. Thank you.

Re: Navigation problems with FACELETS

Posted by Adam Brod <AB...@intralinks.com>.
Hi Jorge-

Welcome to Facelets!  I'm sure that we'll be able to get you through your 
current issue.

First, I would make sure that you have <h:messages showDetail="true" /> 
defined on your login page.  There might be a validation/model update 
problem that isn't being displayed.

Secondly, I would make sure that you have the facelets.DEVELOPMENT 
parameter defined in your web.xml:
<context-param>
    <param-name>facelets.DEVELOPMENT</param-name>
    <param-value>true</param-value>
  </context-param>

Often that will ensure you get a good error message.

If those don't work, are you sure your action method is being invoked? 
Perhaps you could send the details of your login page so we can ensure 
that everything looks okay.

I hope that helps.

Adam Brod
Product Development Team


Jorge Vásquez <jv...@3eyegroup.com> 
07/26/2006 02:07 PM
Please respond to
"MyFaces Discussion" <us...@myfaces.apache.org>


To
<us...@myfaces.apache.org>
cc

Subject
Navigation problems with FACELETS






Greetings to all,
Alter having many problems with JSP+JSF I decided to give it a try with 
Facelets.  Everything started fine, my login page appeared on screen and I 
was starting to get excited but unfortunately in our profession excitement 
doesn´t lasts much and I am getting problems with navigation where I get 
no message at all, no log, etc.  I followed the application in debug mode 
and after clicking the submit button it went to the corresponding action 
method in the managed bean and reached the end and returned the respective 
String which in the faces-config is mapped to another page but nothing 
happens and the same page is reloaded with no message at all.  Here I 
confess that I am completely lost, how can I debug this?  Has anyone had a 
similar problem with MyFaces+Facelets?  
Regards,
JV
Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.