Bug 794454 (JBEPP-1494) - Images are processed by PortalRequestHandler
Summary: Images are processed by PortalRequestHandler
Keywords:
Status: CLOSED NEXTRELEASE
Alias: JBEPP-1494
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: Performance, Portal
Version: 5.2.0.GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.2.1.GA
Assignee: mposolda
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBE...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-30 11:23 UTC by mposolda
Modified: 2012-03-28 00:14 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-01-30 11:34:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBEPP-1494 0 None Closed Images are processed by PortalRequestHandler 2012-03-28 09:49:52 UTC

Description mposolda 2012-01-30 11:23:16 UTC
project_key: JBEPP

See GTNPORTAL-2338

Comment 2 mposolda 2012-01-30 11:34:06 UTC
Release Notes Docs Status: Added: Not Yet Documented


Comment 3 mposolda 2012-01-30 11:35:54 UTC
Release Notes Text: Added: PROBLEM: For simulation the problem, it's sufficient to point browser to http://localhost:8080/portal/classic and log all HTTP requests sent by browser. It can be seen that HTTP requests for obtain images (*.jpg, *.gif, favicon.ico, ...) are repeated during each HTTP request to portal page and HTTP response contains header "Cache-control: no-cache" for all images.

CAUSED BY: Problem is caused by incorrect mapping of staticResource handler in controller.xml . StaticResource handler is mapped after PortalRequestHandler, which means that all images are firstly processed by PortalRequestHandler. This is non-sense and it results that incorrect HTTP header "Cache-control: no-cache" is used for images and some non-sense operations are called (like calling DataStorage.getPortalConfig with argument "favicon.ico" ).

SOLUTION: Thing is that images should be processed only by StaticResourceHandler and not by PortalRequestHandler at all. So I changed the order in controller.xml configuration, and I've added StaticResourceHandler before PortalRequestHandler (it was opposite before).



Comment 4 mposolda 2012-01-30 11:36:35 UTC
Link: Added: This issue is related to GTNPORTAL-2338


Comment 5 mposolda 2012-01-30 16:27:41 UTC
Release Notes Text: Removed: PROBLEM: For simulation the problem, it's sufficient to point browser to http://localhost:8080/portal/classic and log all HTTP requests sent by browser. It can be seen that HTTP requests for obtain images (*.jpg, *.gif, favicon.ico, ...) are repeated during each HTTP request to portal page and HTTP response contains header "Cache-control: no-cache" for all images.

CAUSED BY: Problem is caused by incorrect mapping of staticResource handler in controller.xml . StaticResource handler is mapped after PortalRequestHandler, which means that all images are firstly processed by PortalRequestHandler. This is non-sense and it results that incorrect HTTP header "Cache-control: no-cache" is used for images and some non-sense operations are called (like calling DataStorage.getPortalConfig with argument "favicon.ico" ).

SOLUTION: Thing is that images should be processed only by StaticResourceHandler and not by PortalRequestHandler at all. So I changed the order in controller.xml configuration, and I've added StaticResourceHandler before PortalRequestHandler (it was opposite before).
 Added: PROBLEM: For simulation the problem, it's sufficient to point browser to http://localhost:8080/portal/classic and log all HTTP requests sent by browser. It can be seen that HTTP requests for obtain images (*.jpg, *.gif, favicon.ico, ...) are repeated during each HTTP request to portal page and HTTP response contains header "Cache-control: no-cache" for all images. This is bad from performance perspective on server side (more request for images needs to be processed by server) but also from client side (Images needs to be received from server to client after each HTTP request to portal page, which is bad for bandwidth as network is more burdened because of this).

CAUSED BY: Problem is caused by incorrect mapping of staticResource handler in controller.xml . StaticResource handler is mapped after PortalRequestHandler, which means that all images are firstly processed by PortalRequestHandler. This is non-sense and it results that incorrect HTTP header "Cache-control: no-cache" is used for images and some non-sense operations are called (like calling DataStorage.getPortalConfig with argument "favicon.ico" ).

SOLUTION: Thing is that images should be processed only by StaticResourceHandler and not by PortalRequestHandler at all. So I changed the order in controller.xml configuration, and I've added StaticResourceHandler before PortalRequestHandler (it was opposite before).



Comment 6 mposolda 2012-03-22 19:43:50 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
CAUSE: Problem is caused by incorrect mapping of staticResource handler in
controller.xml . StaticResource handler is mapped after PortalRequestHandler,
which means that all images are firstly processed by PortalRequestHandler. This
is non-sense and it results that incorrect HTTP header "Cache-control:
no-cache" is used for images and some non-sense operations are called (like
calling DataStorage.getPortalConfig with argument "favicon.ico" ).

FIX: Thing is that images should be processed only by
StaticResourceHandler and not by PortalRequestHandler at all. So I changed the
order in controller.xml configuration, and I've added StaticResourceHandler
before PortalRequestHandler (it was opposite before).

Comment 7 Jared MORGAN 2012-03-28 00:14:31 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,11 +1 @@
-CAUSE: Problem is caused by incorrect mapping of staticResource handler in
+It was discovered that an incorrect mapping order in controller.xml caused PortalRequestHandler to process images. Because PortalRequestHandler was not designed to process images, incorrect HTTP header information was used for images. The fix corrects the mapping order in controller.xml so StaticResourceHandler is declared before PortalRequestHandler. This ensures the appropriate handler is called to manage images.-controller.xml . StaticResource handler is mapped after PortalRequestHandler,
-which means that all images are firstly processed by PortalRequestHandler. This
-is non-sense and it results that incorrect HTTP header "Cache-control:
-no-cache" is used for images and some non-sense operations are called (like
-calling DataStorage.getPortalConfig with argument "favicon.ico" ).
-
-FIX: Thing is that images should be processed only by
-StaticResourceHandler and not by PortalRequestHandler at all. So I changed the
-order in controller.xml configuration, and I've added StaticResourceHandler
-before PortalRequestHandler (it was opposite before).


Note You need to log in before you can comment on or make changes to this bug.