aspose file tools*
The moose likes Servlets and the fly likes Restricting the query string parameters from populating the form value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Restricting the query string parameters from populating the form value" Watch "Restricting the query string parameters from populating the form value" New topic
Author

Restricting the query string parameters from populating the form value

Mukunda s Dhakate
Greenhorn

Joined: Oct 29, 2007
Posts: 12
My action uses POST method,
on submitting the form it takes the form values as input values from screen.
But if I append the form variables and their values in the query string and hit the edited URL,
the action gets submitted with the proper values that entered in the query string.

I want to restrict it from populating the form values from query string.

How can it be done?
Please help
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Don't process a GET request with form values?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

"Sleeping God", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Cannot be easily done. You'll have to inspect the query string to see which parameters came from it, and manually ignore them.

You should never purposefully place a query string on a POST request.
Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 645
Even if you could do this, you can't prevent a user from making up their own values for the post anyway.
What do you think will be the benefit of what you are trying to do?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Restricting the query string parameters from populating the form value