Hi I managed to get this working:
 
  try {
         URL url = "" URL("http://localhost/manager/reload?path=/HamiltonBank");
   HttpURLConnection con = (HttpURLConnection)url.openConnection();
      
   // Add the necessary Auth Header information
   String input = "username" + ":" + "password";
   String output = new String(Base64.encodeBytes(input.getBytes()));
      con.setRequestProperty("Authorization", "Basic " + output);
      
   // Get the page i.e. Execute the manager function
   Object tempObj = con.getContent();
      con.disconnect();
  } catch (Exception e) {
   out.write(e.toString()+"<br>");
  }
basically it can be used to execute any manager function from a servlet. the Base64 class is attached.
 
Thank you for everyone who gave advice!
 
Dom

Attachment: Base64.java
Description: java/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to