RE: jsessionid problem with a new window (HTA)

2002-12-20 Thread Ralph Einfeldt
I can't see anything wrong at the first glance.

Some recommendations:

Try to use 
do_submit_popup(<%= response.encodeUrl("Action") %>, 'foo', 'bar' );

instead of generating the encoded url in do_submit_popup.

Print out the requested sessionId to see if it is the same
as the one that was used to create the window.

> -Original Message-
> From: Yong Wang [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 19, 2002 5:20 PM
> To: Tomcat Users List
> Subject: RE: jsessionid problem with a new window (HTA)
> 
> 
> Hi Ralph, the js function gets included into the JSP
> page and it looks something like the following. Do you
> see anything wrong?
> 
> <% final String currentSessionID = session.getId(); %>
> ...
> function do_submit_popup(newAction, submitType,
> targetFrame)
>   {
> var newAction2 = newAction + "\;jsessionid=" +
> "<%=currentSessionID%>";
> 
> do_submit( newAction2, submitType, 'newWindow' );
>   }
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: jsessionid problem with a new window (HTA)

2002-12-19 Thread Yong Wang
Hi Ralph, the js function gets included into the JSP
page and it looks something like the following. Do you
see anything wrong?

<% final String currentSessionID = session.getId(); %>
...
function do_submit_popup(newAction, submitType,
targetFrame)
  {
var newAction2 = newAction + "\;jsessionid=" +
"<%=currentSessionID%>";

do_submit( newAction2, submitType, 'newWindow' );
  }

function do_submit(newAction, submitType, targetFrame)
  {
  if ( window.document.frames[0] != null)
  {
  formObj =
window.document.frames[0].document.forms[0];
  }
  else
  {
  formObj = window.document.forms[0];
  }
  if (formObj)
  {
  if ( targetFrame != null )
  {
  formObj.target = targetFrame;
  }
  if ( submitType != null )
  {
 if ( formObj.$submitType )
 {
 formObj.$submitType.value =
submitType;
 }
  }
  if (newAction != null)
  {
  formObj.action=newAction;
  }

  e = formObj.elements;
  for (i=0; i";

cbox.insertAdjacentHTML("AfterEnd", output);
 }
  }
  }
  if ( formObj.fireEvent("onsubmit") )
  {
  formObj.submit();
  }
  //}
  }
  else
  {
  //alert(window.location.pathname );
  window.location.href = newAction;
  }
  }


--- Ralph Einfeldt <[EMAIL PROTECTED]>
wrote:
> How do yo create the url.
> 
> I guess it's inside do_submit_popup.
> 
> Is this function part of the local page or part of
> an
> external js file ?
> 
> Why don't you just use:
> javascript:window.parent.do_submit_popup('<%=
> response.encodeUrl("PrintReport") %>',null,'_new');
> 
> > -Original Message-----
> > From: Yong Wang [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, December 19, 2002 4:59 PM
> > To: [EMAIL PROTECTED]
> > Subject: jsessionid problem with a new window
> (HTA)
> > 
> > I use a javascript o append the jsessionid to the
> end of the
> > URL as such:
> > 
> >
>
javascript:window.parent.do_submit_popup('PrintReport',null,'_new');
> > 
> > which produces something like:
> > 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


=

// My alternate email: [EMAIL PROTECTED]


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: jsessionid problem with a new window (HTA)

2002-12-19 Thread Ralph Einfeldt
How do yo create the url.

I guess it's inside do_submit_popup.

Is this function part of the local page or part of an
external js file ?

Why don't you just use:
javascript:window.parent.do_submit_popup('<%= response.encodeUrl("PrintReport") 
%>',null,'_new');

> -Original Message-
> From: Yong Wang [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 19, 2002 4:59 PM
> To: [EMAIL PROTECTED]
> Subject: jsessionid problem with a new window (HTA)
> 
> I use a javascript o append the jsessionid to the end of the
> URL as such:
> 
> javascript:window.parent.do_submit_popup('PrintReport',null,'_new');
> 
> which produces something like:
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




jsessionid problem with a new window (HTA)

2002-12-19 Thread Yong Wang
Hi, I have a web application running on Tomcat 4.1 and
has to support both regular browser and HTA. On one of
the pages, I need to pop up a new window to display a
PDF file generated by a servlet. The servlet needs to
use some information stored in the session to generate
the PDF content. So this new window has to use the
same session as the original window. I use a
javascript o append the jsessionid to the end of the
URL as such:

javascript:window.parent.do_submit_popup('PrintReport',null,'_new');

which produces something like:

http://localhost:8080/dms/do/PrintReport;jsessionid=CE368CD99D2E46099FDDC39A4920CE55

The problem is occassionally, the new popup window
would somehow be assigned a new session and therefore
can't access the information expected in the original
session. This problem is so transient that it would
occur all of sudden and then go away a while later.

I would appreciate any hint or insight on this issue.
Pls let me know if you need any other info. Thanks!


=

// My alternate email: [EMAIL PROTECTED]


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: