Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Could not navigate from one page to another !!!

 
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
 
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
 
Ranch Hand
Posts: 72
Hibernate Eclipse IDE 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.
 
Friends help you move. Good friends help you move bodies. This tiny ad will help:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic