"url" macro in "spring.ftl" performs standard Servlet URL encoding automatically

This commit is contained in:
Juergen Hoeller
2009-02-18 23:55:32 +00:00
parent d3d0111439
commit 56bd995d9c
6 changed files with 51 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,10 +18,8 @@ package org.springframework.web.servlet.view;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.TestBean;
import org.springframework.web.servlet.support.BindStatus;
import org.springframework.web.servlet.support.RequestContext;
@@ -129,6 +127,13 @@ public class DummyMacroRequestContext {
return this.contextPath;
}
/**
* @see org.springframework.web.servlet.support.RequestContext#getContextUrl(String)
*/
public String getContextUrl(String relativeUrl) {
return getContextPath() + relativeUrl;
}
/**
* @see org.springframework.web.servlet.support.RequestContext#getBindStatus(String)
*/