Re: Problem puting repository into scope

Matt Raible <[email protected]>
Newsgroups gmane.comp.java.struts-menu.user
Message-ID <[email protected]>
I've never tried to set the repository from a JSP - only from a filter or
action.  Can you try that?

BTW - I had to approve this message as you aren't subscribed to the mailing
list.

Matt

On 1/10/06, Danny Lee <[email protected]> wrote:
>
> Hi,
> I've just posted this stuff into sourceforge SM forum, but it bacame a
> mess becouse of all the special symbols, so here again:
>
> I have really strange problem, when putting the repository into the scope.
>
> If I use FormBean as:
>
> <bean:define id="myRepo" name="showMenuForm" property="repository"/>
>
> everything works just fine, but if I wan't to avoid using bean and just
> put the Repository into session-context, there's an error:
>
> <c:set var="depo" value="menuRepository"/>
> <bean:define id="myRepo2" value="${sessionScope[depo]}"/>
>
> so using of "myRepo2" instead of "myRepo" in
>
> <menu:useMenuDisplayer name="ListMenu" repository="myRepo">
>
> leads to this exception:
>
> java.lang.ClassCastException: java.lang.String
> net.sf.navigator.taglib.UseMenuDisplayerTag.doStartTag(
> UseMenuDisplayerTag.java:141)
>
> org.apache.jsp.jsp.showMenu_jsp._jspx_meth_menu_useMenuDisplayer_0(
> org.apache.jsp.jsp.showMenu_jsp:310)
>
> org.apache.jsp.jsp.showMenu_jsp._jspService(
> org.apache.jsp.jsp.showMenu_jsp:174)
>
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> ...
>
> Well, if I do ${myRepo2} = ${myRepo} in my JSP I get correct output:
>
> net.sf.navigator.menu.MenuRepository@60e277 =
> net.sf.navigator.menu.MenuRepository@60e277
>
> Well, it seams that myRepo2 == myRepo, so why there's an error??? Or am
> I just forced to use a FormBean for this stuff?
>
> Thanks in advance,
>
> Danny Lee
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> 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.