Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Images not visible
Images not visible [message #1231564] Wed, 15 January 2014 00:22 Go to next message
Vincenzo Caselli is currently offline Vincenzo CaselliFriend
Messages: 100
Registered: January 2012
Senior Member
Hi all,
in a production environment we have a large number of clients using IE8.
On these clients all images (upper banner, button and label images, images for radiobuttons, etc...) are just invisible!

The same application works well instead with IE9..11 and with FF and Chrome.

It seems like the problem is getting images that are into the deployed plugin-jars.
What could be the reason?
Thank you
Vincenzo
Re: Images not visible [message #1231648 is a reply to message #1231564] Wed, 15 January 2014 06:08 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 1873
Registered: July 2009
Senior Member
Hi Vincenzo,
if you create a test project that demonstrate the issue we will
investigate it.
BTW... which RAP version are you using?
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Images not visible [message #1233027 is a reply to message #1231648] Sat, 18 January 2014 11:31 Go to previous messageGo to next message
Vincenzo Caselli is currently offline Vincenzo CaselliFriend
Messages: 100
Registered: January 2012
Senior Member
Hi Ivan,
we are using RAP 2.2.
We tested the RAP Demo and the images are ok, also on those problematic IE8 clients!

One of the differences from the RAP Demo app and our RAP application is that our application has a filter in web.xml (this is a mandatory constraint from the customer: it is used for authorization access).
  <filter>
  	<filter-name>AuthFilter</filter-name>
  	<filter-class>authfilter.Filter</filter-class>
  </filter>
  
  <filter-mapping>
  	<filter-name>AuthFilter</filter-name>
  	<url-pattern>/*</url-pattern>
  </filter-mapping>


May this be a cause for blocking the images?

Note that we are getting images with the standard RCP way, e.g.

Activator.getImageDescriptor("icons/send.png")
(and yes, images are exported in build.properties)

How this way differ from the standard web ("href=...") way?

Thank you
Vincenzo
Re: Images not visible [message #1233352 is a reply to message #1231648] Sun, 19 January 2014 10:59 Go to previous messageGo to next message
Vincenzo Caselli is currently offline Vincenzo CaselliFriend
Messages: 100
Registered: January 2012
Senior Member
Hi Ivan,
sorry, I can't create a test project to demonstrate the problem: the issue happens only when the war is deployed into the customer Tomcat server; further, the application has a filter in web.xml for authentication (the app is launched from a portal with a link).
More, the problem happens with clients with IE8 and security settings for their Intranet.

But we have some info that may help: not all images are invisible (see attachments).
For example the image with the X on the tab for closing a view is visible!
The same is valid for the drop down arrow showed in a Combo.
Instead the images for the radiobuttons (for selection) are invisible (the business.css has the tag
Button-RadioIcon {
background-image: url( theme/resources/button/radio-unselected.png );
}
)
Also images on Buttons are invisible.
Does this help to understand what is happening?
We just want to show images, so any suggestion on alternative ways to do this (via CSS or whatever) is greatly, greatly welcome.
Thank you very much!
Vincenzo
Re: Images not visible [message #1233641 is a reply to message #1233352] Mon, 20 January 2014 07:05 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 1873
Registered: July 2009
Senior Member
Hi Vincenzo,
I really have no idea what is going on. Could be a bad IE8 configuration
or missing MS patch/update??!! Could you try this online testing service
[1], which provides online access to a virtual testing environment
(OS+browser). Is it also reproducible there on Windows XP + IE8?

[1] https://saucelabs.com/
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Images not visible [message #1233720 is a reply to message #1233641] Mon, 20 January 2014 10:28 Go to previous messageGo to next message
Vincenzo Caselli is currently offline Vincenzo CaselliFriend
Messages: 100
Registered: January 2012
Senior Member
Hi Ivan,
thank you!
However we are making some progress: if we remove the web.xml filter, then all is ok: all images are showed also with those problematic IE8 clients.

How can we relax this filter with RAP: I mean, now the filter is "/*", so it filters everything, including images (it usually handles JSP pages, so often other application set it to /*.jsp for example)?

Thank you
Vincenzo
Re: Images not visible [message #1234180 is a reply to message #1233720] Tue, 21 January 2014 12:18 Go to previous messageGo to next message
Vincenzo Caselli is currently offline Vincenzo CaselliFriend
Messages: 100
Registered: January 2012
Senior Member
Analyzing the Tomcat logs we see that requests are like the following:

 "GET /myapp/mycontext HTTP/1.1" 200 198
 "GET /myapp/mycontext HTTP/1.1" 200 3393
 "GET /myapp/rwt-resources/themes/images/ee7d83c5.png HTTP/1.1" 200 2962
 "GET /myapp/rwt-resources/resources.js HTTP/1.1" 200 20000
 "GET /myapp/rwt-resources/rap-client.js HTTP/1.1" 200 1055423
 "GET /myapp/rwt-resources/rap-rwt.theme.Fallback.json HTTP/1.1" 200 26843
 "GET /myapp/rwt-resources/rap-rwt.theme.Custom_c072efd1.json HTTP/1.1" 200 54588
 "POST /myapp/mycontext?cid=fcc2887c HTTP/1.1" 200 21297
 "GET /myapp/rwt-resources/generated/fb89ea96.gif HTTP/1.1" 200 60
 "GET /myapp/rwt-resources/resource/static/image/blank.gif HTTP/1.1" 200 49
 "GET /myapp/rwt-resources/generated/aa12df6e.png HTTP/1.1" 200 2922
 "GET /myapp/rwt-resources/generated/e72329fd.png HTTP/1.1" 200 1016
 "GET /myapp/rwt-resources/generated/145f7d1e.png HTTP/1.1" 200 2813
 "GET /myapp/rwt-resources/generated/8cbbb32c.png HTTP/1.1" 200 2832
 "GET /myapp/rwt-resources/generated/96adb740.gif HTTP/1.1" 200 3458
 "GET /myapp/rwt-resources/themes/images/ad06bd9.png HTTP/1.1" 200 3066
 "GET /myapp/rwt-resources/generated/f51f7aab.png HTTP/1.1" 200 2792
 "GET /myapp/rwt-resources/generated/6b8f29e4.png HTTP/1.1" 200 2809
 "GET /myapp/rwt-resources/generated/c1495f4f.png HTTP/1.1" 200 2809
 "GET /myapp/rwt-resources/generated/d8776814.png HTTP/1.1" 200 2812
 "GET /myapp/rwt-resources/generated/27157334.png HTTP/1.1" 200 2811
 "GET /myapp/rwt-resources/generated/10c4785d.png HTTP/1.1" 200 2847
 "GET /myapp/mycontext?servicehandler=org.eclipse.rap.serverpush&cid=fcc2887c HTTP/1.1" 200 -
 "POST /myapp/mycontext?cid=fcc2887c HTTP/1.1" 200 2844
 "POST /myapp/mycontext?cid=fcc2887c HTTP/1.1" 200 45
 "POST /myapp/mycontext?cid=fcc2887c HTTP/1.1" 200 45
 "POST /myapp/mycontext?cid=fcc2887c HTTP/1.1" 200 22914
 "GET /myapp/rwt-resources/themes/images/ae8b4acf.png HTTP/1.1" 200 2881


As you can see there are requests for .png and .gif files that have a different URL pattern.

So we tried to replace the generic "/*" filter with a more specific one (hoping to allow the images not to be filtered)

 <filter>
  	<filter-name>MyFilter</filter-name>
  	<filter-class>filterlib.FilterClass</filter-class>
  </filter>
  
  <filter-mapping>
  	<filter-name>MyFilter</filter-name>
  	<url-pattern>/myapp/mycontext/*</url-pattern>
  </filter-mapping>


but images are not shown again!

In the end: without doubt the problem is caused by the filter (in fact just removing it causes all the images to show correctly), but how can we change the filter url-pattern in order to make the images pass?
The hint must be related with another question: why some image (1) are visible also with the filter? How the loading mechanism differs from the ones that are not shown (2)?

Thank you
Vincenzo

(1) the image for the X on the Tab for Closing a View
(1) the DropDown triangle image on the right side of a Combo box

(2) the Radio Buttons selected/unselected icons
(2) the images on a Button
Re: Images not visible [message #1234316 is a reply to message #1234180] Tue, 21 January 2014 17:16 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1296
Registered: July 2009
Senior Member

Hi Vincenzo,

it seems that you can have mulitple url-patterns in a filter-mapping
[1]. Does that help?

> The hint must be related with another question: why some image (1) are
> visible also with the filter? How the loading mechanism differs from the
> ones that are not shown (2)?

Could this difference be caused by theming images being kept in the
browser cache and others not?

Regards,
Ralf

[1]
https://stackoverflow.com/questions/11645516/giving-multiple-url-patterns-to-servlet-filter

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Images not visible [message #1234407 is a reply to message #1234316] Tue, 21 January 2014 22:48 Go to previous messageGo to next message
Vincenzo Caselli is currently offline Vincenzo CaselliFriend
Messages: 100
Registered: January 2012
Senior Member
Hi Ralf!

Quote:
it seems that you can have mulitple url-patterns in a filter-mapping
[1]. Does that help?


it may, but I have some difficulties in understanding the severals requests (see the Tomcat log in previous message) that RAP is sending (I would just 'exclude' *.png, *.gif and so on)

Quote:

> The hint must be related with another question: why some image (1) are
> visible also with the filter? How the loading mechanism differs from the
> ones that are not shown (2)?

Could this difference be caused by theming images being kept in the
browser cache and others not?


At first we also thought about a cache problem, but if we remove the filter the images are ok; then if we set the filter the images are ko, for the same client, just like a on/off switch.
So it does not seem to be caused by a cache-effect, there must be a deterministic cause ...
It's incredible: we have some images showing correctly, but are unable to apply the same way for the others.
Thank you
Vincenzo
Re: Images not visible [message #1235019 is a reply to message #1234316] Thu, 23 January 2014 11:10 Go to previous messageGo to next message
Vincenzo Caselli is currently offline Vincenzo CaselliFriend
Messages: 100
Registered: January 2012
Senior Member
Hi Ralf,
ok, I am trying to follow this suggestion (multiple filters), I just need some help in understanding the RAP requests.

If I set the url-pattern to:
/myapp/mycontext/*

the filter is not applied, nor to the application, neither to the images. So that's not good.

The same happens with the following url-patterns:
/myapp/mycontext/

/myapp/mycontext

/myapp/*


If I set the url-pattern to:
/*

the filter is applied, both to the application and to the images. So that's not good.

On the other side Servlet filters does not support exclusions (I would like to exclude all images from the filter for example).

The url-pattern can be also set by extensions, like "*.jsp", but this seems to be useless in this case I think.

Do you have any suggestion on what pattern should I use?

Thank you very much
Vincenzo
Re: Images not visible [message #1235047 is a reply to message #1235019] Thu, 23 January 2014 12:31 Go to previous messageGo to next message
Vincenzo Caselli is currently offline Vincenzo CaselliFriend
Messages: 100
Registered: January 2012
Senior Member
Sorry Ralf,
I waw including the prefix "/myapp", which is not to be included in the url-pattern.
Let me try more.
I'll keep you updated.
Thank you
Vincenzo
Re: Images not visible [message #1235892 is a reply to message #1235047] Sat, 25 January 2014 16:07 Go to previous messageGo to next message
Vincenzo Caselli is currently offline Vincenzo CaselliFriend
Messages: 100
Registered: January 2012
Senior Member
Hi Ralf, Ivan!
I am very sorry to have bothered you so much about this issue.
But we came to a point: the problem is absolutely reproducible and we've found what is causing it.
Filters are innocent!

The problems can be reproduced with Win XP + IE8 by passing a query string with a / character in the value, e.g.

http://rcp-vision.no-ip.biz:1123/rapdemo/workbench?a=/b
(we deployed this application following the tutorial at http://www.eclipse.org/rap/developers-guide/devguide.php?topic=deployment.html&version=2.2)

you can test it with saucelabs.com:
you will see that menu icons are not visible, as well as on the Demo button.
And to make the mistery more complex: we tried also with your URL
http://rap.eclipsesource.com/workbenchdemo/workbench?a=/b
but there the images are ok: I really cannot tell what may be the difference from our deployment.

We don't know if we can force our customer to avoid this character in the query string, but at least now we know where the problem is.
Any suggestion is welcome.
I want to thank you very much for your patience till now.
Cheers
Vincenzo


[Updated on: Sat, 25 January 2014 16:07]

Report message to a moderator

Re: Images not visible [message #1236507 is a reply to message #1235892] Mon, 27 January 2014 11:22 Go to previous messageGo to next message
Vincenzo Caselli is currently offline Vincenzo CaselliFriend
Messages: 100
Registered: January 2012
Senior Member
Hi Ralf, Ivan,
I attached the image of the test.
As you can see not all images are hidden.
Can you give us a hint on how to solve the issue?
Any workaround is welcome.
Thank you very much.

Vincenzo
Re: Images not visible [message #1237238 is a reply to message #1236507] Wed, 29 January 2014 08:00 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 1873
Registered: July 2009
Senior Member
Hi Vincenzo,
just tested our online Workbench Demo [1] on my Windows XP SP3 + IE8
and all images are visible. Do you have a proxy... or reverse proxy
setup? In IE8 all background images (set as CSS background-image) have
absolute URLs. This is needed to avoid "mixed content warning" in IE8
under SSL. Could you verify that the missing images are requested with
absolute URL and the showing one with relative URL?

[1] http://rap.eclipsesource.com/workbenchdemo/workbench?a=/b
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Images not visible [message #1237493 is a reply to message #1237238] Wed, 29 January 2014 21:19 Go to previous messageGo to next message
Vincenzo Caselli is currently offline Vincenzo CaselliFriend
Messages: 100
Registered: January 2012
Senior Member
Hi Ivan,
no, I haven't a proxy or reverse proxy setup.
I attached your workbench demo application screenshot with the missing icons highlighted.
I bet you can easily spot why some of them are missing and others not.

If you can suggest what RAP source plugin we can import as source and modify somewhere, in order to solve the problem, well, you are greatly welcome! Wink

Thank you very much.
Vincenzo
Re: Images not visible [message #1237510 is a reply to message #1237493] Wed, 29 January 2014 22:15 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 1873
Registered: July 2009
Senior Member
Hi Vincenzo,
please import as source "org.eclipse.rap.rwt" bundle. Open
"org.eclipse.rap.rwt\js\rwt\html\Style.js" file and scroll to the end.
Change _basePath to return empty string. Does it make any difference?
P.S. Once a JavaScript file is modified you must use
"org.eclipse.rap.clientbuilder" bundle in "releng" folder to rebuild the
client.js located in "org.eclipse.rap.rwt\resources\client.js". You can
test your changes without rebuilding the client.js if you start your
application in development mode.

HTH,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Images not visible [message #1237521 is a reply to message #1237493] Wed, 29 January 2014 22:45 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 1873
Registered: July 2009
Senior Member
Hi Vincenzo,
I've managed to reproduce the problem and I've opened a bug about it:
426958: Some images are missing in IE8 if URL contains parameter with "/"
https://bugs.eclipse.org/bugs/show_bug.cgi?id=426958
It's not reproducible with online Workbench Demo as it is still based on
RAP 2.1.
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Images not visible [message #1238050 is a reply to message #1237493] Fri, 31 January 2014 09:08 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 1873
Registered: July 2009
Senior Member
Hi Vincenzo,
this issue is fixed in master. Thanks for your patience and persistence.
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Images not visible [message #1238074 is a reply to message #1238050] Fri, 31 January 2014 10:26 Go to previous messageGo to next message
Vincenzo Caselli is currently offline Vincenzo CaselliFriend
Messages: 100
Registered: January 2012
Senior Member
Hi Ivan,
my compliments to the entire RAP Team!
Now, what path should I follow for deploying a new war?

1) for what I have understood one option may be switch back to RAP 2.1 (I am using a Target platform definition file)

2) the other option is to use the just fixed version on master. But in this case, how do I proceed? Just check out (over my current RAP 2.2 target platform) the fixed plugin from the master and include it in the deployment process?

What is your advice?
Thank you very much

Vincenzo
Re: Images not visible [message #1238088 is a reply to message #1238074] Fri, 31 January 2014 11:14 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 1873
Registered: July 2009
Senior Member
Hi Vincenzo,
you could use the nightly p2 repo (or zip) from RAP download page [1].

[1] http://eclipse.org/rap/downloads/
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:Problem porting from RAP 2.0 to RAP 2.2
Next Topic:[ANN] RAP 2.3 M1 is available
Goto Forum:
  


Current Time: Mon Dec 22 17:57:11 GMT 2014

Powered by FUDForum. Page generated in 0.02389 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software