• Post Reply Bookmark Topic Watch Topic
  • New Topic

POST data from Servlet  RSS feed

 
Nims H.
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have to submit some data using POST METHOD only to other server. some data contains some critical private information which is static. and some will be entered by the user. so I want to send this data using a servlet. So please help me to post a form from servlet.

Thanx to all in advance.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello "Nims"-

Welcome to JavaRanch.

On your way in you may have missed that JavaRanch has a policy on display names, and yours does not comply with it - please adjust it accordingly, which you can do right here. Thanks for your prompt attention to this matter.

Enjoy your time here.
 
Marcelo Ortega
Ranch Hand
Posts: 528
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are a couple of issues which you must consider. Firstly, can you risk this data being sent over a normal connection? In other words, will you allow a hacker/cracker to be able view or modify this sensitive data?
The POST method is virtually a must, but this alone will not stop anybody from reading the data in the payload (message body). You may consider sending the data over HTTPS (TCP over HTTP over, normally, SSL). To do this, you must create security-constraint and a user-data-constraint in your DD. Google this info up for details.

Best regards,
Mars.
 
Nims H.
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am posting through SSL but some crucial data putting as hidden field is not good via transfer to another place..... So I want to post it throught the servlet.
 
Nims H.
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ulf Dittmer,

This is my name / what people calls me. So please consider this as my final name. This is not funcky name.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please consider this as my final name

Sorry, but no. The naming policy states that the screen name must consist of a first name, a space character, and a last name, and it must not be obviously fictitious. No exceptions allowed, so please change it accordingly. Accounts that do not conform to this policy are generally closed.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may find the HttpClient toolkit useful for POSTing to a servlet.
Bill
 
dema rogatkin
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nims:
I am posting through SSL but some crucial data putting as hidden field is not good via transfer to another place..... So I want to post it throught the servlet.
You can consider to encrypt fields in a form. If you want to post from servlet, then it's fairly easy, just obtain output stream from URL connection and write post data there. Do not forget to apply URL encoding. The rest will be done by URL connection implementation. Good luck.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!