Hi Folks,
This problem is regarding the Struts html taglib.
I'm succesfully using the <options> tag within a select tag to display a
drop down menu.
The problem is, if I set the list (an arraylist) as an attribute of the
request object, it works but throws a bunch of exceptions similar to
this one:
javax.servlet.jsp.JspException: Cannot find bean under name categoryList
The weird thing is that it works anyway. My menu displays fine.
So, instead of using the request variable, I try putting it in the
ServletContext in my action class:
request.getSession().getServletContext().setAttribute("categoryList",
categoryList);
This works fine, with no exeptions, but I really want to use request
scope for this. Does anyone know why it throws the exception saying it
can't find it, but obviously finds it?
code from the action class:
code from the .jsp page:
<html:select property="category">
<html:option value="ALL">All</html:option>
<html:options collection="categoryList" property="id"
labelProperty="name"/>
</html:select>
code from the Action class that works but throws no exception:
request.getSession().getServletContext().setAttribute("categoryList",
categoryList);
code from the Action class that works but throws a bunch of similar
exceptions:
request.setAttribute("categoryList", categoryList);
Thanks a lot.
--
Dustin Aleksiuk
Tools and Practices Team
TransCanada Tower - 2564A
403-920-5744
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>