Author Topic: Problem with router.updateInterval not occurring  (Read 25101 times)

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #30 on: April 06, 2009, 03:24:37 PM »
It looks like the image URL is now URL-encoded. My first guess is that your latest fixes for encodeURL() have been applied in places it shouldn't be.

Can you open the AjaxSwing-generated HTML page and look at the HTML source? Are <img> URLs encoded or not? If they are not encoded in the HTML page, then the problem is definitely in the web server code.

If they are encoded on the page, please download the jars below and apply them as a patch to your AjaxSwing. The patch contains added logging for URLs we get from the web server. Rerun the application, capture the log files and post them here. You can search the log file for "submitURL =" string which will show you the URLs. They should NOT be URL-encoded, meaning that they shouldn't contain % characters unless there is a special character in the query string.

http://creamtec.com/products/ajaxswing/install/2.4.1/ajaxswing.jar.jdk1.5
http://creamtec.com/products/ajaxswing/install/2.4.1/asboot.jar.jdk1.5

kdiamond

  • Customer
  • Jr. Member
  • *
  • Posts: 53
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #31 on: April 06, 2009, 05:11:05 PM »
We have been having difficulties getting at the AjaxSwing-generated HTML.  We are using the most recent version of View Source Chart within Firefox, and it seems the <iframe> is not supported because we cannot see the details.  See attached screen shot.

Do you have any further suggestions for viewing the AjaxSwing-generated HTML?

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #32 on: April 06, 2009, 05:49:56 PM »
You have several options of getting to IFRAME source.

First and simplest, just type in the IFRAME URL into the browser address bar so that it goes to it directly. E.g. you should be able to type http://localhost:3080/VLPortal?reportName=FileTransferHistory and see the page. Then you can click browser Refresh button to ensure that there are no AJAX updates on the page, and then choose View->Page Source menu item.

Another way would be to open AjaxSwing's page template (normally AjaxSwing/conf/templates/default-page/body-header.html) and remove oncontextmenu event handler. Restart web server and after IFRAME loads right mouse click on the frame somewhere. You should select This Frame->View Frame Source to view the source.

You can also view the source in FireBug, which is the best way to see what's going on in the browser.

kdiamond

  • Customer
  • Jr. Member
  • *
  • Posts: 53
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #33 on: April 07, 2009, 12:14:55 PM »
With your suggestions, we were able to capture an AjaxSwing HTML page.  The page we were able to grab had one image on it for displaying a down arrow.  The URL is below.  Please note that this particular page does not have any problems. 

<img src="http://localhost:3080/web_docs/images/com/cleo/lexicom/beans/images/downarrow.gif">

Our main problem seems to stem from a JOptionPane that is displayed after a file upload.  The URLs associated with the images on that particular pane seem to be the troubled ones.  Please look at the last three URLs below; these are the ones associated with the images on this option pane.

GET /web_docs/images/com/cleo/lexicom/images/VLTrader_splash_small.gif HTTP/1.1
GET /web_docs/images/com/cleo/lexicom/beans/images/downarrow.gif HTTP/1.1
GET /web_docs/images/com/cleo/lexicom/beans/images/downarrow.gif HTTP/1.1
GET /web_docs/images/com/cleo/lexicom/beans/images/downarrow.gif HTTP/1.1
GET /web_docs/images/ajaxswing/close.gif HTTP/1.1
GET /web_docs/images/java/Question.gif HTTP/1.1
GET /web_docs/images/com/cleo/lexicom/images/people.gif HTTP/1.1
GET /web_docs/images/com/cleo/lexicom/beans/images/downarrow.gif HTTP/1.1
GET /web_docs/images/com/cleo/lexicom/images/leftarrow.gif HTTP/1.1
GET /web_docs/images/com/cleo/lexicom/images/rightarrow.gif HTTP/1.1
GET /web_docs/images/com/cleo/lexicom/beans/images/downarrow.gif HTTP/1.1
GET /web_docs/images/com/cleo/lexicom/beans/images/downarrow.gif HTTP/1.1
GET /web_docs/images/com/cleo/lexicom/beans/images/downarrow.gif HTTP/1.1
GET /web_docs/images/com/cleo/lexicom/beans/images/downarrow.gif HTTP/1.1
GET /web_docs/images/com/cleo/lexicom/beans/images/downarrow.gif HTTP/1.1
GET /%22http:////localhost:3080//web_docs//images//ajaxswing//close.gif/%22 HTTP/1.1
GET /%22http:////localhost:3080//web_docs//images//com//cleo//lexicom//images//people.gif/%22 HTTP/1.1
GET /%22http:////localhost:3080//web_docs//images//java//Inform.gif/%22 HTTP/1.1

