I was goofing around yesterday and being the newbie that I am...barely i year java...I thought, "I wonder if I can have a JSP open up a JFrame on a client machine". Then I thought, "I'll bet I can..." so I started messing around. I did get a window to open, but it opened on the server. How do I get it to open on the client. I figure I needed to do something with opening a socket, etc which I have working somewhat. (I can retrieve the clients IP address and the port on the server to which it is connected, and another port number, getLocalPort from ServerSocket I think.... How do I get a socket open from Server to client to pass the JFrame down, moreover, how do I pass that JFrame to the client.... Thanx
Hai ryan, If you want to show a JFrame on to the client i think it is possible only through an Applet(Very important is the browser in which this applet is running should have the plugins for Swings or you can have an AWT Frame and also use jsp lugin tag) Once it is ok you can just create a JFrame in any of applet lifecycle methods (eg paint) And i am sorry to inform you that including any of the containers in an applet is not appreciated.
[This message has been edited by Anoop Krishnan (edited May 15, 2001).]
I just want to know is there any body call my bean's Getter and Setter methods with "Please" in front - My favorite quip from Bugzilla
Hi Ryan, Don't get confused about what a JavaServer Page is. JSP runs on the server to handle a request and generate a response for a client. Applets can run on the client-side through a browser. The two are seperate and distinctly different. What you can do is have the HTML generated by your JSP use an Applet. This applet can then open a JFrame and continue as you like. The code for the applet in this case would be completely seperate from your JSP. Jayson Falkner V.P./CTO, Amberjack Software LLC Jayson@jspinsider.com www.jspinsider.com
Jayson Falkner<br />firstname.lastname@example.org<br />Author of <a href="http://www.jspbook.com" target="_blank" rel="nofollow">Servlets and JavaServer Pages; the J2EE Web Tier</a>