aspose file tools*
The moose likes Struts and the fly likes JspException: Failed to obtain specified collection for Struts:optionscollection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "JspException: Failed to obtain specified collection for Struts:optionscollection" Watch "JspException: Failed to obtain specified collection for Struts:optionscollection" New topic
Author

JspException: Failed to obtain specified collection for Struts:optionscollection

Abhik Ghosh
Ranch Hand

Joined: Feb 28, 2008
Posts: 32
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

Joined: Aug 31, 2007
Posts: 802

Hi Abhik,
Would you show your web.xml?


SCJP 5.0 - JavaRanch FAQ - Java Beginners FAQ - SCJP FAQ - SCJP Mock Tests - Tutorial - JavaSE7 - JavaEE6 -Generics FAQ - JLS - JVM Spec - Java FAQs - Smart Questions
Abhik Ghosh
Ranch Hand

Joined: Feb 28, 2008
Posts: 32
web.xml


Ninad Kulkarni
Ranch Hand

Joined: Aug 31, 2007
Posts: 802

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.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JspException: Failed to obtain specified collection for Struts:optionscollection