aspose file tools*
The moose likes JSF and the fly likes Navigation issue 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 "Navigation issue" Watch "Navigation issue" New topic
Author

Navigation issue

Supriya Pramod
Greenhorn

Joined: Jun 19, 2008
Posts: 10

I am not able to navigate between pages and there are no errors shown also.
But when the same command button is clicked twice , a error occurs.

The web.xml used is as below :

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>

<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<description>Set the size limit for uploaded files.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB
</description>
<param-name>maxFileSize</param-name>
<param-value>20m</param-value>
</init-param>
</filter>

<!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages -->
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>

<!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
</web-app>

and the faces.config is :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>

<!-- Navigation rules -->
<navigation-rule>
<description>Allotment</description>
<from-view-id>/allot.jsp</from-view-id>

<navigation-case>
<from-outcome>crtAllot</from-outcome>
<to-view-id>/create_allot.jsp</to-view-id>
</navigation-case>

<navigation-case>
<from-outcome>crtSucc</from-outcome>
<to-view-id>/create_success.jsp</to-view-id>
</navigation-case>

<navigation-case>
<from-outcome>retrivesuccess</from-outcome>
<to-view-id>/retrieve_allot.jsp</to-view-id>
</navigation-case>

<navigation-case>
<from-outcome>resetsuccess</from-outcome>
<to-view-id>/allot.jsp</to-view-id>
</navigation-case>

<navigation-case>
<from-outcome>failure</from-outcome>
<to-view-id>/errpg.jsp</to-view-id>
</navigation-case>

</navigation-rule>

<!-- Managed beans -->
<managed-bean>
<description>Allotment Bean</description>
<managed-bean-name>AllotmentBean</managed-bean-name>
<managed-bean-class>com.lsy.capman.sd.common.entity.AllotmentBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
</faces-config>

Can anybody please tel me watz the issue. Its urgent.

Thanks,
Supriya
Anu Sri
Greenhorn

Joined: May 19, 2008
Posts: 16
Hi,

can you post your JSP and backing bean method
Ayub ali khan
Ranch Hand

Joined: Oct 20, 2005
Posts: 382
    
    2
Hi Supriya,

Just a wild guess..remove the type attribute of h:commandButton and check if the form is being posted.

<h:commandButton id="sbutton" value="Submit Form" action="#userBean.check}" />

It would help if you can post your JSF code for the form to dubug.

Is the action method being called when you click the button ?


--Ayub


SCEA part I,TOGAF Foundation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Navigation issue