• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to handle POST method  RSS feed

 
unlucky_star
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Can anyone help me?
for example, I run a server from localhost. Information is to filled in a web page (in a form), then hit submit button. How can the server notice there would be information flow come in? I think the message would be in POST method, but I really have no idea how the server can get it.

Thanks.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, welcome to the ranch!

The web server has to run some kind of program that you write to handle incoming POST data. Since this is a Java ranch, we usually talk about the server being a servlet container and running Java programs. (Other choices are CGI and Microsoft ASP or whatever .NET does nowadays.) Servlets give you a nice way to get the POST data and a nice place to put code to handle it.

Jump up to the Servlet forum and ask for help starting from scratch. You can download good free web server and servlet engines and run it all on your PC. It's all fairly straightforward once you get the configuration right.

You can also just Google for "servlet tutorial" and see what you find.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!