Olá Pessoal,
Estou com uma dúvida de como se configura o Struts Menu para trabalhar com Struts2.
Encontro muitas citações na net, mais a maioria fala de trabalhar com Struts Menu no Struts 1,de como se configura o
struts-config.xml, mas no Struts2 não é esse arquivo e sim o strus.xml .
Todas que encontro, não explicam como configura , nem no site oficial.
Estou tentando dessa maneira de acordo com o site oficial e blog´s de como se trabalha com Struts Menu sem o strtus.
Mas dá um erro quando compilo no NetBenns
Acho que o erro está, em não se achar o pacote
net.sf.navigator.menu.MenuContextListener
Pois o erro que me aparece no browser é esse
The requested resource (/PrecisionInformatica/) is not available.
E se eu tiro a tag <listener>,funciona normalmente
Já tentei colocar o arquivo strtus-menu-2.4.3.jar nas pastas
..\apache-tomcat-5.5.17\common\lib\
..\apache-tomcat-5.5.17\server\lib\
..\Web-inf da minha aplicação
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>PrecisionInformatica</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<context-param>
<param-name>menuConfigLocation</param-name>
<param-value>/WEB-INF/menu-config.xml</param-value>
</context-param>
[b]
<listener>
<listener-class>net.sf.navigator.menu.MenuContextListener</listener-class>
</listener>
[/b]
<welcome-file-list>
<welcome-file>
index.jsp
</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>http://struts.apache.org/tags-html</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-html.tld</taglib-location>
</taglib>
-</web-app>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<include file="struts-default.xml" />
<package name="default" extends="struts-default">
<action name="login!*" method="{1}" class="br.com.precisioninformatica.actions.login.LoginAction" >
<result name="invalid">/login/errologin.jsp</result>
<result name="valid">/extranet/menuextranet.jsp</result>
</action>
</package>
[b]
<bean id="menu" Class="net.sf.navigator.menu.MenuLoader">
<property name="menuConfig" value="/WEB-INF/menu-config.xml"/>
</bean>
[/b]
</struts>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts-menu.sf.net/tag" prefix="menu" %>
<%@ taglib uri="http://struts-menu.sf.net/tag-el" prefix="menu-el" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/scripts/strutsmenu/coolmenus4.js"></script>
<script type="text/javascript" src="/scripts/strutsmenu/cm_addins.js"></script>
<script type="text/javascript" src="/scripts/strutsmenu/coolmenu4-config.js"></script>
<title>Mundo Precision</title>
<s:head theme="ajax"/>
</head>
<body>
<div style="position:absolute; left:40px; top:6px;" >
<menu:useMenuDisplayer name="CoolMenu4" bundle="org.apache.struts.action.MESSAGE">
<menu:displayMenu name="ToDoListMenuFile"/>
<menu:displayMenu name="ToDoListMenuEdit"/>
<menu:displayMenu name="CaseDetailMenuCase"/>
</menu:useMenuDisplayer>
</div>
<table>
<tr>
<th colspan="4pt"><br>Bem Vindo <s:property value="username"/><br></th>
<th><a ><br><i>Logout</i><br></a></th>
</tr>
</table>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/scripts/strutsmenu/coolmenus4.js"></script>
<script type="text/javascript" src="/scripts/strutsmenu/cm_addins.js"></script>
<script type="text/javascript" src="/scripts/strutsmenu/coolmenu4-config.js"></script>
<title>Mundo Precision</title>
<link rel="stylesheet" href="/PrecisionInformatica/struts/xhtml/styles.css" type="text/css"/>
<script language="JavaScript" type="text/javascript">
// Dojo configuration
djConfig = {
baseRelativePath: "/PrecisionInformatica/struts/dojo",
isDebug: false,
bindEncoding: "UTF-8",
debugAtAllCosts: true // not needed, but allows the Venkman debugger to work with the includes
};
</script>
<script language="JavaScript" type="text/javascript"
src="/PrecisionInformatica/struts/dojo/dojo.js"></script>
<script language="JavaScript" type="text/javascript"
src="/PrecisionInformatica/struts/simple/dojoRequire.js"></script>
<script language="JavaScript" type="text/javascript"
src="/PrecisionInformatica/struts/ajax/dojoRequire.js"></script>
<script language="JavaScript" type="text/javascript"
src="/PrecisionInformatica/struts/CommonFunctions.js"></script>
Se alguém puder me ajudar, agradeço.