• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF navigation issues

 
Kavya Anjali
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I have tried to create a simple app in JSF. the first page is shown correctly and I followed all the proper rules for

creating a jsf app. However I am unable to go to the second page when I click on the command button. I am keeping the code

for everybody's reference..please tell me what to do as I am totally frustated by this...

I am using tomcat 5.0 and eclipse ide with no other plugins for JSF.
-----------------------------------------------------------------------
This is the first.jsp file

-----------------------------------------------------------------------
This is a simple second.jsp file

--------------------------
This is the backing bean

---------------------
THis is the faces-config.xml file

------------------------
this is the web.xml file

-------------------------------
I have all the necessary libraries in /WEB-INF/lib folders. To be more specific, I have these jar files in the lib folder
commons-beanutils,collections,digester,el,logging,jsf-api,jsf-impl,jstl,standard

The movement bean is in the /WEB-INF/src folder

Please help!!!
[ October 10, 2006: Message edited by: Bear Bibeault ]
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where are first.jsp and second.jsp put in? In the /faces/ folder?
 
Eugene Abarquez
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try removing the immediate=true attribute in your <h:commandButton>. Also in the action attribute of your button, you should bind the method in your bean, like so:

And specify it in the navigation rule in your faces-config.xml:
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Removing immediate=true shouldn't solve the problem. There this attribute is not for. And it is not true that you should bind to the backing bean. It really doesn't matter whether you put a plain string in it or you uses the string returned from the methodbinding to finally pass it to the navigationhandler.
 
Kavya Anjali
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bauke...you are right here as well...the problem is not in the attributes as some people feel but it is something else only...I dont know what...I have not yet been able to find the problem
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to be helped out of here, please answer to my question
Where are first.jsp and second.jsp put in? In the /faces/ folder?

Because, if this is true, then you have set the to-view-id values incorrectly. This should contain the full relative webapplication path, like:
 
Kavya Anjali
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No I have not put them in the faces folder...in fact there is no faces folder...
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you invoking the facesservlet?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic