Getting response from servlet

Hi

I've a servlet that handles the database connection. I'm calling this servlet from my java file. If the servlet is successfull in getting a connection to the database, it should return 1 to the java program that calls the servlet else it should return 0.ie I need to pass an integer value from my servlet as response.Is there any way to do that?

Thanks in advance

[387 byte] By [Ruthsa] at [2007-10-3 0:29:59]
# 1
if the doGet method //check if the connection is successful..................ServletOutputStream out = response.getOutputStream();out.print("1");
amitteva at 2007-7-14 17:23:03 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...