Tommi wrote: > Ok, thanks, I think this is getting a bit clearer now. I found an > example of sending a POST request using Java, and it seems that the > classes to be used are URL and URLConnection (at least). The idea is > that we have a "form" as you explained: > >> Let's say that we have a form with two fields. One called 'name' and >> the other called 'project'. >> >> [html] >> [body] >> [form action="/cgi-bin/myCgi" method="GET"] >> [input type="text" name="user" /][br /] >> [input type="text" name="project" /][br /] >> [input type="submit" /] >> [/form] >> [/body] >> [/html] > > So we don't really use a form where user could edit the input,
Actually, you *do* want to use a form during development ... to debug your cgi and server-side script. > but > instead we wish to transfer the whole input file. Make the form have a field which is a textarea. Then put your entire file into that textarea. When you submit the form you will get the entire data file sent to the cgi. Plus the other fields as control parameters. > Now the trick is that > we pretend that there is such a form, in a way that in out "form" there > is only a single field Not a single field. Multiple fields. A few small fields for your parameters ... plus one BIG field for the data file. > and it's value is the contents of the file that > we wish to transfer, right? Yes. > So the parameter string would be > > /cgi-bin/myCgi?input=blaa+blaa+blaa > > where "input" is the name of our input field and "blaa+blaa+blaa" is the > encoded contents of the file that we want to pass (the length of the > value of a field is not limited, which is good :) Yes, but it will also have '&energy=high&algorithm=quick&dayOfWeek=tuesday' > I found Java docs about those encoding/decoding classes. Could there be > a pre-processing step, so that what the web-server actually would run > could be a commmand like > > decoder | ghemical-cgi You do not want to do this ... because you need multiple parameters. Do not *worry* about this ... it is easy and I will help you with it. Tell me what all of your parameters are, what the acceptable values are, and I will build the form for you. Miguel ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Jmol-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jmol-developers
