wood burning stoves 2.0*
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


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: 42030
    
  64
"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.
 
GeeCON Prague 2014
 
subject: Getting parameters from the server