• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Getting Error While Populating Drop Down menue from Database :( !!

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

We are trying to populate a HTML drop down list with data collected from database. for this what we have done is, we created a bean and we collected the SQL results in ArrayList, this Array list has been set in the JSP like following:-

<html:select property="Depts" multiple="true" >
<html ptions collection="allDepartments" property="id" labelProperty="description"/>
</html:select>
Although we set the Collection in a bean with request scope, it gives us following error:-

javax.servlet.ServletException: Cannot find bean under name org.apache.struts.taglib.html.BEAN

Whereas, when we are trying to simply write this collection using <bean:write> it is displyaing all the collected values from the ArrayList. I think we are missing something or unable to get right approach. Kindly help in this regards

Thank you
Vikas
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does it work when you remove the html ptions tag but leave the html:select tag?
 
Vikas
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No way, it doesn't work
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic