Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.2
-
Fix Version/s: 1.8.2-EE-Beta, 1.8.2-EE-GA, 1.8.3
-
Component/s: ICE-Components
-
Labels:None
-
Environment:debian linux 5.0.2, glassfish 2.1, icefaces 1.8.2
client firefox under windows and linux
not tested with internet explorer
-
ICEsoft Forum Reference:
Description
the new way causes images to not be refreshed
this sort of "caching effect" problems is not happening on the client but on the server side.
1.8.1 generates those urls quite differently and it is not affected
More details can be found in the forum reference
-
Hide
- ICE-5048.war
- 6.41 MB
- Adnan Durrani
-
- META-INF/MANIFEST.MF 0.0 kB
- index.jsp 0.1 kB
- images/4.gif 0.4 kB
- images/6.gif 0.6 kB
- WEB-INF/lib/xercesImpl.jar 1.15 MB
- WEB-INF/lib/icefaces-comps.jar 1.94 MB
- WEB-INF/classes/bean/Bean.class 2 kB
- WEB-INF/lib/commons-collections.jar 558 kB
- WEB-INF/lib/backport-util-concurrent.jar 319 kB
- WEB-INF/classes/bean/Bean.java 1 kB
- WEB-INF/lib/commons-beanutils.jar 226 kB
- WEB-INF/lib/commons-logging.jar 52 kB
- WEB-INF/lib/jstl.jar 20 kB
- images/3.gif 0.1 kB
- main.jspx 0.7 kB
- images/1.gif 0.8 kB
- WEB-INF/.../krysalis-jCharts-1.0.0-alpha-1.jar 151 kB
- WEB-INF/web.xml 2 kB
- WEB-INF/lib/xml-apis.jar 190 kB
- WEB-INF/lib/icefaces.jar 1.18 MB
- WEB-INF/lib/commons-digester.jar 140 kB
- images/8.gif 0.6 kB
- images/5.gif 0.6 kB
- WEB-INF/lib/jsf-api.jar 356 kB
- WEB-INF/lib/jsf-impl.jar 778 kB
- images/2.gif 3 kB
- WEB-INF/lib/commons-fileupload.jar 56 kB
- WEB-INF/faces-config.xml 0.5 kB
- images/7.gif 0.6 kB
-
Hide
- icefaces-comps.jar
- 1.95 MB
- Adnan Durrani
-
- META-INF/MANIFEST.MF 0.3 kB
- com/icesoft/.../component/CSS_DEFAULT.class 10 kB
- com/icesoft/.../component/CheckboxTag.class 4 kB
- com/icesoft/.../ColumnGroupTag.class 4 kB
- com/icesoft/.../CommandButtonTag.class 14 kB
- com/icesoft/.../CommandLinkTag.class 15 kB
- com/icesoft/.../ContextActionEvent.class 1 kB
- com/icesoft/.../component/DataTableTag.class 14 kB
- com/icesoft/.../component/DisplayEvent.class 2 kB
- com/.../ExtendedAttributeConstants.class 11 kB
- com/icesoft/.../component/FormTag.class 9 kB
- com/icesoft/.../GraphicImageTag.class 12 kB
- com/icesoft/.../component/HeaderRowTag.class 4 kB
- com/icesoft/.../InputHiddenTag.class 5 kB
- com/icesoft/.../InputSecretTag.class 16 kB
- com/icesoft/.../component/InputTextTag.class 15 kB
- com/icesoft/.../InputTextareaTag.class 15 kB
- com/.../InvalidComponentTypeException.class 0.4 kB
- com/icesoft/.../component/MessageTag.class 8 kB
- com/icesoft/.../component/MessagesTag.class 9 kB
- com/icesoft/.../OutputBodyTag.class 6 kB
- com/icesoft/.../OutputFormatTag.class 6 kB
- com/icesoft/.../OutputHeadTag.class 4 kB
- com/icesoft/.../OutputHtmlTag.class 3 kB
- com/icesoft/.../OutputLabelTag.class 10 kB
- com/icesoft/.../OutputLinkTag.class 14 kB
- com/icesoft/.../OutputTextTag.class 11 kB
- com/icesoft/.../component/PanelGridTag.class 11 kB
- com/icesoft/.../PanelGroupTag.class 14 kB
- com/icesoft/.../component/RadioTag.class 4 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
This is what i do.
I can see the hashCode changing in the uri and sniffing the browser actions (with httpfox and firefox) i can see that the browser actually requests the new picture.
I tracked my server application and i am sure that a new picture and a new byte array are generated whenever i have a new image to display.
The problem is that it seems that the picture served is not updated even if a new byte array is given and even if the hash code proves that the array is new.
I am attaching a slide show demo using byte[] and 1.8.2 jars. I have tested it with tomat6 + FF3, IE8, Safari and Chrome. Seems to be working fine. Can you please test it, mean while we will test it with your configuration. App has source as well.
Hi,
i'm having much trouble in getting "C:\work\1.jpg" work in a linux environment.
Could you please provide me the source code of the test case so i can adapt it to my system or modify it so it searches for images in the application context root?
Thanks
Maybe just a stupid guess. But I hope the hashcode of the byte[ ] isn't just computed as bytes.hashCode() (where bytes is a byte[ ])? That delivers the address of the array, not a valid hash code (the Object default)! But it would perfectly explain the results I am seeing...
Regards, Paul.
Attaching new war file, which doesn't require any external file. Images are served from the web/images.
When I encountered this bug, it doesn't fail all the time. It works the first time I enter a Java bean page with graphicImage. It is when I enter the Java bean page the second time and afterwards that graphicImage stops changing.
i tested the app with glassfish 2.1 and tomcat 6.0.18
with glassfish initially all seems to work ok but if i reload the page (via the browser button) all stops working as described before. no error is given but pressing the get next image button does not produce the expected result.
same test with tomcat works fine even after reloading the page
Thanks Hybris for the testing of the application with both web servers. So this seems like server specific issue. We will look into it.
I think that's just a coincidence. I'm having the same kind of problem with a number of pages in Tomcat 6, not with all, and not with this example you provided though.
This can be easily reproduce on Glassfish after page reload.
Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\HtmlGraphicImage.java
Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\HtmlGraphicImage.java
Completed: At revision: 19589
Modified: D:\work\development\head\svn\ossrepo\icefaces-ee\branches\icefaces-ee-1.8.2\icefaces\component\src\com\icesoft\faces\component\ext\HtmlGraphicImage.java
Sending content: D:\work\development\head\svn\ossrepo\icefaces-ee\branches\icefaces-ee-1.8.2\icefaces\component\src\com\icesoft\faces\component\ext\HtmlGraphicImage.java
Completed: At revision: 19591
The bug has been fix, for quick testing I am attaching a patched jar. can you please verify it.
Thanks,
Tested it with the patched jar on Tomcat 6. Looks like my image problem has been solved.
Thanks, Adnan. Regards, Paul.
works for me
thanks
Thanks Paul and Hybris for verification.
Test app has been added to repo\qa\trunk\Regression\ICE-5048. Thanks, Adnan.
We fixed a memory leak in 1.8.2, so regardless of number of images get served would be served by one resource only. To let the browser know when to request a new image we pass the hashCode of the contents of the image. In graphicImage case its the hashcode of the byte[]. So its in the control of the application. Don't recreate the byte array for the served images. Only recreate it when you want new picture to be loaded.
uri.getPath()+ "?"+ content.hashCode();