Results 1 to 4 of 4
- 10-23-2008, 10:31 PM #1
Member
- Join Date
- Oct 2008
- Posts
- 4
- Rep Power
- 0
decorator.jsp problem building Struts Menu in JSP when Struts action is used
I am using JSP, Struts and sitemesh in several web apps. After signing onto to the system the home page is displayed with the struts menu at top and a navigation menu along the left side of the jsp page. I am using a decorator.jsp to build the completed jsp page. If I click on a menu option or navigation option that calls a struts action class and then processes the new jsp the building of the new jsp fails when it is rebuilding the struts menu jsp. If I click on a link that calls another jsp with out struts action involved then the jsp is built with out any problems.
The error I am receiving is
878756 [http-8080-Processor25] (MessageResourcesMenuDisplayer.java:72) DEBUG net.sf.navigator.displayer.ListMenuDisplayer - Looking up message 'ToDoListMenuProject' in Struts' MessageResources
java.lang.ClassCastException: org.apache.struts.util.PropertyMessageResources
at net.sf.navigator.displayer.MessageResourcesMenuDis player.getMessage(MessageResourcesMenuDisplayer.ja va:76)
at net.sf.navigator.displayer.ListMenuDisplayer.displ ayComponents(ListMenuDisplayer.java:52)
at net.sf.navigator.displayer.ListMenuDisplayer.displ ay(ListMenuDisplayer.java:41)
at net.sf.navigator.taglib.DisplayMenuTag.doStartTag( DisplayMenuTag.java:100)
at org.apache.jsp.jsp.decorator_jsp._jspx_meth_menu_d isplayMenu_0(decorator_jsp.java:574)
I have this code in my struts-config
<plug-in className="net.sf.navigator.menu.MenuPlugIn">
<set-property property="menuConfig" value="/WEB-INF/menu-config.xml" />
</plug-in>
The menu-config.xml is
<?xml version="1.0" encoding="UTF-8"?>
<MenuConfig>
<Displayers>
<Displayer name="DropDown"
type="net.sf.navigator.displayer.DropDownMenuDispl ayer" />
<Displayer name="ListMenu"
type="net.sf.navigator.displayer.ListMenuDisplayer " />
</Displayers>
<Menus>
<Menu name="ToDoListMenuProject" title="Project" description="test"
width="200">
<Item name="TDLteam" title="Team">
<Item name="TDLjohn" title="John"
page="/johnD.do" width="40" />
<Item name="TDLdoug" title="Doug"
page="/dougT.do" width="40" />
<Item name="TDLshirley" title="Shirley"
page="/shirleyS.do" width="40" />
<Item name="TDLdavid" title="David"
page="/jsp/davidK.jsp" width="40" />
</Item>
</Menu>
<Menu name="ToDoListMenuList" title="Filter" width="200">
<Item name="TDLactiveItems" title="Active Items"
page="${filterActive}" width="100" />
<Item name="TDLallItems" title="All Items"
page="${filterAll}" width="100" />
<Item name="TDLdeletedItems" title="Deleted Items"
page="${filterDeleted}" width="150" />
</Menu>
<Menu name="ToDoListSelectCompany" title="Company" width="100">
<Item name="TDLagriStats" title="Agri Stats"
page="/home.do?do=compAgriStats" width="190" />
<Item name="TDLexpressMarkets" title="Express Markets"
page="/home.do?do=compExpressMarkets" width="190" />
</Menu>
<Menu name="ToDoListMenuLogoff" title="Log Out" description="LogOut"
width="200">
<Item name="TDLlogout" title="LOG OUT"
page="/logon.do?do=showLogon" width="100" />
</Menu>
</Menus>
</MenuConfig>
- 10-27-2008, 03:32 PM #2
Member
- Join Date
- Oct 2008
- Posts
- 4
- Rep Power
- 0
Problem Resolved:
I had to put the struts.jar and struts-menu-2.4.3.jar in the common/lib for tomcat and remove them from the individual web-app's lib directory. In addition, I had to coppy the commons.*.jars to common/lib for tomcat except for the commons.logging.jar which caused problems if removed from the individual web-app's directory.
- 07-10-2009, 09:55 AM #3
Member
- Join Date
- Jul 2009
- Posts
- 6
- Rep Power
- 0
Can you please tell me whether you are using struts 1 or 2..............
- 04-29-2010, 06:33 AM #4
Member
- Join Date
- Apr 2010
- Posts
- 1
- Rep Power
- 0
Similar Threads
-
Problem with Struts Menu
By sdp in forum Advanced JavaReplies: 4Last Post: 10-02-2009, 03:13 AM -
Struts Menu Component
By bksamrat in forum Web FrameworksReplies: 0Last Post: 06-04-2008, 08:54 AM -
Action class in Struts
By Java Tip in forum Java TipReplies: 0Last Post: 12-27-2007, 11:05 AM
Bookmarks