Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlets

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Is it possible to communicate from applet to servlet? if possible how?
2) In sessions where to declare the session variable and where to declare the common variable to all .because if new user is coming , it should initialize and start from the beginning?
.. how we can do it?
3) how we can create dynamic array with out using the util package? (tell the logic)
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Is it possible to communicate from applet to servlet? if possible how?
Somewhere on this site there is a whole discussion of this problem, with plenty of examples.
2) In sessions where to declare the session variable and where to declare the common variable to all .because if new user is coming , it should initialize and start from the beginning?
The init method is where you should do ALL initialization. It is guaranteed to be run to completion before any request is serviced.
There should not be ANY instance variables that change during the operation of the servlet unless you really know what you are doing. Remember normally there is only one instance that may be dealing with multiple requests at the "same" time.
3) how we can create dynamic array with out using the util package? (tell the logic)
Copy the source code in java.util.Vector
Why not use java.util.* ?
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic