• 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

Combo-box not displaying in JSP

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello to all the ranchers n greenhorns like me.. i am making a form in Struts2 that takes values from database..and i am having problem in combo-box..
here's the content of mu project that is related to the current problem ...

stuts.xml :





MaritalStatusList.java




PersonalDetailsAction.java:




DAOPersonalDetails.java:




registration.jsp





now the problem is that when its nor displaying the combobox..but when i am using the config-browser to see the action..the whole page is displayed correctly with combobox having list containing "name" from the MaritalStatusList class with values from the database!!!

i am getting the following errors on log:

Feb 16, 2012 8:10:14 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: No configuration found for the specified action: '/registration.jsp' in namespace: ''. Form action defaulting to 'action' attribute's literal value.


Here i am getting all the statements of System.out.println();

Feb 16, 2012 8:10:14 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Caught an exception while evaluating expression 'maritalstatuslistlist.{name}' against value stack
java.lang.NullPointerException

Feb 16, 2012 8:10:14 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: NOTE: Previous warning message was issued due to devMode set to true.
Feb 16, 2012 8:10:14 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
tag 'combobox', field 'list', name 'maritalstatuslistlist': You must specify a collection/array/map/enumeration/iterator. Example: people or people.{name} - [unknown location]



i think there is a problem with my jsp...please help me figure it out..

Thanks in advance n Cheerzz!!!
 
Ranch Hand
Posts: 384
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,

I think you need to specify 'action' attribute in your <s:form> inside registration.jsp

and also ... try these changes inside the <s:combobox>



Hope this works for you ...
 
Sachin Negi
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your help..i have changed this a little bit and have called the action from the the jsp in which i had made the menu aND ITS WORKING FINE FOR ME AND i have used the format like you have told me and its working...
Thanks for your help..
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic