diff options
Diffstat (limited to 'sca-java-1.x/branches/sca-java-1.6/modules')
-rw-r--r-- | sca-java-1.x/branches/sca-java-1.6/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sca-java-1.x/branches/sca-java-1.6/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java b/sca-java-1.x/branches/sca-java-1.6/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java index 346a51e5e7..4f6f5c6077 100644 --- a/sca-java-1.x/branches/sca-java-1.6/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java +++ b/sca-java-1.x/branches/sca-java-1.6/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java @@ -97,11 +97,13 @@ public class JSONRPCServiceServlet extends JSONRPCServlet { handleServiceRequest(request, response); } catch(RuntimeException re) { - if (re.getCause() instanceof javax.security.auth.login.FailedLoginException) { - response.sendError(HttpServletResponse.SC_FORBIDDEN); - }else if (re.getCause() instanceof javax.security.auth.login.LoginException) { - response.setHeader("WWW-Authenticate", "BASIC realm=\"" + "ldap-realm" + "\""); - response.sendError(HttpServletResponse.SC_UNAUTHORIZED); + if(re.getCause() instanceof javax.security.auth.login.LoginException) { + if (re.getCause() instanceof javax.security.auth.login.FailedLoginException) { + response.setHeader("WWW-Authenticate", "BASIC realm=\"" + "ldap-realm" + "\""); + response.sendError(HttpServletResponse.SC_UNAUTHORIZED); + }else { + response.sendError(HttpServletResponse.SC_FORBIDDEN); + } } } finally { HttpSession session = request.getSession(false); |