缺少struts2-core-2.3.24.jar?
jsp文件找不到
上传到项目下面有个images文件夹。这个文件夹的位置一般是在tomcat/webapps(或者wtpwebapps)/项目名/images
建立一个ftp的路径
是不是配置文件没有加载?
知道你的问题了,这里面的参数是系统给定的,interceptor-ref 的意思就是引用,引用谁的呢,引用系统给定的.所以说只能叫这个名字,用于文件上传的一些限制... 不知道还有什么问题吗? 一句句话就是说--引用了拦截器用于拦截匹配与不匹配的参数. 谢谢
重启一下tomcat试试
upload是这个action的名字 在struts.xml文件中进行配置
在前面几节课中已经讲了
web.xml 里面加上
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
request.getSession().getServletContext().getRealPath或(struts2)ServletActionContext.getServletContext().getRealPath("/")是得到项目的绝对路径,如果使用tomcat部署程序,得到的路径为:E:\ProgramFiles\apache-tomcat-6.0.33\webapps\项目名\。