Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regd : Implementation of jscookMenu

Dipeeka Suryawanshi
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using <t:jscookMenu/> for implementing Menu. Using JSF1.2 & Eclipse indigo with Apache tomcat7.0 apps server.

when i am clicking on menu it gives me viewExpired Exception.

my Code is like :

jsCookMenu.jsp :

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page session="false" contentType="text/html; charset=ISO-8859-1"%>
<%@ taglib prefix="f" uri=""%>
<%@ taglib prefix="h" uri=""%>
<%@ taglib uri="" prefix="t"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>jSCookMenu Implementor</title>
<h:form id="MenuForm">
<t:jscookMenu layout="hbr" theme="ThemeOffice">
<t:navigationMenuItem itemLabel="File">
<t:navigationMenuItem action="new-file" itemLabel="New"/>
<t:navigationMenuItem action="open-file" itemLabel="Open"/>
<!-- <t:navigationMenuItem action="#{menuBB.navItems }" itemLabel="Close" />-->
<t:navigationMenuItem action="Close" icon="images/arrow-ff.gif" itemLabel="Close"></t:navigationMenuItem>
<t:navigationMenuItems value="#{menuBB.navItems}"></t:navigationMenuItems>

<t:navigationMenuItem itemLabel="Edit">
</html> :

package com.aliasBean.example.domain;

import org.apache.myfaces.custom.navmenu.NavigationMenuItem;

public class DynamicMenuTest {

private NavigationMenuItem[] navItems;

public DynamicMenuTest() {

// children for item 2
NavigationMenuItem[] subItems = new NavigationMenuItem[2];
subItems[0] = new NavigationMenuItem("Subitem 2_1 Label","action2_1", "iconUrl", false);
subItems[1] = new NavigationMenuItem("Subitem 2_2 Label","action2_2", "iconUrl", false);

// item 2
NavigationMenuItem itemWithChildren = new NavigationMenuItem("Item 2 Label", "action2", "iconUrl", false);

// root items
navItems = new NavigationMenuItem[3];
navItems[0] = new NavigationMenuItem("Item 1 Label","action1", "iconUrl", false);

navItems[1] = itemWithChildren;
navItems[2] = new NavigationMenuItem("Item 3 Label","action3", "iconUrl", false);

System.out.println("navItem -->"+navItems[2]);

public NavigationMenuItem[] getNavItems() {
return navItems;

public void setNavItems(NavigationMenuItem[] navItems) {
this.navItems = navItems;

public String close()

return "exit";

faces-config.xml :




web.xml :





In web.xml file i have already defined that ViewExpired Exception.
Still when i am clicking on Menu to perform some action it gives " javax.faces.application.ViewExpiredException ".

Please provide me the solution ,why i am facing this exception.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic