• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

request.getRemoteuser()

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any way to know that mail I sent to someone was read by the receiver or not? Can servelets request.getRemoteUser() fullfill this purpose
sa
 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
getRemoteUser just tells you the username of the client on the other end (assuming you prompted them for a username/password).
To tell if they're received or read a message, you need to request a receipt with the mail message. It has nothing to do with http/servlets/etc.
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks chris for your reply.
There is one more ques. realted to this for instance when you send egreeting to someone you get notified when the receiver opens that greeting, so my ques. is how that happens? Is there no way to grab info who clicked my url?
sa
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are lots of things you can tell about who clicked a URL: the IP address of the client machine (unless they are accessing through a proxy or firewall, etc.), the domain name of the client machine (unless they are accessing through a proxy or firewall, or get their IP address through DHCP and don't have a domain name, etc.), the type and version of the browser (unless they are accesing through a system which disables ths information, or they have set up their browser to send incorrect browser information etc.).
I hope you get the picture, anything sent by a browser is potentially unreliable. Likewise with mail receipts. I hate them and always configure my email system to never return them. So do many others.
So how do those greetings work? Simple, they send a complicated, unique URL to each recipient, encoding the recipient details and some redundancy to ensure it can't easily be guessed. For example, if you see something like the following in the message:
< img src='http://www.supergreetings.com/message/123-78DX-957643-36/logo.gif' >
You can be pretty sure that the recipient information (or at least some sort of recipient id) is contained in the gibberish numbers somewhere.
All that remains is for the server code to extract that information from the URL, and it knows that the message has been viewed by the recipient.
 
Chris Reeves
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Frank is right on - avoid the e-mail receipt business. I really find it to be more of an invasion than a convenience.
One more thing to add regarding the URL encoding.
When user A sends a "supergreeting" to user B, a message is sent with a URL inside. When user B clicks on the URL, a request is sent to the server, which captures the notion that user B has requested his greeting (from the data, userid, whatever, embedded in the URL), and returns the right greeting. The server can then notify user A that user B is checking out the greeting. Spiffy.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic