Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JspException: Failed to obtain specified collection for Struts:optionscollection

 
Abhik Ghosh
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • 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..
 
Ninad Kulkarni
Ranch Hand
Posts: 802
Java Linux
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
web.xml


 
Ninad Kulkarni
Ranch Hand
Posts: 802
Java Linux
  • Mark post as helpful
  • send pies
  • 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 <htmlptionsCollection> . 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 <htmlptionsCollection> 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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic