aspose file tools*
The moose likes JSF and the fly likes JSF navigation issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF navigation issues" Watch "JSF navigation issues" New topic
Author

JSF navigation issues

Kavya Anjali
Ranch Hand

Joined: Mar 23, 2006
Posts: 30
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 ]

SCJP 5.0
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Where are first.jsp and second.jsp put in? In the /faces/ folder?
Eugene Abarquez
Ranch Hand

Joined: May 18, 2006
Posts: 211
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:


There's so much to learn in this industry, and not everybody has the necessary interest.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
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

Joined: Mar 23, 2006
Posts: 30
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

Joined: Oct 08, 2006
Posts: 2458
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

Joined: Mar 23, 2006
Posts: 30
No I have not put them in the faces folder...in fact there is no faces folder...
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
How are you invoking the facesservlet?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF navigation issues