Preheat the oven to 180°C (160°C fan oven) Gas Mark 4. Roll out the pastry on a lightly floured surface until big enough to line a 22cm round deep loose-bottomed tart tin. Line the pastry with foil or greaseproof paper, fill with baking beans and bake for 25 minutes. Remove the paper and beans and cook for 10 minutes more until golden, then spread the cherry jam over the base and set aside.
Make the filling by putting the flour, coconut, butter, sugar and eggs into a big mixing bowl. Beat with an electric whisk until smooth.
Spread the coconut filling over the jam base. Arrange the pineapple rings on top, with a whole cherry in the centre of each, then bake for 35-40 minutes until the sponge is risen and firm. Cool completely in the tin.
Lift from the tin and dust with a little icing sugar before slicing. Serve with ice cream, custard or single cream, if you like.