My project is a maven dynamic web project. I have a drop-down for usernames and a text box for password in JSP file. Based on the selection of the user name in the drop-down, I need to auto-fill corresponding password in the text box. The mapping of username and password is from properties file.
login.properties
username1=password1
username2=password2
username3=password3
The properties file is directly in src/main/resources folder. The jsp file is directly in WebContent folder.
Attached image contains a snippet of form elements in JSP file and the JavaScript. The username drop down options are dynamically populated using another JavaScript which works fine.
Is it possible to access properties file inside this JavaScript code? Any help is appreciated.
Aucun commentaire:
Enregistrer un commentaire