Solved

struts error!!

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Running Java Servlet inside Eclipse Luna 6 147
Images won't display in JSP pages 30 179
Using Tomcat as raspberry pi java app server 13 134
thymeleaf natural templating vs JSP 2 65
Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

939 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

8 Experts available now in Live!

Get 1:1 Help Now