• 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
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Navigation issue

 
Greenhorn
Posts: 10
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

can you post your JSP and backing bean method
 
Ranch Hand
Posts: 399
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!