• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JspException: Failed to obtain specified collection for Struts:optionscollection

 
Ranch Hand
Posts: 32
  • 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 develop a dropdown using OptionsCollection but I get the above error.
A solution will be greatly appreciated.
Here is my code:

index.jsp



struts-config.xml



Inputform.java



InputAction.java



CountryData.java



Thanks..
 
Ranch Hand
Posts: 814
Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Abhik,
Would you show your web.xml?
 
Abhik Ghosh
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
web.xml


 
Ninad Kulkarni
Ranch Hand
Posts: 814
Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All members,

I have gone through many struts related sites and threads on JavaRanch forum about runtime problem obtained using struts tag <html:optionsCollection> . I have seen that it is not resolved yet completely.
I gone through one Struts HTML Tag site and made some changes in the code according to that.
By doing some changes optionsCollection tag is working fine but giving error at runtime.
Why "JspException: Failed to obtain specified collection" error obtained at runtime even <html:optionsCollection> tag working fine?

The link to source strutsapp.zip file is given below. Source contains files of interest.
strutsapp.zip
Source is created using NetBeans 6.8 after clean task performed.

To use source perform following steps
1. Unzip to a folder
2. Open it with NetBeans 6.8
3. Perform clean and build task using netbeans
4. Run application

Please notify if I am wrong somewhere.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic