dcsimg
How to come back to servlet after control goes to URL in resp.sendRedirect (URL)?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rav_S
Posted On:   Monday, July 18, 2011 05:51 AM

Preview: Hi .. Am using below code, to extract phone nos. from database , one by one , and I want to send SMS to each of those one by one , as and when extracted. For c2='xxXX' , it's extracting mobile no. from column c1. But I have kept resp.sendRedirect in while loop. In the very first loop control is going to URL in resp.sendRedirect(URL), but after sending first SMS , control is not comin to back to servelet. Please help. :( PreparedStatement p1 = cn.prepareStatement("select c1 from xldata where c2='xxXX'"); ResultSet rs1 = p1.executeQuery(); while(rs1.next()) { mobile = "" + rs1.getString("c1"); System.out.println("Getting mobile det   More>>

Preview:

Hi .. Am using below code, to extract phone nos. from database , one by one , and I want to send SMS to each of those one by one , as and when extracted. For c2='xxXX' , it's extracting mobile no. from column c1.

But I have kept resp.sendRedirect in while loop. In the very first loop control is going to URL in resp.sendRedirect(URL), but after sending first SMS , control is not comin to back to servelet. Please help. :(


PreparedStatement p1 = cn.prepareStatement("select c1 from xldata where c2='xxXX'");

ResultSet rs1 = p1.executeQuery();
while(rs1.next())
{
mobile = "" + rs1.getString("c1");

System.out.println("Getting mobile details "+incr);
a[incr]=mobile;
incr++;
String URL"http://127.0.0.1:8800/?PhoneNumber="+mobile+ "&text=Your regd. no.in our records is:"+mobile ;
resp.sendRedirect(URL);
System.out.println("SMS Sent");


}







Thanx, RSingh

   <<Less
About | Sitemap | Contact