File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Could not navigate from one page to another !!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Could not navigate from one page to another !!! " Watch "Could not navigate from one page to another !!! " New topic
Author

Could not navigate from one page to another !!!

nomai altamimi
Greenhorn

Joined: Jan 13, 2012
Posts: 6
hi

i am newbie in JSF .. and i just started my first example

which is just a page with text field and command button (to redirect to another page )

but i could not go from first page to the second one .. and i followed all steps to do that but it didn't work

this is my first JSF page :




my faces-config.xml :



these is my second JSF page ( ResultsJSF.jsp) :



but when i press submitt in my first page .. it does nothing ( just staying in the same page !!!)

my custome validator class :


so i need some help about whats going on in my case !


thanks in advance
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

Change this from:
<h:commandButton action="Results" value="#{message.button_text}">
To
<h:commandButton action="ResultsJSF" value="#{message.button_text}">

Also, change this:
<to-view-id>/ResultsJSF.jsf</to-view-id>
to
<to-view-id>/ResultsJSF.xhtml</to-view-id> or <to-view-id>/ResultsJSF.jsp</to-view-id>


[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
nomai altamimi
Greenhorn

Joined: Jan 13, 2012
Posts: 6
thanks Hebert for your response

Hebert Coelho wrote:

Change this from:
<h:commandButton action="Results" value="#{message.button_text}">
To
<h:commandButton action="ResultsJSF" value="#{message.button_text}">



i changed this mistake

Hebert Coelho wrote:
Also, change this:
<to-view-id>/ResultsJSF.jsf</to-view-id>
to
<to-view-id>/ResultsJSF.xhtml</to-view-id> or <to-view-id>/ResultsJSF.jsp</to-view-id>



changed it to ResultsJSF.xhtml and ResultJSF.jsp .. but it does not work

i am really confused !!


nomai altamimi
Greenhorn

Joined: Jan 13, 2012
Posts: 6
oh i found the mistake

it messed the spelling when i created the JSP page

so sorry about that

my pages are working fine now

i am sorry again
Gopakumar Naryanan
Ranch Hand

Joined: Jan 15, 2011
Posts: 72

I am also facing the same problem.
Could you please let me know where am i doing the mistake?

Please find my faces-config.xml , LoginBean.java and login.jsp below respectively:







Thanks for your help in advance.


Thanks & Regards
Gopakumar
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Could not navigate from one page to another !!!
 
Similar Threads
navigation rules are not working...
managed bean in JSF.
Navigation problem
EL expressions are not evaluated
Displaying Data Without DataTable