Hey Fellas...Im getting this error on a "select box"...im trying to parse some info:

PWC6197: An error occurred at line: 88 in the jsp file: /jsp/cpanel/HomeSellerList.jsp
PWC6199: Generated servlet error:
string:///HomeSellerList_jsp.java:147: cannot find symbol
symbol : method indexOf(java.lang.String)
location: class java.lang.Object

PWC6197: An error occurred at line: 88 in the jsp file: /jsp/cpanel/HomeSellerList.jsp
PWC6199: Generated servlet error:
string:///HomeSellerList_jsp.java:147: cannot find symbol
symbol : method indexOf(java.lang.String)
location: class java.lang.Object

PWC6197: An error occurred at line: 88 in the jsp file: /jsp/cpanel/HomeSellerList.jsp
PWC6199: Generated servlet error:
string:///HomeSellerList_jsp.java:147: cannot find symbol
symbol : method subString(java.lang.String,java.lang.String)
location: class java.lang.Object

============================
jsp:

<INPUT TYPE="hidden" NAME="username"VALUE="<=username>"/>
<INPUT TYPE="hidden" NAME="password" VALUE="<%=password%>"/>
<div>
<fieldset class="column box4fade">
<h4>Home Seller's Report</h4>
<p class="marginTopBump4">Please select a listing to generate a homeseller's report for and click "Proceed."
</p>
<div class="marginTopBump4 width13">
<select name="business_state" class="fullBox3">
<%
    for (int i=0;i<homeList.size();i++) {
    %>
                           	
<option value="<%=(String)homeList.elementAt(i).subString((String)homeList.elementAt(i).indexOf("("),(String)homeList.elementAt(i).indexOf(")")+1)%>"><%=(String)homeList.elementAt(i)%></option>


<%   
}
%>
                           	
</select>

can somebody tell me where Im going wrong?

thanx

Recommended Answers

All 3 Replies

mimsc,
Where is the line #88? Post complete code and also show us the value of homeList.

thanx for the reply...I threw the vector into a string array instead

should have used .toString() instead of (String). The problem you got was because of dereferencing the object returned.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.