Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Could not navigate from one page to another !!!

 
nomai altamimi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
 
nomai altamimi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 72
Eclipse IDE Hibernate Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic