Server returned HTTP response code: 408 for URL: https...j_security_check In my testing I get the following error:
Server returned HTTP response code: 408 for URL: https://localhost:6143/mywebservice/action/j_security_check 408 = request time out. So the question is how can a client authenticate themselves? Do you have to figure out a JSESSION id somehow? The code is public static void main(String[] args) { BufferedReader responseReader = null; try { URL url = new URL("https://localhost:6143/mywebservice/action/j_security_check"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setUseCaches(false); connection.setAllowUserInteraction(false); connection.setDoOutput(true); PrintWriter requestParamsWriter = new PrintWriter(connection.getOutputStream()); requestParamsWriter.print("j_username=junkuser&j_password=test1111"); requestParamsWriter.flush(); requestParamsWriter.close(); requestParamsWriter = null; responseReader = new BufferedReader(new InputStreamReader(connection.getInputStream())); while (true) { String line = responseReader.readLine(); if (line == null) break; System.out.println(line); } } catch (IOException e) { e.printStackTrace(); } finally { try { if (responseReader != null) responseReader.close(); } catch (Exception e) { e.printStackTrace(); } } } --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org