How to return http status?

My application gets a request from an external server and it has to send a http 200 status back if the request was received successfully. If the requesting server does not get a response then it will try to send the request again. Now how do I send a status code 200 to the requesting server from a jsp ?

Thanks.

[325 byte] By [renumehta1a] at [2007-11-26 15:18:19]
# 1

This should work:

<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%

response.setStatus(HttpServletResponse.SC_OK);

%>

or

<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%

response.setStatus(200);

%>

But if a browser is making the request, it automatically returns HTTP 200 . I think even when another application is making a request, it automatically sends a 200 status in the header but I'm not sure about this.

appy77a at 2007-7-8 11:00:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
A status code 200 is default if you are request successfully.You need not set it because the jsp container will do it for you.I'm from china! My English is not very good. I hope everyone can directme!regards!yst1982
yst1982a at 2007-7-8 11:00:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...