IntelliJ Java IDE
The moose likes JSF and the fly likes Could not navigate from one page to another !!! Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply 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: 3
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: 718

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: 3
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: 3
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 kiing
Ranch Hand

Joined: Jan 15, 2011
Posts: 44
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
 
 
subject: Could not navigate from one page to another !!!
 
Threads others viewed
Navigation problem
managed bean in JSF.
EL expressions are not evaluated
navigation rules are not working...
Displaying Data Without DataTable
IntelliJ Java IDE