Results 1 to 5 of 5
Thread: Problem with Struts Menu
- 07-20-2007, 02:28 PM #1
Member
- Join Date
- Jul 2007
- Posts
- 2
- Rep Power
- 0
Problem with Struts Menu
Hi,
I am trying to implement struts-menu in me existing struts application.I have made the possible changes that are required.The thing is I am not able to display th menu on my screen though i am not getting any exception.:confused:
I have included menu-config.xml and included all the jsr files required for that.
It would be great if anyone already worked on this could help me out.
SDP
- 07-20-2007, 03:16 PM #2
Member
- Join Date
- Jul 2007
- Posts
- 41
- Rep Power
- 0
please paste the code maybe I can help you
;)
- 07-25-2007, 02:51 PM #3
Member
- Join Date
- Jul 2007
- Posts
- 2
- Rep Power
- 0
My Struts-config.xml:
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<form-beans>
<form-bean name="ShowHomeForm" type="com.newcorp.form.ShowHomeForm" />
</form-beans>
<action-mappings>
<action path="/showWelcome"
type="com.newcorp.action.ShowWelcomeAction"
name="ShowHomeForm"
scope="request" >
<forward name="success" path="/JSP/welcome.jsp" />
<forward name="error" path="/JSP/errorPage.jsp" />
</action>
<action path="/showHome"
type="com.newcorp.action.ShowHomeAction"
name="ShowHomeForm"
scope="request" >
<forward name="success" path="/JSP/home.jsp" />
<forward name="failure" path="/JSP/errorPage.jsp" />
</action>
</action-mappings>
<message-resources parameter="ApplicationResources"/>
<plug-in className="net.sf.navigator.menu.MenuPlugIn">
<set-property property="menuConfig" value="/WEB-INF/menu-config.xml"/>
</plug-in>
</struts-config>
My menu-config.xml:
<?xml version="1.0" encoding='windows-1250'?>
<MenuConfig>
<Displayers>
<Displayer name="Simple"
type="java.net.sf.navigator.displayer.SimpleMenuDi splayer"/>
</Displayers>
<Menu name="projectMenu" title="projectMenu">
<Item title="Home" toolTip="Return to List of Menus" page="/home.jsp"/>
<Item title="Documentation" toolTip="View Project Documentation"
location="http://struts-menu.sf.net"/>
</Menu>
</MenuConfig>
My welcome.jsp page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page language="java"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<script src="./scripts/permissionsMenu-config.js"></script>
<script language="Javascript">
function submitForm(userAction)
{
document.forms[0].action=userAction;
document.forms[0].submit();
}
</script>
<html:form method="POST" action="/showHome">
<menu:useMenuDisplayer name="Simple" config="/templates/index.html">
<menu:displayMenu name="projectMenu"/>
</menu:useMenuDisplayer>
<table colspan=2>
<tr>
<td>Enter your Name:</td>
<td>
<html:text property="firstName" />
<input type="button" name="Submit" value="Submit" onclick="submitForm('/TestPrj/showHome.do')"; />
</td>
</tr>
</table>
</html:form>
Let me knw if this much is sufficient...
- 08-10-2007, 07:54 PM #4
Member
- Join Date
- Jul 2007
- Posts
- 44
- Rep Power
- 0
I tested it and it works
check your configurationsLast edited by simon; 08-10-2007 at 08:10 PM.
- 10-02-2009, 02:13 AM #5
Member
- Join Date
- Oct 2009
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
Problem with my first Struts program....please help me
By sireesha in forum Web FrameworksReplies: 5Last Post: 10-16-2011, 04:19 PM -
how to create Popup Menu with Sub Menu while right-clicking the JTree Node??
By Kabiraa in forum AWT / SwingReplies: 7Last Post: 05-09-2008, 07:54 AM -
in struts reset was problem
By sureshBabu in forum Web FrameworksReplies: 1Last Post: 05-07-2008, 03:26 PM -
Using SWT Menu
By Java Tip in forum Java TipReplies: 0Last Post: 01-09-2008, 12:04 PM -
Struts problem
By ziniestro in forum Web FrameworksReplies: 2Last Post: 05-10-2007, 05:41 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks