public void serveDependencyResource(VaadinRequest request,
VaadinResponse response) throws IOException {
- String pathInfo = request.getRequestPathInfo();
+ String pathInfo = request.getPathInfo();
// + 2 to also remove beginning and ending slashes
String resourceName = pathInfo
.substring(ApplicationConstants.DEPENDENCY_RESOURCE_PREFIX
* #createReceiverUrl
*/
- String pathInfo = request.getRequestPathInfo();
+ String pathInfo = request.getPathInfo();
// strip away part until the data we are interested starts
int startOfData = pathInfo
.indexOf(ServletPortletHelper.UPLOAD_URL_PREFIX)
@Override
public Class<? extends UI> getUIClass(UIClassSelectionEvent event) {
- String requestPathInfo = event.getRequest().getRequestPathInfo();
+ String requestPathInfo = event.getRequest().getPathInfo();
if (path.equals(requestPathInfo)) {
return uiClass;
} else {
return new BootstrapHandler() {
@Override
protected String getServiceUrl(BootstrapContext context) {
- String pathInfo = context.getRequest().getRequestPathInfo();
+ String pathInfo = context.getRequest().getPathInfo();
if (pathInfo == null) {
return null;
} else {
@Override
public boolean handleRequest(VaadinSession session, VaadinRequest request,
VaadinResponse response) throws IOException {
- String requestPath = request.getRequestPathInfo();
+ String requestPath = request.getPathInfo();
if (requestPath == null) {
return false;
}
VaadinResponse response, String logMessage) throws IOException {
getLogger().log(Level.WARNING, logMessage);
response.sendError(HttpServletResponse.SC_NOT_FOUND,
- request.getRequestPathInfo() + " can not be found");
+ request.getPathInfo() + " can not be found");
// Request handled (though not in a nice way)
return true;
@Override
public boolean handleRequest(VaadinSession session, VaadinRequest request,
VaadinResponse response) throws IOException {
- String pathInfo = request.getRequestPathInfo();
+ String pathInfo = request.getPathInfo();
if (pathInfo == null) {
return false;
}
VaadinResponse response, String logMessage) throws IOException {
getLogger().log(Level.WARNING, logMessage);
response.sendError(HttpServletResponse.SC_NOT_FOUND,
- request.getRequestPathInfo() + " can not be found");
+ request.getPathInfo() + " can not be found");
// Request handled (though not in a nice way)
return true;
private UI getUIInstance(UIProviderEvent event) {
VaadinRequest request = event.getRequest();
- String pathInfo = request.getRequestPathInfo();
+ String pathInfo = request.getPathInfo();
String name = null;
if (pathInfo != null && pathInfo.length() > 0) {
Matcher matcher = WINDOW_NAME_PATTERN.matcher(pathInfo);
}
private static boolean hasPathPrefix(VaadinRequest request, String prefix) {
- String pathInfo = request.getRequestPathInfo();
+ String pathInfo = request.getPathInfo();
if (pathInfo == null) {
return false;
}
@Override
- public String getRequestPathInfo() {
+ public String getPathInfo() {
if (request instanceof ResourceRequest) {
ResourceRequest resourceRequest = (ResourceRequest) request;
String resourceID = resourceRequest.getResourceID();
*
* @see javax.servlet.http.HttpServletRequest#getPathInfo()
*/
- public String getRequestPathInfo();
+ public String getPathInfo();
/**
* Returns the portion of the request URI that indicates the context of the
this.vaadinService = vaadinService;
}
- @Override
- public String getRequestPathInfo() {
- return getPathInfo();
- }
-
@Override
public WrappedSession getWrappedSession() {
return getWrappedSession(true);
public boolean handleRequest(VaadinSession session,
VaadinRequest request, VaadinResponse response) throws IOException {
context.setValue("Context not available");
- relative.setValue(request.getRequestPathInfo());
+ relative.setValue(request.getPathInfo());
params.removeAllItems();
Map<String, String[]> parameters = request.getParameterMap();
public boolean handleRequest(VaadinSession session,
VaadinRequest request, VaadinResponse response)
throws IOException {
- if ("/slowRequestHandler".equals(request.getRequestPathInfo())) {
+ if ("/slowRequestHandler".equals(request.getPathInfo())) {
// Make the navigation request last longer to keep the
// communication error visible
// System.out.println("Got slow content request");
@Override
public Class<? extends UI> getUIClass(UIClassSelectionEvent event) {
VaadinRequest request = event.getRequest();
- String pathInfo = request.getRequestPathInfo();
+ String pathInfo = request.getPathInfo();
if ("/test".equals(pathInfo)) {
return BasicJavaScriptComponent.class;
} else {
public static Label getRequestInfo(String name, VaadinRequest request) {
String info = name;
- info += "<br />pathInfo: " + request.getRequestPathInfo();
+ info += "<br />pathInfo: " + request.getPathInfo();
info += "<br />parameters: " + request.getParameterMap().keySet();
info += "<br />uri fragment: "
+ Page.getCurrent().getLocation().getFragment();
layout.addComponent(new Label("Hello " + name));
- String pathInfo = request.getRequestPathInfo();
+ String pathInfo = request.getPathInfo();
if ("/viewSource".equals(pathInfo)) {
layout.addComponent(new Label("This is the source"));
} else {
@Override
public boolean handleRequest(VaadinSession session,
VaadinRequest request, VaadinResponse response) throws IOException {
- String relativeUri = request.getRequestPathInfo();
+ String relativeUri = request.getPathInfo();
// Catch the given URI that identifies the resource, otherwise let other
// URI handlers or the Application to handle the response.
if (!relativeUri.startsWith("myresource")) {
@Override
public boolean handleRequest(VaadinSession session,
VaadinRequest request, VaadinResponse response) throws IOException {
- String relativeUri = request.getRequestPathInfo();
+ String relativeUri = request.getPathInfo();
if (!relativeUri.contains("icon.png")) {
return false;