This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

applet POSTs url w/plugin problem!  RSS feed

 
Sue Fish
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Swing applet (JRE1.3) on Sun & Netscape 4.6 that needs to POST a url to a c++ cgi.
The exact same code works for an applet without the plugin but my code does not! I cannot set the METHOD to POST, the recieving cgi extracts the method as GET no matter what I do! (I need POST)
Does the plugin have it's own set of environment vars?
The code is simple:
URL url = new URL("http:...");
URLConnection connection = url.openConnection();
url.setDoOutput(true); //POST
OutputStream out = connection.getOutputStream();
...
Thanks!
 
andreas krohn
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your URLConnection is a HttpURLCOnnection you could use connection.setRequestMethod("POST").
/Andreas
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!