📄 file.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: File.java
package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
// Referenced classes of package org.apache.struts2.components:
// UIBean, Form
public class File extends UIBean
{
private static final Log log = LogFactory.getLog(org/apache/struts2/components/File);
public static final String TEMPLATE = "file";
protected String accept;
protected String size;
public File(ValueStack stack, HttpServletRequest request, HttpServletResponse response)
{
super(stack, request, response);
}
protected String getDefaultTemplate()
{
return "file";
}
public void evaluateParams()
{
super.evaluateParams();
Form form = (Form)findAncestor(org/apache/struts2/components/Form);
if (form != null)
{
String encType = (String)form.getParameters().get("enctype");
if (!"multipart/form-data".equals(encType))
log.warn("Struts has detected a file upload UI tag (s:file) being used without a form set to enctype 'multipart/form-data'. This is probably an error!");
String method = (String)form.getParameters().get("method");
if (!"post".equalsIgnoreCase(method))
log.warn("Struts has detected a file upload UI tag (s:file) being used without a form set to method 'POST'. This is probably an error!");
}
if (accept != null)
addParameter("accept", findString(accept));
if (size != null)
addParameter("size", findString(size));
}
public void setAccept(String accept)
{
this.accept = accept;
}
public void setSize(String size)
{
this.size = size;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -