Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
93352336
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
93352336
编写于
1月 23, 2009
作者:
S
Scott Andrews
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
javadoc polish
上级
16843b3a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
28 addition
and
19 deletion
+28
-19
org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/tags/Param.java
...main/java/org/springframework/web/servlet/tags/Param.java
+7
-4
org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/tags/ParamTag.java
...n/java/org/springframework/web/servlet/tags/ParamTag.java
+1
-2
org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/tags/UrlTag.java
...ain/java/org/springframework/web/servlet/tags/UrlTag.java
+19
-12
org.springframework.web.servlet/src/main/resources/META-INF/spring.tld
...mework.web.servlet/src/main/resources/META-INF/spring.tld
+1
-1
未找到文件。
org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/tags/Param.java
浏览文件 @
93352336
...
...
@@ -20,6 +20,9 @@ package org.springframework.web.servlet.tags;
* Bean used to pass name-value pair parameters from a {@link ParamTag} to a
* {@link ParamAware} tag.
*
* <p>Attributes are the raw values passed to the spring:param tag and have not
* been encoded or escaped.
*
* @author Scott Andrews
* @since 3.0
* @see ParamTag
...
...
@@ -31,28 +34,28 @@ public class Param {
private
String
value
;
/**
* @return the
non-encoded
parameter name
* @return the
raw
parameter name
*/
public
String
getName
()
{
return
name
;
}
/**
* Set the
non-encoded
name of the parameter
* Set the
raw
name of the parameter
*/
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
/**
* @return the
non-encoded
parameter value
* @return the
raw
parameter value
*/
public
String
getValue
()
{
return
value
;
}
/**
* Set the
non-encoded
value of the parameter
* Set the
raw
value of the parameter
*/
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
...
...
org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/tags/ParamTag.java
浏览文件 @
93352336
...
...
@@ -23,8 +23,7 @@ import javax.servlet.jsp.tagext.BodyTagSupport;
* JSP tag for collecting name-value parameters and passing them to a
* {@link ParamAware} ancestor in the tag hierarchy.
*
* <p>
* This tag must be nested under a param aware tag.
* <p>This tag must be nested under a param aware tag.
*
* @author Scott Andrews
* @since 3.0
...
...
org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/tags/UrlTag.java
浏览文件 @
93352336
...
...
@@ -37,26 +37,33 @@ import org.springframework.web.util.TagUtils;
* JSP tag for creating URLs. Modeled after the JSTL c:url tag with backwards
* compatibility in mind.
*
* <p>
* Enhancements to the JSTL functionality include:
* <p>Enhancements to the JSTL functionality include:
* <ul>
* <li>URL encoded template URI variables</li>
* <li>Server and servlet relative URLs in addition to the standard context
* relative.</li>
* <li>XML escaping of URLs</li>
* </ul>
*
* <p>
*
Template URI variables are indicated in the {@link #setValue(String) 'value'}
*
attribute and marked by braces '{}'. The braces and attribute name are
*
replaced by the URL encoded value of a parameter. If no parameter is
*
available the literal value is passed through. Params matched to template
*
variables will not be added to the query
string.
* <p>
Template URI variables are indicated in the {@link #setValue(String) 'value'}
*
attribute and marked by braces '{variableName}'. The braces and attribute name are
*
replaced by the URL encoded value of a parameter defined with the spring:param tag
*
in the body of the url tag. If no parameter is available the literal value is
*
passed through. Params matched to template variables will not be added to the query
* string.
*
* <p>
* URLs can be XML escaped by setting the {@link #setEscapeXml(String)
* <p>Use of the spring:param tag for URI template variables is strongly recommended
* over direct EL substitution as the values are URL encoded. Failure to properly
* encode URL can leave an application vulnerable to XSS and other injection attacks.
*
* <p>URLs can be XML escaped by setting the {@link #setEscapeXml(String)
* 'escapeXml'} attribute to 'true', the default is 'false'.
*
* <p>Example usage:
* <pre><spring:url value="/url/path/{variableName}">
* <spring:param name="variableName" value="more than JSTL c:url" />
* </spring:url></pre>
* Results in:
* <code>/currentApplicationContext/url/path/more+than+JSTL+c%3Aurl</code>
*
* @author Scott Andrews
* @since 3.0
* @see ParamTag
...
...
org.springframework.web.servlet/src/main/resources/META-INF/spring.tld
浏览文件 @
93352336
...
...
@@ -385,7 +385,7 @@
<description>
Escape XML special characters in the resulting URL. 'true' and
'false' are supported. Defaults to 'false' to maintain compatibility with
the JSTL c:url tag. Strongly recommended to set as 'true' when rendering
directly to the JspWriter in an XML or HTML based
file
.
</description>
directly to the JspWriter in an XML or HTML based
document
.
</description>
</attribute>
</tag>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录