Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

POST method parameters

 
Shweta Machhe
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i get the parameters that are submitted In request by POSt method?Is there any way in java to get these values?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15359
39
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are programming a servlet, then you can call the getParameter("paramname") method on the ServletRequest object that is passed to the doPost() method of your servlet. In a JSP, there will be an implicit 'request' variable on which you can call getParameter("paramname") on that directly.
 
Shweta Machhe
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting the POST method parameters by request.getparameter(""); method.

But my problem is that, i want to block the password fields in request. I had encrypted these password fields on my submit button click using ajax & again set these encrypted values to form. So that in my form submit action i am getting encrypted values.

But this whole logic fails when i use tools like Selenium automates browsers. This is an Mozilla tool where we can record our browser activities by recording events.
When i start recording browser events in this tool, it captures the form values that are changed, means suppose i have 10 fields on my UI, n i change only 2 of them,one by key type & one by mouse paste. then it directly records these events. So even if i had encrypted these fields after form submit,its of no use.

Please suggest me any solution on it.
 
Arun Kumar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could you post the error/exception for using selenium?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64968
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why on earth are you encrypting the field? And in JavaScript? That means that your algorithm is published for all to see and crack.

Just use SSL to protect sensitive data in transit.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic