Java Basic Authentication - HttpServletResponse

Job ID: 33879658

Budget: €8 – €30 EUR

STARTING POINT
We have a Java web system with access to some certain PDF documents. These documents are protected by user/password (configured in apache proxy)
When accessing these documents, a login/password is prompted to the user.
REQUIREMENT
Write a valid Java based software that sends credentials in the response header so the login/password prompt will not be shown and user can access automatically to the document.
Solution and code must be based into the files included with this requirement.
Proposed solution must be valid for different browsers: chrome, firefox, edge, safari