This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Getting parameters from the server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Getting parameters from the server" Watch "Getting parameters from the server" New topic
Author

Getting parameters from the server

German Lamberet
Greenhorn

Joined: May 01, 2013
Posts: 4
Hi,

I have such form:


Once I submit it parameters are sending to the server, then it responds back to me with parameters that I have to save in variable.
I am new in servlet theme, please advise how to organize servlet in such case?

Thank you in advance.
Mansukhdeep Thind
Ranch Hand

Joined: Jul 27, 2010
Posts: 1157

Welcome to the ranch none.

none not wrote: Once I submit it parameters are sending to the server, then it responds back to me with parameters that I have to save in variable.


Not sure I understand what you are trying to achieve here. What do you want to do with the submitted form variables? Do you want to perform some sort of server side validations against the DB values? Or do you want to do some custom validations in the Servlet itself like Pattern matching etc.? Can you please explain the use case in detail?


~ Mansukh
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41177
    
  45
"Parameters" are commonly understood to be what the client sends to the server - so what exactly is it that the server responds with?

When you say "variable" - where does that exist? In the Java code on the server? In JavaScript on the client?

Please TellTheDetails.


Ping & DNS - my free Android networking tools app
German Lamberet
Greenhorn

Joined: May 01, 2013
Posts: 4
Hi Mansukhdeep, thank you for invitation

I'm trying to test PayPal integration using NVP.
Once I submit my form I send credentials in name-value pair way to PayPal test server then it checks my credentials and respond to me with the string like



(string appears in my browser)
from this string I should get TOKEN parameter and place it in variable to process next operations.
Mansukhdeep Thind
Ranch Hand

Joined: Jul 27, 2010
Posts: 1157

Have you read and understood the steps for URLDecoding mentioned in this document. It seems that is what you want to accomplish, decode the URL and retrieve the TOKEN that the PayPal server sent to your request to further your transactions.
 
Don't get me started about those stupid light bulbs.
 
subject: Getting parameters from the server
 
Similar Threads
how to add data in request object and pass it to next page?
sendRedirect fails to post data along with url if the data is too large
Connecting to a script
where are the username and passwords stored ?
forward request url from server side