启动servelt doPost java.io.filenotfoundexception http://intssneip01.ppmail.ppservices.axa-tech.intraxa:5510/ws/fr-eda-pushevent-v1-vs时抛出异常 它出现在输入流getInputStream的行上,这里是代码:
String name =“admin”; String password =“admin”;
String authString = name + ":" + password;
System.out.println("auth string: " + authString);
byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
String authStringEnc = new String(authEncBytes);
System.out.println("Base64 encoded auth string: " + authStringEnc);
URL url = new URL(backUrl);
URLConnection urlConnection = url.openConnection();
urlConnection.setRequestProperty("Authorization", "Basic " + authStringEnc);
String line = "";
StringBuffer sb = new StringBuffer();
BufferedReader input = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()) );
while((line = input.readLine()) != null)
sb.append(line);
input.close();