formatting a url to send to a python server

Reply

Join Date: Mar 2009
Posts: 1
Reputation: andy121 is an unknown quantity at this point 
Solved Threads: 0
andy121 andy121 is offline Offline
Newbie Poster

formatting a url to send to a python server

 
0
  #1
Mar 20th, 2009
There is a html page that has a form on it, with a text field named "text". When you enter text into that that field and submit it, it goes back to the python server, gets processed, and a new html page is sent out in response.

I'm working with a java servlet and need to post to the python server. The easiest way I can think of to do this is to format the url such that the the text I would like to enter into the text field (whose name is 'text'), I somehow encode that information in the url.

In Java, I'd simply append to the end of the url [text=theTextIdLikeToProcess]. But, that doesn't work for the python server. It is expecting a dictionary, and it tries to search that dictionary for a key labeled 'text'.

So, how to I encode a url to give a post command that will put the key 'text', with a value I want, in the dictionary?

thanks!
Reply With Quote Quick reply to this message  
Join Date: Dec 2003
Posts: 2,414
Reputation: alc6379 has a spectacular aura about alc6379 has a spectacular aura about alc6379 has a spectacular aura about 
Solved Threads: 123
Team Colleague
alc6379's Avatar
alc6379 alc6379 is offline Offline
Cookie... That's it

Re: formatting a url to send to a python server

 
0
  #2
Mar 24th, 2009
this post might help:
http://www.webhostingtalk.com/showpo...40&postcount=2

you should just be able to add it to the end as an additional argument, it would seem...
Alex Cavnar, aka alc6379
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC