Java Servlet Programming Question:

Download Job Interview Questions and Answers PDF

How can I send user authentication information while makingURLConnection?

Java Servlet Programming Interview Question
Java Servlet Programming Interview Question

Answer:

You'll want to use HttpURLConnection.setRequestProperty and set all the appropriate headers to HTTP authorization.

Download Java Servlet Programming Interview Questions And Answers PDF

Previous QuestionNext Question
Request parameter How to find whether a parameter exists in the request object?Can we use the constructor, instead of init(), to initialize servlet?