So that in POST request decrypted passowrd wont be visible. But i cant access my form variable in my function to encrypt it.
Below is my function code snippet
var conpassword = document.forms.confirmPassword.value;
String stCon1 = new Encrypter(stCon).encrypt(); %>
Pleae help me in this
Shweta Machhe wrote:But when i use this code & prints stCon string using out.println it gives be right value (password enetered n UI), but when i use alert for same value then it gives me value <script>document.writeln(v);</script>. why this diffrenece?
May I have a look at the complete code?
Now I guess first print right because JSP are compiled,When you go to save, JSP compiler has already been done!
You can see on the browser after the compilation of the source code,So that you may be able to see some problems!
out.println prints jspvar=======>>>>>>Shweta on my jsp
but logger.info prints value jspvar=======>>>>>><script>document.writeln(v);</script>.
<% String jspvar="<script>document.writeln(v);</script>";
1. the algorithm will be exposed on client side for your encryption
I suggest you to perfor this on the server side.