List of usage examples for com.vaadin.server VaadinRequest getMethod
public String getMethod();
From source file:annis.gui.requesthandler.BinaryRequestHandler.java
License:Apache License
@Override public boolean handleRequest(VaadinSession session, VaadinRequest request, VaadinResponse response) throws IOException { if (request.getPathInfo() != null && request.getPathInfo().startsWith(prefix)) { if ("GET".equalsIgnoreCase(request.getMethod())) { sendResponse(session, request, response, true); return true; } else if ("HEAD".equalsIgnoreCase(request.getMethod())) { sendResponse(session, request, response, false); return true; }//from www . ja v a 2 s.co m } return false; }
From source file:annis.gui.requesthandler.LoginServletRequestHandler.java
License:Apache License
@Override public boolean handleRequest(VaadinSession session, VaadinRequest request, VaadinResponse response) throws IOException { if (request.getPathInfo() != null && request.getPathInfo().startsWith(prefix)) { if ("GET".equalsIgnoreCase(request.getMethod())) { doGet(session, request, response); return true; } else if ("POST".equalsIgnoreCase(request.getMethod())) { doPost(session, request, response); return true; }//from w w w .j a va 2 s . co m } return false; }