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 I tried casting the Vector to a string...

thanx

why are you casting everything to a string? for starters .subString will in fact return a string, and subString doesn't take parameters of (String, String).

This article has been dead for over six months. Start a new discussion instead.