Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Programming a small http server  RSS feed

 
Michael Herrmann
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm quite new to Java in general, and I've never worked with anything that has to do with networks. Now I want to build a little server which should be able to return whole files to a php script on a server. I can't just use servlets because my server has to do something(would be a bit complicated to explain), that needs some time(<1s), but can't be done simultaneously(NO use of threads). So if someone(in this case the phpscript) connects to my little server, it should be able to get GET or POST information to choose which file, and then(after the <1s process) return the file. If any other user requests something during this process he is put into a queue and gets his information afterwards, because the mentioned process can only be run once at a time.
I hope you get what I mean, and I haven't expressed it an a too confusing way .
Thanks in advance,
Michael Herrmann
[ December 22, 2003: Message edited by: Michael Herrmann ]
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This article shows a simple multithreaded web server. Perhaps you can bend it to your purpose.
 
Michael Herrmann
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks great, I haven't read it yet but it seems to be exactly what I'm looking for.
Thanks a lot
Greetings,
Michael Herrmann
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!