[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] More than one applet in one page problems



Hi Eduardo,

i can reproduce this here.
The problem is that all three applets use the same session-id
and the servlet gets confused as it thinks it talks to one applet.

If we find a way to force the three applets so that each keeps
its own session id it should work (the servlet handles this).

The two optional parameters, /path/ and /domain/, are used to restrict
the scope of a cookie.

Here is our same cookie for all three applets:
Name: JSESSIONID
Value: 2EC1E3B981517888E8597EB5C9034F67
Domain/Path: localhost/xmlBlaster
Expires: Session

As a workaround you could have three tomcats running on three
ports and each applet uses its own url (Domain/Path).

Or find another clever way to distinguish the three applets in the
Domain/Path.
Probably registering the servlet three times and set
a different Path?
Or by passing
<PARAM NAME = "xmlBlaster/servletUrl"
VALUE="http://localhost:8080/xmlBlaster/AppletServlet1"; />
and AppletServlet2, AppletServlet3? (the xmlBlaster/servletUrl is used
by the applet as the URL to connect)

The proper way is probably:
If you need multi applet support in the same frameset you
would need to extend the xmlBlaster applet library and servlet library
to handle session management with applet specific cookies.
Like this, the main servlet session contains sub-scopes for each applet.

Another solution could be to have only one communication applet
and all other applets contact the communication applet (if this is
possible).

Any simpler idea around?

regards
Marcel


Eduardo Catarino wrote:

Hi,

I’m developing small applications where I need to have 3 applets in the same html file (each one in a different frame). The problem is that I’m having (sometimes) an access denied problem. For checking purposes I used this simple test that reproduces my problem (the SystemInfoApplet.html is the one that comes with the xmlblaster distribution). As you can see the applet gets stuck after subscribing a message)

Help will be appreciated.

<html>

<head>

<base target="_self">

</head>

<frameset rows="33%,33%,34%">

<frame name="alerts" src="SystemInfoApplet.html" scrolling="no" target="_self">

<frame name="alert" src=" SystemInfoApplet.html " scrolling="no" target="_self">

<frame name="freeText" src="SystemInfoApplet.html" scrolling="no" target="_self">

</frameset>

<noframes>

<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">

<p>Esta página utiliza frames, mas o seu browser não as suporta.</p>

</body>

</noframes>

</frameset>

</html>