protected void doPost(final HttpServletRequest request,
final HttpServletResponse response) throws ServletException,
IOException {
try {
if (validate(request, response)) {
final RemoteNode rn = getRemoteNode(request, response);
executeCommands(request, response, rn);
final String p = request.getParameter(VAR_ACTION_NAME);
if (p != null && p.equals(VAR_ACTION_CONNECT_NAME)) {
final boolean connected = ServiceProvider.IMPL
.getWirelessService().testRemoteConnection(rn, 0);
if (!connected) {
response.sendError(
HttpServletResponse.SC_CONFLICT,
RS.rbLabel(KEY.WIRELESS_NODE_CONNECT_FAILED,
rn.getAddress()));
return;
}
}
response.setStatus(HttpServletResponse.SC_OK);
}