Java Servlet Programming Question:
Download Questions PDF

How can I send user authentication information while makingURLConnection?

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?