Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

RequestDispatcher.include problem in IE  RSS feed

 
Shobha Mahadevappa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a vague problem. Here is the explanation of the problem.
We have many processes in our application and each process gets launched in a new window.
On any event, we submit the page. While the processing is going on , we display an intermediate page to the user.
This works fine for a single process which is launched in a single window.
We are including the intermediate page in our servlets at the beginning of dopost and that code is like this:
RequestDispatcher rd = getServletContext().
getRequestDispatcher("/en_GB/PushPage.html");
rd.include(request,response);
response.flushBuffer();
But when we launch 2 process (i.e in 2 windows), the intermediate page displays properly in one window and it doesnot display properly in the other. The second page is not displaying the gif. But when the first page loads with the target jsp, then the second page displays the gif until the target jsp loads fully.
If we open 3 windows, then first page displays the intermediate page properly, second doesn't display the gif but displays the text and third page doesn't display the intermediate page at all.
But this works fine in Netscape. All the three windows display the intermediate page immediately.
Any help regarding this wud be of a great value.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like your Servlet or JSP isn't thread safe.
They are maintaining some state that the other threads can see and it is interfering with the other threads.
First step is to make sure they don't have any instance variables. That'll get you every time.
Dave
 
Shobha Mahadevappa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This problem occurs only when we launch multiple child windows in the same session. But the same is not noticed when we have different sessions. Also this problem doesnot appear in Netsacpe.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe that new windows in IE share the same session ID, but in Netscape they do not.
This is not quite true, try this:
Start an IE session, open another IE window by clicking on the icon, not but using File>New or Control-N. See if the problem continues.
Anyway, it sounds like it is the session that is not thread safe. Data on the session is not safe to share between multiple windows with the same session ID. You may need to protect the data on the session.
You're going to need to paste code if you want more help. I'm just guessing on everything at the moment.
 
Shobha Mahadevappa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi david,
Thanx for the suggestions.
Iam using weblogic as the appserver. I have written a small application to reproduce this behaviour. It has some 7 files. I have sipped the DefaultWebApp folder and mailed it to u. Just have a look into this and lemme know whz going wrong.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Shobha Mahadevappa:
I have sipped the DefaultWebApp folder and mailed it to u.

Please do not do that. As wonderful as David is, he is NOT your private consultant. If he resolves your question by e-mail then NO ONE else benefits from his efforts.
Please post the code here, so that the responses can be shared by everyone.
 
Shobha Mahadevappa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have around 3 html files and 1 servlet. Uploading code for the servlet is not a issue. But iam not able to post the code for the html files. I tried "<ampersand>lt<semicolon>" option and also a space after < tags. But nothing worked. Can i put these files as an attachment in the forum???
[ March 11, 2003: Message edited by: Shobha Mahadevappa ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try using the UBB code tags? They look like this:
[ code]
insert your code here
[ /code]
Of course you do it without the spaces inside the brackets, otherwise it comes out like this:

I had a quick look at your code but I wasn't sure what order to run your pages to see the behaviour you are talking about. I'm also having strange Tomcat errors (I don't use servers on this machine...)
As Cindy said, it would be better to post some code for everyone to help. I'm hapy to do what I can, but I can only help in bursts
Dave
 
Shobha Mahadevappa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried uploading the code with [ code ] [ /code ] option but even that didn't work
U will have to access Test.html first. This will launch a window which has three buttons. Click on the buttons one after the other. Try the same thing for netscape and u will see the difference in how IE displays the intermediate page and how netscape displays. Netscape displays the intermediate page immediately but IE displays as mentioned before.
 
Shobha Mahadevappa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Finally, i found out the problem. It was nothing to do with the code. It was a limitation of IE or may be u say it was according to the HTTP specification
"WinInet will limit the number of simultaneous connections that it will
make to a single HTTP server. If you exceed this limit the requests
will block until one of the current connections has completed. This is
by design and is in agreement with the HTTP specification and industry
standards" .
This is what the document says and also a work around for
this as creating registry entry for max connection and set it to the
value wanted.
So i increased the Max no of connections for IE in regedit and it worked fine. Thanx
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!