• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Properties object values are null

 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello!
I'm trying to establish an applet-servlet communication where I use the Properties
object to pass parameters from the applet to the servlet!
The reason of using the Properties object is that I pass the password as a parameter and it's shown in the address bar of the servlet generated page!
The following works fine
The applet part

for which the servlet part is this


This works fine. But in the following combination of the applet-servet communication
the values of the Properties object are null!
Here is the applet part

And here is the doGet of the servlet in reply to the applet

The size of the the Properties object "table" is 0 in this case and the values are null!
Please help!
Thank you!
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HTTP is a request-response protocol. By making a setting up a request but not reading in the response, you are not fulfilling your part of the protocol so your request never gets sent. You actually have two requests in your code:

Request 1 never gets sent because you don't read the response. Request 2, which actually gets sent by the browser navigating away from your applet, doesn't have the properties object serialized in the request. That's the one being processed by your servlet.
 
fedai gandjaliyev
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much for the explanation!
 
What's brown and sticky? ... a stick. Or a tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic