I deployed my roo application in the cloud and run it successfully
using FF and a recent version of IE.
I asked a user to try the application. Bad idea.
He uses an older version of IE (IE<=8 on xp) and in this case,
the HTTP header Accept does not include "text/html".
See related discussion at http://www.gethifi.com/blog/browser-...accept-headers
There are 2 handler methods generated by ROO to choose from:
andCode:@RequestMapping(produces = "text/html") public String ProjectController.list(...
Code:@RequestMapping(headers = "Accept=application/json") @ResponseBody public ResponseEntity<String> ProjectController.listJson() {...
The first method returns html and the second Json.
When a request does not accept "text/html" as with IE8 on xp, an unexpected Json
response is returned to the browser. I would have preferred a html response.
As a quick workaround, I wrote a third handler to catch these incomplete requests:
Note that "application/x-ms-application" is part of the IE request Accept header.Code:@RequestMapping(headers = "Accept=application/x-ms-application") public String listUnfairBrowser( @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) { return list(page,size,uiModel); }
Is it possible to assign a priority to one of the many handler methods ?
Is there another way to support requests from older IE versions ? I fear most of
my users will be using this platform![]()


Reply With Quote
