Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2002-2014 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.servlet.tags;
import java.io.IOException;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
import org.springframework.context.MessageSource;
import org.springframework.context.MessageSourceResolvable;
import org.springframework.context.NoSuchMessageException;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.util.JavaScriptUtils;
import org.springframework.web.util.TagUtils;
/**
* Custom JSP tag to look up a message in the scope of this page. Messages are
* resolved using the ApplicationContext and thus support internationalization.
*
*
Detects an HTML escaping setting, either on this tag instance, the page level,
* or the {@code web.xml} level. Can also apply JavaScript escaping.
*
*
If "code" isn't set or cannot be resolved, "text" will be used as default
* message. Thus, this tag can also be used for HTML escaping of any texts.
*
*
Message arguments can be specified via the {@link #setArguments(Object) arguments}
* attribute or by using nested {@code } tags.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @author Nicholas Williams
* @see #setCode
* @see #setText
* @see #setHtmlEscape
* @see #setJavaScriptEscape
* @see HtmlEscapeTag#setDefaultHtmlEscape
* @see org.springframework.web.util.WebUtils#HTML_ESCAPE_CONTEXT_PARAM
* @see ArgumentTag
*/
@SuppressWarnings("serial")
public class MessageTag extends HtmlEscapingAwareTag implements ArgumentAware {
/**
* Default separator for splitting an arguments String: a comma (",")
*/
public static final String DEFAULT_ARGUMENT_SEPARATOR = ",";
private MessageSourceResolvable message;
private String code;
private Object arguments;
private String argumentSeparator = DEFAULT_ARGUMENT_SEPARATOR;
private List