Solved

struts error!!

Posted on 2004-04-02
2
547 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
console vs log file 16 81
countXY challenge 28 153
null output 3 25
jsp login check 12 32
Knowing where your website is hosted is as important as the features you receive, the monthly fee, and the support you receive. Due diligence should be done when choosing your next hosting provider.
Google always has something new and amazing up its sleeve, and the most current thing that they have been working on is another step in the evolution of Google Search, from machine learning to its brilliant successor, deep learning.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

821 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