JSP and APPLET inter communication

Hi

i know there are a lot of post around this topic, but i havent found any satisfying answers yet...

ok...

im usi JSP and i have <applet code="MyClass.class" width="500" height="500"> ...

something like this... :)

now i want to obtain some data from my applet into jsp...

just to call something like <applet call method = "foo"> and it give me data...

is that posible?

or must i use this stupid URL mapping Mapage.jsp?param=foobar?

because i don't want that my parameter is seen...

any ideas?

thx

[583 byte] By [zmedaa] at [2007-11-26 15:09:38]
# 1
Use <jsp:forward page={"relativeURL" | "><%= expression %>"} /><jsp:forward page="/servlet/login" /> <jsp:forward page="/servlet/login"> <jsp:param name="username" value="jsmith" /> </jsp:forward>
vishu007a at 2007-7-8 9:00:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
did u got it ?
rengaraja at 2007-7-8 9:00:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
JavaScript and a Java Applet can communicate using LiveConnect. http://wp.netscape.com/eng/mozilla/3.0/handbook/javascript/livecon.htm
tolmanka at 2007-7-8 9:00:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

No i haven't got it...

<jsp: include> tag includes one page in another...

i can't figure it out where is here some communication between applet and jsp?

one more time...

when i include <applet> tag into my page applet appears... now for example when user click OK button (inside that applet) i want to get so stuff from applet, some variables and things...

thx

zmedaa at 2007-7-8 9:00:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

So what exactly are you trying to do?

I don't understand when ypu say:

"i want to get so stuff from applet, some variables and things..."

Is it one of these scenarios:

A: User clicks on applet button and populates form values in the HTML?

B: User clicks on applet button and a request is made to a JSP which is displayed in the browser?

C; User clicks on applet button and a request is made to a JSP and the results displayed in the applet?

tolmanka at 2007-7-8 9:00:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
look here is scenario...applet shows....user write some data into applet's textfields...then click's on button (inside applet)...then the jsp is shown where the data from textfield is written...HOW can i get data from applet?thx
zmedaa at 2007-7-8 9:00:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7

In the same JSP as the applet create a form with hidden fileds corresponding to the text fields in the Applet. Then use LiveConnect to call a JavaScript to populate the form fields and submit the form.

Or

Don't use an Applet to be the interface.

Or

Have the Applet use the Apache HttpClient to submit a request to a servlet and then display the results in the Applet.

tolmanka at 2007-7-8 9:00:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 8
Is possible, that for parameter of applet is httpsession?
zmedaa at 2007-7-8 9:00:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...