Im new to this concept. please send me the complete code.
and also please give me some samples for Applet run on Tomcat Server..
very urgent....
-- Bharathi
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35223
7
posted
0
Im new to this concept. please send me the complete code.
The code of what? It's just a single method call.
also please give me some samples for Applet run on Tomcat Server.
What would these examples show? An applet consists of an HTML (or JSP) file containing an applet tag, and some class files (or maybe jar files), all placed together in a public directory in your web app. The Sun Java Tutorial explains all this in detail.
muthu bharathi
Ranch Hand
Joined: Dec 10, 2008
Posts: 97
posted
0
hi, If we use httpRequest we'll get only the last Proxy IP address.
How we get the client machine's IP in J2EE Application.
-- thanks in advance, -- bharathi
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35223
7
posted
0
If there's a proxy in between, then the proxy can usually be configured to set the originating IP address in an HTTP header. Ask your network administrator about that.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35223
7
posted
0
What do you mean by "change the Applet code into web application"? As far as I can tell -and you made it unnecessarily hard to read the code, because you didn't UseCodeTags; please do that in the future- all the applet does is to determine the local IP address. Are you asking how to determine the local IP address of the servlet container that runs the web app? I already mentioned how to get a client IP address in a web app.
Richard Corbin
Greenhorn
Joined: Nov 22, 2008
Posts: 12
posted
0
[Edit; not-so-nice post removed. Tread carefully.] [ December 14, 2008: Message edited by: Bear Bibeault ]
If you are capable to write code yourself, but you stucks with a technical coding problem, then you are always welcome here to ask for help. But please ask the question the smart way. Elaborate about the coding problem in detail. Asking for code isn't going to work here. The more effort you put in asking the question the smart way, the more effort others will put in giving the answer, including more chance on a (relevant) code example.
How can i get the clients IP Address using J2EE Application thro' Applet(Applet+servlet+Tomcat server).
some one was answered my query... but i can't understood that concept....
I know how to find the clients IP Address using Applet. now i want to know if some one(client) login into that particular site, That client Machines IP 'll be displayed in server... that's what i need
--- Advance Thanks
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35223
7
posted
0
some one was answered my query... but i can't understood that concept....
Then tell us what you have trouble understanding, and we'll try to help you understand.
I know how to find the clients IP Address using Applet.
Probably not, actually, at least not reliably. Many computers are behind NATed firewalls, and so what the applet will get is something like "192.168.....". That's an internal address that doesn't tell you anything about the client.
now i want to know if some one(client) login into that particular site, That client Machines IP 'll be displayed in server...
Didn't we discuss that already? What did the network admin say regarding passing on the real IP address in addition to the proxy address?
muthu bharathi
Ranch Hand
Joined: Dec 10, 2008
Posts: 97
posted
0
Hi,
Thanks ulf....
MY task is working fine... thanks a lot.
i've one more doubt...
i've two text boxes(Name and password) in Applet and also i've another two text boxes and a submit button in JSP.
While i click on the submit button, the browser will display the values of name and password and also to display the values of two boxes(ie, in jsp).
I need guidance for Applet and JSP communication...
once again thanks a lot.
Advance thanks
-- bharathi
muthu bharathi
Ranch Hand
Joined: Dec 10, 2008
Posts: 97
posted
0
Hi everybody,
i was tried <jsp lugin>. the codes are compiled. At run time i was got the following error. Anybody known about that please help
*************************************************** oad: class daytimeapplet.class not found. java.lang.ClassNotFoundException: daytimeapplet.class at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed:http://localhost:8080/Applet_servlet/build/classes/daytimeapplet/class.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) **************************************************************