SubString error..

Reply

Join Date: Aug 2007
Posts: 62
Reputation: mimsc is an unknown quantity at this point 
Solved Threads: 0
mimsc mimsc is offline Offline
Junior Poster in Training

SubString error..

 
0
  #1
Jul 8th, 2009
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:

  1. <INPUT TYPE="hidden" NAME="username"VALUE="<=username>"/>
  2. <INPUT TYPE="hidden" NAME="password" VALUE="<%=password%>"/>
  3. <div>
  4. <fieldset class="column box4fade">
  5. <h4>Home Seller's Report</h4>
  6. <p class="marginTopBump4">Please select a listing to generate a homeseller's report for and click "Proceed."
  7. </p>
  8. <div class="marginTopBump4 width13">
  9. <select name="business_state" class="fullBox3">
  10. <%
  11. for (int i=0;i<homeList.size();i++) {
  12. %>
  13.  
  14. <option value="<%=(String)homeList.elementAt(i).subString((String)homeList.elementAt(i).indexOf("("),(String)homeList.elementAt(i).indexOf(")")+1)%>"><%=(String)homeList.elementAt(i)%></option>
  15.  
  16.  
  17. <%
  18. }
  19. %>
  20.  
  21. </select>

can somebody tell me where Im going wrong?

thanx
Last edited by mimsc; Jul 8th, 2009 at 5:18 pm. Reason: code
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,612
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 464
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven

Re: SubString error..

 
0
  #2
Jul 9th, 2009
mimsc,
Where is the line #88? Post complete code and also show us the value of homeList.
Last edited by adatapost; Jul 9th, 2009 at 3:40 am.
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 62
Reputation: mimsc is an unknown quantity at this point 
Solved Threads: 0
mimsc mimsc is offline Offline
Junior Poster in Training

Re: SubString error..

 
0
  #3
Jul 9th, 2009
thanx for the reply...I threw the vector into a string array instead
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 21
Reputation: hkansal is an unknown quantity at this point 
Solved Threads: 3
hkansal's Avatar
hkansal hkansal is offline Offline
Newbie Poster

Re: SubString error..

 
0
  #4
Jul 10th, 2009
should have used .toString() instead of (String). The problem you got was because of dereferencing the object returned.
I might be new to a language; but familiar with 'logic' mail_me
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC