Results 1 to 5 of 5
  1. #1
    sdp
    sdp is offline Member
    Join Date
    Jul 2007
    Posts
    2
    Rep Power
    0

    Default 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

  2. #2
    fred is offline Member
    Join Date
    Jul 2007
    Posts
    41
    Rep Power
    0

    Default

    please paste the code maybe I can help you
    ;)

  3. #3
    sdp
    sdp is offline Member
    Join Date
    Jul 2007
    Posts
    2
    Rep Power
    0

    Default

    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...

  4. #4
    simon is offline Member
    Join Date
    Jul 2007
    Posts
    44
    Rep Power
    0

    Default

    I tested it and it works
    check your configurations
    Last edited by simon; 08-10-2007 at 09:10 PM.

  5. #5
    cdene is offline Member
    Join Date
    Oct 2009
    Posts
    2
    Rep Power
    0

    Default

    i am having similar problem. what other configs to check, please help?

Similar Threads

  1. Problem with my first Struts program....please help me
    By sireesha in forum Web Frameworks
    Replies: 5
    Last Post: 10-16-2011, 05:19 PM
  2. Replies: 7
    Last Post: 05-09-2008, 08:54 AM
  3. in struts reset was problem
    By sureshBabu in forum Web Frameworks
    Replies: 1
    Last Post: 05-07-2008, 04:26 PM
  4. Using SWT Menu
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-09-2008, 01:04 PM
  5. Struts problem
    By ziniestro in forum Web Frameworks
    Replies: 2
    Last Post: 05-10-2007, 06:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •