<%@ taglib uri="jstl/c" prefix="c" %>
<%@ taglib uri="struts/tiles" prefix="tiles" %>
<%@ taglib uri="struts/bean" prefix="bean" %>
<%@ taglib uri="struts/logic" prefix="logic" %>
<%@ taglib uri="struts/html" prefix="html" %>
<%@ taglib uri="http://struts-menu.sf.net/tag" prefix="menu" %>
<%@ page import="edu.ncsu.lib.ematrix.framework.mappings.MenuItem, java.lang.String" %>
<%@ taglib uri="http://struts-menu.sf.net/tag" prefix="menu" %>
<%@ include file="/pages/common/taglibs.jsp"%>
<menu:useMenuDisplayer name="Simple" bundle="org.apache.struts.action.MESSAGE">
<table cellpadding=0 cellspacing=0>
<tr>
<td>
<menu:displayMenu name="ToDoListMenuFile"/>
</td>
</tr> </table>
</menu:useMenuDisplayer>
Could you tell me how to use the struts tags within my tile? Thanks for your help.
Sandy
Matt Raible wrote:
It looks to me like it's not finding your resource bundle. Are you using the EL tag or just the regular one?
Matt
Sandra Logeson wrote:
Hello,
I'm trying to get a simple menu to display and I'm getting "??? en_US." before all of my menu titles. Does anyone know what I'm doing wrong?
------------------------
my menu-config.xml
------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<MenuConfig>
<Displayers>
<Displayer name="DropDown" type="net.sf.navigator.displayer.DropDownMenuDisplayer"/>
<Displayer name="Simple" type="net.sf.navigator.displayer.SimpleMenuDisplayer"/>
<Displayer name="CoolMenu" type="net.sf.navigator.displayer.CoolMenuDisplayer"/>
<Displayer name="CoolMenu4" type="net.sf.navigator.displayer.CoolMenuDisplayer4"/>
<Displayer name="MenuForm" type="net.sf.navigator.example.PermissionsFormMenuDisplayer"/>
<Displayer name="ListMenu" type="net.sf.navigator.displayer.ListMenuDisplayer"/>
<Displayer name="TabbedMenu" type="net.sf.navigator.displayer.TabbedMenuDisplayer"/>
<Displayer name="Velocity" type="net.sf.navigator.displayer.VelocityMenuDisplayer"/>
</Displayers>
<Menus> <Menu name="ToDoListMenuFile" title="File" description="test" width="50">
<Item name="Main" title="Main">
<Item name="Acquisitions" title="Acquisitions"
image="/images/case-new.png"
page="/pages/acquisitions/acqdetail.jsp"/>
<Item name="Resource" title="Resource"
image="/images/item-new.png"
page="/pages/common/resourceSearch.jsp"/>
<Item name="CEP" title="CEP"
image="/images/party-new.png"
page="/cep.do"/>
</Item>
<Item name="TDLexit" title="Exit"
image="/images/exit.png"
page="/index.jsp"/>
</Menu>
</Menus>
</MenuConfig>
------------------------ my struts-config.xml ------------------------ <?xml version="1.0" encoding="UTF-8"?>
<!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="associateForm" type="org.apache.struts.validator.DynaValidatorForm"> <form-property name="associate_id" type="java.lang.Integer"/>
<form-property name="first_name" type="java.lang.String"/>
<form-property name="last_name" type="java.lang.String"/>
<form-property name="addr_line1" type="java.lang.String"/>
<form-property name="addr_line2" type="java.lang.String"/>
<form-property name="city" type="java.lang.String"/>
<form-property name="state" type="java.lang.String"/>
<form-property name="zip" type="java.lang.String"/>
<form-property name="title" type="java.lang.String"/>
<form-property name="url" type="java.lang.String"/>
<form-property name="email_1" type="java.lang.String"/>
<form-property name="email_2" type="java.lang.String"/>
<form-property name="phone_1" type="java.lang.String"/>
<form-property name="phone_2" type="java.lang.String"/>
<form-property name="fax_num" type="java.lang.String"/>
<form-property name="department" type="java.lang.String"/>
</form-bean>
<form-bean name="keywordSearchForm" type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="resourceType" type="java.lang.String" initial="journal"/>
<form-property name="keyword" type="java.lang.String"/>
<form-property name="searchFormat" type="java.lang.String[]" initial="print"/>
<form-property name="dispatch" type="java.lang.String"/>
</form-bean> </form-beans>
<!--global-exceptions>
<exception key="global.exception"
type="java.lang.Exception"
handler="edu.ncsu.lib.ematrix.framework.exceptions.SpecialExceptionHandler"
path="/pages/common/error.jsp"
scope="request"/>
</global-exceptions-->
<global-forwards>
<forward name="welcome"
path="viewsignin.do?dispatch=login"/> </global-forwards>
<action-mappings>
<action path="/browseResource"
type="edu.ncsu.lib.ematrix.action.SearchAction"
parameter="dispatch">
<forward name="Success" path="/pages/common/searchResults.jsp"/>
<forward name="Failure" path="/pages/common/error.jsp"/>
</action>
<!-- action for cep -->
<action path="/cep"
type="edu.ncsu.lib.ematrix.action.CepAction"
name="cepInfoForm">
<forward name="login"
path="/index.jsp"/>
<forward name="error"
path="/pages/cep/error.jsp"/>
<forward name="entry"
path="/pages/cep/entryTile.jsp"/>
<forward name="update"
path="/pages/cep/updateTile.jsp"/>
<forward name="review-entry"
path="/pages/cep/rev-entryTile.jsp"/>
<forward name="review-update"
path="/pages/cep/rev-updateTile.jsp"/>
<forward name="success"
path="/pages/cep/successTile.jsp"/>
</action>
<action path="/getResource"
type="edu.ncsu.lib.ematrix.action.ResourceAction"
parameter="dispatch">
<forward name="Success" path="/pages/common/searchResults.jsp"/>
<forward name="Failure" path="/pages/common/error.jsp"/>
</action>
<action path="/searchResource"
type="edu.ncsu.lib.ematrix.action.SearchAction"
parameter="dispatch"
name="keywordSearchForm"
validate="true"
input="/pages/common/resourceSearch.jsp">
<forward name="Success" path="/pages/common/searchResults.jsp"/>
<forward name="Failure" path="/pages/common/error.jsp"/>
</action>
<action path="/viewsignin"
type="edu.ncsu.lib.ematrix.action.LoginAction"
parameter="dispatch"> <forward name="Success" path="/userMenu.jsp"/>
<forward name="Failure" path="/pages/common/error.jsp"/> </action>
<!--action path="/sort"
type="fr.improve.struts.taglib.layout.sort.SortAction"
scope="request"
validate="false">
</action-->
<!--action path="/treeview"
type="fr.improve.struts.taglib.layout.treeview.TreeviewAction">
</action-->
</action-mappings>
<!--message-resources parameter="/WEB-INF/classes/edu/ncsu/lib/ematrix/conf/ApplicationResources" /-->
<message-resources parameter="ApplicationResources" null="false" />
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config" value="/WEB-INF/classes/edu/ncsu/lib/ematrix/conf/tiles-defs.xml"/>
<set-property property="definitions-debug" value="1"/> </plug-in>
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/classes/edu/ncsu/lib/ematrix/conf/validator-rules.xml, /WEB-INF/classes/edu/ncsu/lib/ematrix/conf/validation.xml"/>
</plug-in>
<plug-in className="net.sf.navigator.menu.MenuPlugIn">
<set-property property="menuConfig" value="/WEB-INF/classes/edu/ncsu/lib/ematrix/conf/menu-config.xml"/>
</plug-in>
</struts-config>
------------------------ my web.xml ------------------------ <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Ematrix version 1.0</display-name> <servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<!--servlet-class>org.apache.struts.tiles.ActionComponentServlet</servlet-class-->
<init-param>
<param-name>application</param-name>
<param-value>/WEB-INF/classesedu/ncsu/lib/ematrix/conf/ApplicationResources</param-value>
</init-param>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/classes/edu/ncsu/lib/ematrix/conf/struts-config.xml</param-value>
</init-param>
<!--init-param>
<param-name>definitions-config</param-name>
<param-value>/WEB-INF/classes/edu/ncsu/lib/ematrix/conf/tiles-defs.xml</param-value>
</init-param--> <init-param> <param-name>debug</param-name> <param-value>3</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>3</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet>
<servlet>
<servlet-name>setupServlet</servlet-name>
<servlet-class>edu.ncsu.lib.ematrix.framework.SetupServlet</servlet-class>
<load-on-startup>1</load-on-startup> </servlet>
<!-- Action Servlet Mapping --> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping>
<!-- The Welcome File List --> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list>
<!-- tag libs -->
<taglib>
<taglib-uri>jstl/c</taglib-uri>
<taglib-location>/WEB-INF/lib/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>struts/bean-el</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-bean-el.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>struts/bean</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-bean.tld</taglib-location>
</taglib>
<taglib> <taglib-uri>struts/html</taglib-uri> <taglib-location>/WEB-INF/lib/struts-html.tld</taglib-location> </taglib>
<taglib>
<taglib-uri>struts/html-el</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-html-el.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>struts/layout</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-layout.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>struts/logic</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>struts/logic-el</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-logic-el.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>struts/menu</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-menu.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>struts/menu-el</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-menu-el.tld</taglib-location>
</taglib> <taglib>
<taglib-uri>struts/tiles</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-tiles.tld</taglib-location>
</taglib>
<!-- resource def -->
<resource-ref>
<res-ref-name>jdbc/ematrixDatasource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
I apologize for the long post.
------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/struts-menu-user
------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/struts-menu-user
------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/struts-menu-user
