Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-20-2007, 03:28 PM
sdp sdp is offline
Member
 
Join Date: Jul 2007
Posts: 2
sdp is on a distinguished road
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.
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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-20-2007, 04:16 PM
Member
 
Join Date: Jul 2007
Posts: 41
fred is on a distinguished road
please paste the code maybe I can help you
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-25-2007, 03:51 PM
sdp sdp is offline
Member
 
Join Date: Jul 2007
Posts: 2
sdp is on a distinguished road
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...
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 08-10-2007, 08:54 PM
Member
 
Join Date: Jul 2007
Posts: 44
simon is on a distinguished road
I tested it and it works
check your configurations

Last edited by simon : 08-10-2007 at 09:10 PM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create Popup Menu with Sub Menu while right-clicking the JTree Node?? Kabiraa AWT / Swing 7 05-09-2008 08:54 AM
in struts reset was problem sureshBabu Web Frameworks 1 05-07-2008 04:26 PM
Problem with my first Struts program....please help me sireesha Web Frameworks 4 04-04-2008 07:33 AM
Using SWT Menu Java Tip Java Tips 0 01-09-2008 01:04 PM
Struts problem ziniestro Web Frameworks 2 05-10-2007 06:41 PM


All times are GMT +3. The time now is 11:56 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org