You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Souravmay Das <me...@hotmail.com> on 2003/02/05 20:57:31 UTC

Struts menu not loading Help required

Hi ,
   I am having a stable struts version in my machine but wanted to go for struts-menu in order to 
have it up and running in my machine , I tried to change the init() functionality of ActionServlet
with following codes:

String menuConfig = this.getServletConfig().getInitParameter("menuConfig");
    if (menuConfig != null) {
      MenuRepository repository = new MenuRepository();
      repository.setLoadParam(menuConfig);
      repository.setServlet(this);

      try {
          repository.load();
          this.getServletContext().
              setAttribute(MenuRepository.MENU_REPOSITORY_KEY, repository);
      } catch (LoadableResourceException lre) 


also gave the required init parameters{menuConfig} in the web.xml file.

    When i start the server , init function fails with following errors.
java.lang.AbstractMethodError
        at org.apache.commons.digester.Digester.getXMLReader(Digester.java:607)
        at org.apache.commons.digester.Digester.parse(Digester.java:1302)
        at com.fgm.web.menu.MenuRepository.load(Unknown Source)
        at tavant.webutil.struts.action.ActionServlet.init(ActionServlet.java:56
)
        at javax.servlet.GenericServlet.init(GenericServlet.java:258)

Any idea how to load the repository , I donot mind hard coding it .but I donot want to use 
 unstable builds as it may have effects on other applications.

Regards,
Souravmay Das


Re: Struts menu not loading Help required

Posted by Vic Cekvenich <vc...@basebeans.com>.
You are possibly of track.

You just configure struts menu via XML and you are set, it emits JavaScript.
See the examples like baseBeans.com that uses struts menu (source in 
basicPortal.com), and the example that comes with struts menu war file.

.V

Souravmay Das wrote:
> Hi ,
>    I am having a stable struts version in my machine but wanted to go for struts-menu in order to 
> have it up and running in my machine , I tried to change the init() functionality of ActionServlet
> with following codes:
> 
> String menuConfig = this.getServletConfig().getInitParameter("menuConfig");
>     if (menuConfig != null) {
>       MenuRepository repository = new MenuRepository();
>       repository.setLoadParam(menuConfig);
>       repository.setServlet(this);
> 
>       try {
>           repository.load();
>           this.getServletContext().
>               setAttribute(MenuRepository.MENU_REPOSITORY_KEY, repository);
>       } catch (LoadableResourceException lre) 
> 
> 
> also gave the required init parameters{menuConfig} in the web.xml file.
> 
>     When i start the server , init function fails with following errors.
> java.lang.AbstractMethodError
>         at org.apache.commons.digester.Digester.getXMLReader(Digester.java:607)
>         at org.apache.commons.digester.Digester.parse(Digester.java:1302)
>         at com.fgm.web.menu.MenuRepository.load(Unknown Source)
>         at tavant.webutil.struts.action.ActionServlet.init(ActionServlet.java:56
> )
>         at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> 
> Any idea how to load the repository , I donot mind hard coding it .but I donot want to use 
>  unstable builds as it may have effects on other applications.
> 
> Regards,
> Souravmay Das
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org