FileWrapper.java的代码如下:package com.struts2.bean;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class FileWrapper {
private File file;
public void setFile(File file) {
this.file = file;
}
private List<FileWrapper> children = new ArrayList<FileWrapper>();
public List<FileWrapper> getChildren() {
return children;
}
public void setChildren(List<FileWrapper> children) {
this.children = children;
}
//子文件list
public FileWrapper(File file)
{
this.file = file;
File[] files= this.file.listFiles();
for(int i = 0; files != null&& i < files.length; i++)
{
FileWrapper wrapper = new FileWrapper(files[i]);
children.add(wrapper);
}
}
public File getFile()
{
return file;
}

}treeFile.jsp代码如下:<%@ page contentType="text/html; charset=utf-8" language="java"  import="java.io.File" import="com.struts2.bean.FileWrapper"    errorPage="" %><%@ taglib uri="/struts-tags" prefix="s"  %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>   
<html >
<head>
  <title>My page</title>
  <sx:head />
</head>
<body>
<%
  request.setAttribute("file",new FileWrapper(new File(getServletContext().getRealPath("WEB-INF"))));%>
<s:set name="i" value="0" ></s:set>
<sx:tree id = "root" rootNode="{#request.file}" nodeTitleProperty="file.name" nodeIdProperty="%{#i=1}"
          childCollectionProperty="children" />
</body>
</html>
报错:
org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 7 in the generated java file
Only a type can be imported. com.struts2.bean.FileWrapper resolves to a packageAn error occurred at line: 12 in the jsp file: /treeFile.jsp
FileWrapper cannot be resolved to a type
9: </head>
10: <body>
11: <%
12:   request.setAttribute("file",new FileWrapper(new File(getServletContext().getRealPath("WEB-INF"))));
13: 
14: %>
15: <s:set name="i" value="0" ></s:set>请高人指点一下,上面的代码应该怎么修改?最好的调试通过