Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can't display result

 
City Guy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if (rs != null){
while(rs.next()){
state_name = rs.getString("state_name");
event_name = rs.getString("event_name");
event_desp = rs.getString("event_desp");
event_start = rs.getString("event_start");
state_plc = rs.getString("state_plc");
}
if (rs == null)
{
please try again
}
The reseult "please try again" cannot be display...
it only display a blank page..
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi City Guy,
Are we speaking about Servlet code or JSP?
If it's a servlet, please replace -
please try againwith
out.println("please try again");
Cheers,
Dan
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Watch your braces... you missed one... (the second if statement is always false)
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

"City Guy"
your name doesn't agree with the javaranch guidelines.
please take a moment and re-register after reviewing the
guidelines at http://www.javaranch.com/name.jsp
please note fictious names donot qualify....
thanks for your cooperation.
- satya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic