Update LayoutFilter.java

Fix issue of when jsp files are too large. So instead of writing to the response and then discard this if the layoutFile is not null, don't write to the response unless the Layout file is null.