Next, we installed the jars you provided with additional debug printing for the submitURL.  The debug is attached.

One final note, our encodeURL() method is not being invoked in the troubled area.

Thank you.

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #34 on: April 07, 2009, 01:22:03 PM »
The problematic URLs seem to be URL encoded. %22 is the encoding for quote, and I'm not quite sure where the quotes come from. In the logs URLs used by AjaxSwing appear to be normal:

submitURL = http://localhost:3080/VLPortal?jSessionId=165i9dmhvzd3t, serverURL = http://localhost:3080

I think we really need to see the HTML page that contains problematic images. This will clearly tell if the issue is with AjaxSwing or not, and what is the issue. If the JOptionPane is the one giving problems, get to that page in the application, then hit Refresh button of the browser, and then capture the HTML page. Zip it and attach to this post.

Would it be possible to do the same test with html.disableAjax=true?

Would it be possible for you to email us a link to your application? This way we can look at the page ourselves and that would help a lot (and save your time). This would be the best option.




kdiamond

  • Customer
  • Jr. Member
  • *
  • Posts: 53
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #35 on: April 07, 2009, 05:34:43 PM »
We agree with your assessment of the problematic URLs.  We're also perplexed about the quotes.  Unfortunately, it is not possible for us to capture the HTML page that contains the problematic images -- primarily because the we never see the problematic JOptionPane that contains the images, because our webserver is rejecting the bad URLs.

We ran the test with html.disableAjax=false and it worked.  No problems.

Unfortunately, it it not possible provide a link to our application at this time.  So, I'll attempt to provide you with some more background information.  This problem only seems to be happening with this particular JOptionPane that is being displayed within our openFile() method.  This is an implemented method of the com.creamtec.ajaxswing.support.FileOpener interface.  Here are the steps that are followed: 

1.  Select "Upload" button.  "Upload" is the JButton that has been registered through com.creamtec.ajaxswing.support.ComponentUtils.setFileOpener().
2.  The file chooser is displayed.
3.  The file is chosen for upload.
4.  The "Open" button is pressed.
5.  The upload takes place.
6.  openFile() is invoked.
7.  An attempt is made to show the message pane that has the three bad <img> URLs.  This hangs the browser.  This message pane is simply informing the user that the upload has completed.

Hopefully this information helps.  Thank you.

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #36 on: April 07, 2009, 05:57:03 PM »
Your explanation helps. We'll try to reproduce it and get back to on you this one.


Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #37 on: April 07, 2009, 06:05:53 PM »
We were able to reproduce the problem in our demo application by following your code. We'll fix it and provide a patch shortly.

kdiamond

  • Customer
  • Jr. Member
  • *
  • Posts: 53
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #38 on: April 07, 2009, 06:06:35 PM »
Great news...thank you!

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #39 on: April 07, 2009, 06:31:56 PM »
I believe we have fixed the problem. Please download patched ajaxswing.js file and copy it to AjaxSwing web app scripts/ajaxswing directory, overwriting the existing file.

http://creamtec.com/products/ajaxswing/install/2.4.1/ajaxswing.js

Let us know if the fix works and that it doesn't break other functionality.

kdiamond

  • Customer
  • Jr. Member
  • *
  • Posts: 53
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #40 on: April 08, 2009, 10:18:38 AM »
We are happy to say that the latest problem is now resolved and all regression testing looked very good as well.

Thank you again for all your help!