Click to See Complete Forum and Search --> : Parameters in Applet


fangel
09-17-2006, 07:16 AM
I cannot figure exactly where this post may go so forgive me if I posted it in the wrong section.
The standar way of passing parameters to a Java Applet is to use the tag (e.g.) <PARAM NAME="IP" VALUE="127.0.0.0"> inside an <APPLET> tag.
I have an Applet which connects to a db server to retrieve data. The server IP, the database name etc are passed as parameters to the Applet so as to be able to connect to different servers. My question is, if there is a way I can hide this information from a user that sees the source code of my page?
Any ideas will be greatly appreciated (including php coding ideas or something regarding the way my applet should work) :confused:
Thanks in advance!

Khalid Ali
09-17-2006, 10:21 AM
I'd doubt that, see when you do any thing related to webpage then the content has to be public. unless you could come up with some design such as values in the parameters are fake values that are directly linked with real values on the server.
Such as
ip="999.111.999.999"
may on the server be translated to
"127.0.0.1"="999.111.999.999"
etc etc, however with such techniques you will have to determine how this will help in general for your app design+security

agent_x91
09-18-2006, 02:56 AM
I would reccomend hard-coding these values as either single values or arrays: if it's necessary for several different values to be accessed, pass an array reference as a parameter, so that it knows which value in the array to use, rather than passing a specific value which would be easily accessible to viewers of the webpage.