I've set up the HttpInvoker on the client using commons httpclient. Our server application relies on our own authentication. I'm wrapping the client calls with a HttpClient, HttpState objects to pass BASIC authentication headers.
If user credentials cannot be authenticated on the server I want to send an exception back to the user.
Currently we are using a Filter.
code....
doFilter()
{
if (user.invalidCredentials)
{
response.sendError(response.SC_UNAUTHORIZED, "invalid login")
}
}
I'm able to use a TPMON and watch the server send back this request. Tomcat is throwing in a HTML Body.
The client is giving a RemoteException, but is saying the message body is bad or something like that.
My question is.. What is the proper way to do what I'm trying to do.
a. Send a specific Http Error Code in the header...
or something else.
Thanks.
Darrell


Reply With Quote