Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

can i pass params from .jnlp to a cgi program?  RSS feed

 
Sailaja Akkineni
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have an applet which runs from java web start.I want to pass some params like user id to another cgi program.How can i do this?
Thanks,
Sailaja
 
Idly Vada
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sailaja Akkineni:
I have an applet which runs from java web start.I want to pass some params like user id to another cgi program.How can i do this?

First the cgi script to which you want to send parameters should be on the same server where applet is present.
Coming to passing parameters to cgi script , you can do this in two ways
i) Construct url manually. In this approach you should take care of parameter encoding.This can be tricky.
for eg:
to invoke getDetails.cgi with parameters name and age
use getDetails.cgi?name=murthy&age=22
ii)Make use of URLEncoder and URLDecoder classes.
[ September 17, 2003: Message edited by: Murthy Narasimha ]
 
Sailaja Akkineni
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks a lot..
Sailaja
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!