@Override
public void write(Object value, Attribute attribute,
TilesRequestContext request) throws IOException {
if (value != null) {
if (value instanceof String) {
ServletTilesRequestContext servletRequest = ServletUtil.getServletRequest(request);
HttpServletRequest httpRequest = servletRequest.getRequest();
HttpServletResponse httpResponse = servletRequest.getResponse();
servlet.setValue((String) value);
try {
servlet.doGet(httpRequest,
new ExternalWriterHttpServletResponse(httpResponse,
request.getPrintWriter()));