Hi everone ,Actually i am developing a project in MVC1 architecture .But i got a requirement that when client sends request to server through browser ,the code that is servlet (server) need to open ports of client system that sent the request (so i knew that applet is the one that helps) do i need to place applet in client system(tomcat webapps) or do i need to place in server ? & which tomcat i need to start ?
Applet is written in Java code, compiled an placed somewhere on the server, in a certain directory. The html wrtten to the browser has the applet's name, which is written in the <applet ...> tag. The browser, acting as the client, goes through the work of asking the Server for the web application's downloadable code which may be run in the applet engine at the browser end.
Do you have a server running somewhere ?
"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."
You're not going to be able to open ports on the client's system.
Even applets run in a security sandbox that keeps from accessing anything on the client's machine. With a signed applet, you may be able to do this but even then, the end user would have to approve this.
thanks for the reply by mistake i wrote MVC1 its Model View Controller .ok .
Joined: Dec 15, 2007
yes my server (tomcat ) is running on different system .
Joined: Sep 17, 2006
Originally posted by nikitha kakani: ...(snip)...requirement that when client sends request to server through browser ,the code that is servlet (server) need to open ports of client system that sent the request (so i knew that applet is the one that helps)
Maybe we disentangle ports from Applets, leave the port questions in the post linked by Ulf. I think we need to start with some vocabulary building:
Server - Usually used as a programming concept, I use this term to convey the notion of a physical machine somewere. May or may not be java. The terminology servlet is used somewhat interchangebly with Server, but a servlet is programming code - a server may refer to the physical machine as well as Tomcat or the word Servlet. Some thought is necessary for even the simplest use of the term server.
An applet is code that runs on the client side, this usually means the browser. The applet provides additional capabilites beyond simple display of data.
do i need to place applet in client system(tomcat webapps) or do i need to place in server ? & which tomcat i need to start
You compile the code, using class SimpleApplet extends Applet and a java compiler. You then place the files on the server (tomcat ) is running on different system . using File Transfer Protocol. You start the Tomcat on the server, there is not a Tomcat on the client side. ( Unless you want to have a server locally for testing ) How you start Tomcat depends on the server's implementation - a fancy Tomcat will detect uploaded files, some have to be started from a shell prompt. You upload the compiled Applet, it gets shipped out when the page load is selected in the browser. Do you know how to do ftp ? If so, request instructions for directory structure from the administrator of the server ( on the other machine )
Joined: Dec 15, 2007
thanks for the corrections thanks alot for the help