applet shares servlet session; and applets vs <iframe>

Y

yeah

I've been playing around with <iframe> and applet as options for a
client page to get server info without refreshing the whole web page.

I was pleasantly surprised - but really surprised - to find that when
my applet called back to the server (using URL.getContent and a
BufferedInputReader) I was able to retrieve a previously set session
variable by the same web browser visit.

Using tomcat here for web server and java.

I know Tomcat has several options for transparently supporting session
info. I was being pessimistic however and expecting that the applet
would look like a different browser when it connected and therefore
get a different session context.

Anyway, still reading the jsp spec. Meanwhle, if anybody knows the
specifics of why this works I'd be interested to know.

Also, I'd be interested in any discussion of applet vs <iframe> for
this kind of communication. Experiences, pros/cons. Etc. My feeling so
far is that both options are pretty equal but I'm leaning toward
<iframe> because it's simpler.
 

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

No members online now.

Forum statistics

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

Latest Threads

Top