Servlet to Applet Communication -- Cheats

T

Troy

Hello,

I have figured out how to do Servlet to Applect and Applet to Servlet
communication, but so far can only get it to read what is on the
Servlet screen. Is there any way to have the applet read variables or
something other than the servlet browser window? The reason I am
asking is because people will cheat if the information is posted on
the screen. With the servlet to applet communication I will have to
have a servlet open for every game, which I was planning to have
several games going at the same time...is there a better way of doing
this, since wouldn't this idea bog down the server. Any suggestions
or ideas are greatly appreciated.

Thanks,
 
R

Roedy Green

I have figured out how to do Servlet to Applect and Applet to Servlet
communication, but so far can only get it to read what is on the
Servlet screen. Is there any way to have the applet read variables or
something other than the servlet browser window? The reason I am
asking is because people will cheat if the information is posted on
the screen. With the servlet to applet communication I will have to
have a servlet open for every game, which I was planning to have
several games going at the same time...is there a better way of doing
this, since wouldn't this idea bog down the server. Any suggestions
or ideas are greatly appreciated.

First, Servlets don't have screens. Applets have a visible portion
and they are embedded in visible web pages, which might be served by a
servlet.

The Applet as Servlet can have private conversation that does not
appear on the screen. See http://mindprod.com/fileio.html
and ask it to show you how to do CGI get/put.

Servlets can return raw data, not a web page.
 
R

Roedy Green

The Applet as Servlet can have private conversation that does not
appear on the screen.

that should read

The Applet and Servlet can have a private conversation that does not
appear on the screen.
 
M

marcus

Well, I will try and decipher, because I think you have a valid question
buried in there somewhere.

First, a servlet outputs text, or html, or jpg, or whatever and the
*browser* displays it on a screen. Yes, there is a bridge between
javascript and java that allows communication between them to some
degree. So, you can encrypt information in javascript objects embedded
in the HTML and the applet can read the data but the user would not find
it meaningful. Interesting solution.

second, a server's job is to serve data, so no it would not be
particularly bogged down doing what it is designed to do. Once you have
a couple hundred simultaneous keep-open connections you might need to
reconfigure your server software; frinstance my connections are handled
by apache through mod_jk and I think it would cr*p out at around 240
without recompiling. anyhow, that is not a java question.

good luck!
-- clh
 
N

Nigel Wade

Hello,

I have figured out how to do Servlet to Applect and Applet to Servlet
communication, but so far can only get it to read what is on the
Servlet screen. Is there any way to have the applet read variables or
something other than the servlet browser window? The reason I am
asking is because people will cheat if the information is posted on
the screen. With the servlet to applet communication I will have to
have a servlet open for every game, which I was planning to have
several games going at the same time...is there a better way of doing
this, since wouldn't this idea bog down the server. Any suggestions
or ideas are greatly appreciated.

Thanks,

Given that I don't understand what you are talking about re. "servlet
screen" "servlet browser window" I'll provide a URL which gives a good
outline of how to perform various types of applet-servlet communication.
Hopefully this will provide some enlightenment.

http://www.j-nine.com/pubs/applet2servlet/Applet2Servlet.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top