Re: config attribute in menu:useMenuDisplayer

[email protected] (Kevin Drennen ([email protected]))
Newsgroups gmane.comp.java.struts-menu.user
Message-ID <112220050055.15454.43826C790000C8F100003C5E2200735446020A02020A9D0B0207900A05@comcast.net>
We are using Servlet 2.3.

I could not get config="${pageContext.request.contextPath}/resources/menu/xtree.htm", config='<%= request.getContextPath() + "/resources/menu/xtree.htm" %>', or even config="/testapp/resources/menu/xtree.htm. The ${} variable failed. The other two tries produced this example:

[2005-11-21 19:44:39,540] ERROR ServletException in '/pages/tiles/side_secure.jsp': Error initializing Velocity: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource '/testapp/resources/menu/xtree.htm'
javax.servlet.ServletException: javax.servlet.jsp.JspException: Error initializing Velocity: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource '/testapp/resources/menu/xtree.htm'
The only thing that worked under tomcat was config="../../resources/menu/xtree.htm". But this will not work under WAS. Other than testing to see what the kind of server deployed, I don't know how to handle this. My dev env is Tomcat 5 and deployment env is WAS on AIX.

Any suggestions from anyone would help.

Kevin
-------------- Original message -------------- 

> That should work, since it's more of a JSP feature than a Struts Menu 
> one. Are you using Servlet 2.4? If so, you can probably use 
> something like this: 
> 
> src="${pageContext.request.contextPath}/resources/menu/xtree.htm" 
> 
> Matt 
> 
> On 11/21/05, Kevin Drennen ([email protected]) 
> wrote: 
> > 
> > Can the config attribute in menu:useMenuDisplayer accept a syntax like 
> > src="">? I am 
> > having trouble setting this and I need to point to a directory that is 
> > different from where my menu jsp is located. My jsp is located in 
> > /pages/tiles vs. the ctree.htm is located in /resources/menu/. 
> > 
> > I used config="../../resources/menu/xtree.htm" and that 
> > worked for Tomcat 5.x but not WAS 6. It gave me an error stating that the 
> > resource could not be found. 
> > 
> > Any help would be appreciative. 
> 
> 
> ------------------------------------------------------- 
> This SF.Net email is sponsored by the JBoss Inc. Get Certified Today 
> Register for a JBoss Training Course. Free Certification Exam 
> for All Training Attendees Through End of 2005. For more info visit: 
> http://ads.osdn.com/?ad_idv28&alloc_id845&op ick 
> _______________________________________________ 
> struts-menu-user mailing list 
> struts-menu-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org 
> https://lists.sourceforge.net/lists/listinfo/struts-menu-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.