M
Mustafa Aydin
Hello,
I'd like to offer an applet/servlet combination on my HP
that is able to calculate the movement of the sun for
any locations and a whole year, or, as animation,
visualize it (length of shadow, ...)for one day.
I know, such stuff very often yet exists but I
like to )
and besides it will help me to get practice with
the servlet/jsp/applet APIs.
Because the geographical database is too big
to download for the user, the applet has to
communicate with a servlet or just a package
on the server somwhow.
The most elegant method to make a connection over
a defined port and let the applet/servlet use it
does work locally but on my provider it doesn't
I am able to have a static method run on the server
that listens to a port, but the call to the accept method
never returns. My local client program only shows
me "Connection refused" on every port (besides
the predefined 21 (FTP), ...)
My question:
What is the "correct" way to let an applet communicate
with its server?
I could imagine that the applet sends "its" parameters via
"GET /GetValues?country=abc&city=xyz&year=2042 HTTP/1.0"
to the server in order to invoke a JSP page (from which I
have access to my packages) that delivers the data line by line
and the applet in return will "extract" the data out of this
HTML page.
Otherwise I think that there exists no way that
is more stupid and complicated :-((
I'd be appreciated for any scheme that does this
task without any "tricks".
Thanks in advance
Mustafa
I'd like to offer an applet/servlet combination on my HP
that is able to calculate the movement of the sun for
any locations and a whole year, or, as animation,
visualize it (length of shadow, ...)for one day.
I know, such stuff very often yet exists but I
like to )
and besides it will help me to get practice with
the servlet/jsp/applet APIs.
Because the geographical database is too big
to download for the user, the applet has to
communicate with a servlet or just a package
on the server somwhow.
The most elegant method to make a connection over
a defined port and let the applet/servlet use it
does work locally but on my provider it doesn't
I am able to have a static method run on the server
that listens to a port, but the call to the accept method
never returns. My local client program only shows
me "Connection refused" on every port (besides
the predefined 21 (FTP), ...)
My question:
What is the "correct" way to let an applet communicate
with its server?
I could imagine that the applet sends "its" parameters via
"GET /GetValues?country=abc&city=xyz&year=2042 HTTP/1.0"
to the server in order to invoke a JSP page (from which I
have access to my packages) that delivers the data line by line
and the applet in return will "extract" the data out of this
HTML page.
Otherwise I think that there exists no way that
is more stupid and complicated :-((
I'd be appreciated for any scheme that does this
task without any "tricks".
Thanks in advance
Mustafa