• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

html:options collection tag help URGENT

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am trying to populate a <html:select> box with values from database,
and the code for that is as follows:
<html:select name="InboxForm" property="userWorkGroup">
<html ptions collection="userWorkGroup" scope="request" property="id" labelProperty="description"/>
</html:select>
and i defined a java.util.Collection variable in the ActionForm with the name userWorkGroup and my config file looks as :
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<!-- ========== Form Bean Definitions =================================== -->
<form-beans>
<form-bean name="LoginForm" type="com.lmig.cmit.indep2.login.LoginForm"/>
<form-bean name="InboxForm" type="com.lmig.cmit.indep2.inbox.InboxForm"/>
</form-beans>

<!-- ========== Global Forward Definitions ========= -->
<global-forwards>
<forward name="home" path="/main.jsp?displayJSP=home" />
</global-forwards>
<!-- ========== Action Mapping Definitions ============================== -->
<action-mappings>
<action
path="/login"
type="com.lmig.cmit.indep2.login.LoginAction"
name="LoginForm"
input="/login.jsp"
validate="true">
<forward name="valid" path="/main.jsp?displayJSP=inbox"/>
</action>
<action
path="/setUpInboxForm"
type="com.lmig.cmit.indep2.inbox.SetUpInboxAction"
name="InboxForm"
scope="session"
validate="true">
<forward name="continue" path="/main.jsp?displayJSP=inbox" />
</action>
<action
path="/inboxAction"
type="com.lmig.cmit.indep2.inbox.InboxAction"
name="InboxForm"
scope="session"
validate="true"
input="/main.jsp?displayJSP=inbox">
<forward name="valid" path="/main.jsp?displayJSP=home" />
</action>
</action-mappings>
<!-- ========== Associated Request Processor settings =================== -->
<!-- Here we specify the tiles processor -->
<controller processorClass="org.apache.struts.tiles.TilesRequestProcessor" />
<!-- ========== Message Resources Definitions =========================== -->
<message-resources parameter="ApplicationResources" />
</struts-config>
But when i try to run the application i always get the error :
----- Root Cause -----
javax.servlet.jsp.JspException: Cannot find bean userWorkGroup in scope request
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:692)
at org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java:227)
at org.apache.jsp.inbox$jsp._jspService(inbox$jsp.java:136)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
Anyone who were hit this error earlier may please help me..
It is urgent.
Thanks in adv.
Partha
 
Can you shoot lasers out of your eyes? Don't look at this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic