For the last couple of days, I was struggling with Java ServerFaces. The exact problem was, that commandButtons were working as expected, but commandLinks were not. We are using Apache MyFaces with Tomahawk and Sandbox components. We were going to use commandLinks for navigation and other uses like selecting nodes in Tomahawks’
tree2 component, but we were forced to render commandButtons instead, which looked quite awkward in some places.
application/xhtml+xml. I checked what content type I was getting from my server, and it was
text/xml. When I’ve added
<jsp:directive.page contentType="text/html; charset=UTF-8"/> to header of my page, suddenly all commandLinks started to work correctly.
-->. That’s enough when your content type is not something like
Apparently, MyFaces doesn’t do that. I’ll confirm that, and if that’s true I’ll report a bug and provide a patch. So keep up, I’ll tell you when that will happen, and post this patch here also.