Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package controllers;
 
 
 public class FlashController {
     private static final String SUCCESS = "success";
     private static final String WARNING = "warning";
     private static final String ERROR = "error";
    private static final String SIMPLE = "simple";
    public Response flash(Flash flash) {
        flash.add();
        flash.setError();
        flash.setWarning();
        flash.setSuccess();
        return Response.withRedirect("/flashed");
    }
    public Response flashed(Flash flash) {
        StringBuilder buffer = new StringBuilder();
        buffer.append(flash.get()).append(flash.get()).append(flash.get()).append(flash.get());
        return Response.withOk().andTextBody(buffer.toString());
    }
New to GrepCode? Check out our FAQ X