Solved

struts error!!

Posted on 2004-04-02
2
541 Views
Last Modified: 2010-04-01
Hi,

I have a enclosing form(form bean) for my JSP page.

In the JSP page for one of the drop down boxs i am populating the data from a Arraylist, which is not part of my form bean
Here is my code
<html:select property="service" size="1" >
<html:options collection="<%=WebConstants.SERVICE_NAMES_LIST%>" property="serviceValues" labelProperty="serviceNames" />      </html:select>

Here "service" is a instance variable of the enclosing form(form bean of the page), it has getter method.

It's populating data into the drop down box, everything is fine till the show of the page.
When i click submit button, it suppose to read the selected value into the enclosing bean(i.e the form bean of the page).
I don't know what the reason is, but it's failing.
It's giving the follwoing error

SRVE0026E: [Servlet Error]-[Cannot find bean under name ServiceNameList]: javax.servlet.jsp.JspException: Cannot find bean under name ServiceNameList
      at org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:407)

What am i doing wrong? Please correct me.

Thanks
0
Comment
Question by:mvkraju
2 Comments
 
LVL 14

Accepted Solution

by:
kennethxu earned 50 total points
ID: 10743875
>> In the JSP page for one of the drop down boxs i am populating the data from a Arraylist
after you submit, you need to regenereate the ArrayList. or keep the ArrayList in session scope.
0
 

Author Comment

by:mvkraju
ID: 10743975
i want to keep it in the session scope.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
String format issue 13 88
iterator example remove 8 74
love6 challenge java 31 128
java operators 3 90
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
In this article, I show you step by step with screenshots to assist you - HOW TO: Deploy and Install the VMware vCenter Server Appliance 6.5 (VCSA 6.5), with some helpful tips along the way.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now