swing app, possible to have a cookie

J

John_Woo

Hi,

For swing app using socket communicating with server, is it possible to
leave a cookie like in servelt app? if so ,how ?
 
O

Oliver Wong

John_Woo said:
Hi,

For swing app using socket communicating with server, is it possible to
leave a cookie like in servelt app? if so ,how ?

Technically, the term "cookie" only make sense in the context of the
HTTP protocol. That being said, your Swing app is free to save to disk any
data it wants, whenever it wants.

- Oliver
 
J

John_Woo

Oliver said:
Technically, the term "cookie" only make sense in the context of the
HTTP protocol. That being said, your Swing app is free to save to disk any
data it wants, whenever it wants.

- Oliver

Thanks Oliver.

I'm think of how to get the folder the app can write to, b/c users may
run this swing app
in Linux and they don't have writing permit, but they are allowed to
have the Browser write cookie to somewhere.
 
M

Mark Space

John_Woo said:
Thanks Oliver.

I'm think of how to get the folder the app can write to, b/c users may
run this swing app
in Linux and they don't have writing permit, but they are allowed to
have the Browser write cookie to somewhere.

In this case, cookies are written to a users home directory, yes? (I
think so..)

So users do in fact have write permission. Just make a directory
$HOME/.myapp and put stuff there.
 
M

Mark Space

My brain being slow, I thought of this just after I clicked send...

Isn't there a preferences API in Java? I know there is because I just
checked. Why not use that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top