diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java index 007596ebf0..75a25ca460 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java @@ -166,7 +166,7 @@ public class UrlTag extends HtmlEscapingAwareTag implements ParamAware { /** - * Sets the value of the URL. + * Set the value of the URL. */ public void setValue(String value) { if (value.contains(URL_TYPE_ABSOLUTE)) { @@ -184,7 +184,8 @@ public class UrlTag extends HtmlEscapingAwareTag implements ParamAware { } /** - * Set the context path for the URL. Defaults to the current context + * Set the context path for the URL. + * Defaults to the current context. */ public void setContext(String context) { if (context.startsWith("/")) { @@ -375,7 +376,7 @@ public class UrlTag extends HtmlEscapingAwareTag implements ParamAware { String value = param.getValue(); try { uri = StringUtils.replace(uri, template, - (value != null ? UriUtils.encodePathSegment(param.getValue(), encoding) : "")); + (value != null ? UriUtils.encodePathSegment(value, encoding) : "")); } catch (UnsupportedCharsetException ex) { throw new JspException(ex); diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsUrlInfo.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsUrlInfo.java index 028e4a4649..466a469c5d 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsUrlInfo.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsUrlInfo.java @@ -28,8 +28,8 @@ import org.springframework.web.util.UriComponentsBuilder; /** * Container for the base URL of a SockJS endpoint with additional helper methods - * to derive related SockJS URLs as the {@link #getInfoUrl() info} URL and - * {@link #getTransportUrl(TransportType) transport} URLs. + * to derive related SockJS URLs: specifically, the {@link #getInfoUrl() info} + * and {@link #getTransportUrl(TransportType) transport} URLs. * * @author Rossen Stoyanchev * @since 4.1