Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

is applet also staeless?

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
We all know that http is stateless protocol.Once we submit
data gets passed to server and transaction is over.To track
the session we use cookie.
I just wonder the applet that opens in browsers is stateless or JVM of brwoser facilate sateful transaction from server?
Plz elaborate it?
Thanx
anjan
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From my understanding, Applet actually is a application itself running on your machine. The only difference between Applet and standalone application is Applet has to run in a browser or appletviewer. Applet almost can do anything it wants to do (of course, except unsigned Applet security issues and concerns). It can set its own state, using State Design Pattern, communicate with server by using socket or RMI, etc. etc.
It has nothing to do with http protocol. Applet cannot set or read cookies. I could be wrong on this, if someone can do it, I'll be really interested to know how. Since I had some difficuties on that ppoint, and have to use some tricky way to make my applet communicate with other JSP pages about some state problems.
Thanks!
Roseanne
 
anjan bhushan
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx Roseanne
Still ,I have some query.It seems that http only brings applet
as data file to client.So there is no get or post request in applet.How one may send data to servlet using applet form?It will be via java io?Plz elaborate
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using AppletContext.showDocument(url, target)
and put your data into the url String.
This is what I did.
I'll be off line for several days. If you have more questions, I think others will help.
Roseanne
 
anjan bhushan
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx Roseanne.Now I can try.
    Bookmark Topic Watch Topic
  • New Topic