Hi All, 

 

I have a jsp page that I am trying to run on Tomcat that currently works in
Weblogic. It appears the primary problem is that the forEach tag is not
putting the variable menuItem into the pageContext attributes and or it
thinks the menuItem is of type String. I am not sure where my actually
problem is (tiles, tomcat etc).

 

 

It appears Tomcat is generating code when compiling the JSP that isn't aware
of the type of class the org.apache.struts.tiles.beans.SimpleMenuItem is -
it looks like at run time it thinks it is a String.  

 

 

A snippet of my JSP looks like this (jstl tags - partial):

<core:forEach var="menuItem" varStatus="status" items="${topnav}">

<core:choose>

 <core:when test="${menuItem.tooltip=='help'}">

 

 

my tiles def looks like this (partial):

<putList name="topnav">

      <item value="nav.item1" tooltip="impersonationItem"
link="/myaction.do"

        classtype="org.apache.struts.tiles.beans.SimpleMenuItem"/>


 

and the generated servlet code looks like this - Is Jasper not compiling
this correctly??? 

 

_jspx_th_core_when_0.setTest((java.lang.String)

org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${menuItem.to

oltip=='help'}", java.lang.String.class, (PageContext)_jspx_page_context,
null, false));

 

 

And when the page runs I get this serlet exception:

 

ServletException in:/menu.do?menu=topnav] Unable to find a value for
"tooltip" in object of class "java.lang.String" using operator "."' 

 

 

When I check the pageContext attributes via a debugger I actually see an
item in the collection with the key "topnav" and it contains a Vector of
items that appear to be of type SimpleMenuItem. However I never see the item
called menuItem that I thought the forEach tag would place in there for me.

 

Thanks for any help you may be able to provide,

 

Jerry Rodgers

 

 

 

Reply via email to