This question is old, but I thought it would be helpful to have the correct answer here.
Filip confuses server-side Java with client-side Java. He is right that you cannot share sessions between two server platforms, such as Java (J2EE) and ASP.Net, without using a custom approach.
However, applets are client-side and therefore must have access to session information on the main page. The problem is that ASP.Net 2.0 added the HttpOnly flag to the session cookies. This flag prevents JavaScript and Java applets from accessing these cookies.
The workaround is to disable the HttpOnly flag in session cookies. Although you can do this in the configuration in new versions of ASP.Net, in previous versions the solution was to add the following code to your Global.asax file:
protected void Application_EndRequest(object sender, EventArgs e)
{
if (Response.Cookies.Count > 0)
{
foreach (string lName in Response.Cookies.AllKeys)
{
if (lName == FormsAuthentication.FormsCookieName ||
lName.ToLower() == "asp.net_sessionid")
{
Response.Cookies[lName].HttpOnly = false;
}
}
}
}
, //Java cookie. , Firefox 4.0.1 Java 1.6.0_13 Windows XP.
, , , URL- ( URL- ) cookie, .