Two Laptop Bag*
The moose likes Applets and the fly likes jsp-applet-jsp communication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "jsp-applet-jsp communication" Watch "jsp-applet-jsp communication" New topic
Author

jsp-applet-jsp communication

soggy sen
Greenhorn

Joined: Jan 21, 2008
Posts: 2
i have an applet embedded in a jsp. i was successful in passing data from the jsp to applet. but when some mouse event occurs in the applet, i need to pass the data to a jsp page. how can this be done?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

You'll need to be more explicit about what you mean by "pass the data to a jsp page".

You can't pass data to the current JSP, it executed on the server long before the HTML containing the applet was sent to the browser. Do you mean passing data to the JavaScript in the HTML page?
[ January 21, 2008: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
soggy sen
Greenhorn

Joined: Jan 21, 2008
Posts: 2
i need the co-ordinates of the point where the user clicked in the applet. i understand this cannot be passed to the present JSP as it has been loaded already. what will be the best way to get the coordinate?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You would have to generate a new HTTP request from within your applet.

This topic seems like it would do better in our Applets forum than in the JSP forum. To a JSP, handling a request from an applet would be no different than handling a request from a browser. Moving...


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
i need the co-ordinates of the point where the user clicked in the applet.

WHERE do you need these values? What do you want to do with them?
i understand this cannot be passed to the present JSP as it has been loaded already.

Note the difference between "present JSP page" and "present HTML page". Getting the values to the former is impossible, while getting the values to the latter may be feasible.


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp-applet-jsp communication
 
Similar Threads
running applet through JSP
Problem in JSP calling an applet
Printing in JSP
Communication session , servlet applet and back from applet servlet and session
Servlet to Applet