There is no Action mapped for action name uploadfileimg. - [unknown location]
找不到uploadfileimg.actionstruts.xml:<!--ajax上传图片--><packagename="uploadimg"extends="jso...
找不到uploadfileimg.action
struts.xml:
<!-- ajax上传图片-->
<package name="uploadimg" extends="json-default" namespace="/uploadimg">
<action name="uploadfileimg" class="com.jinying.struts.action.upload.VoteFileUploadAction" method="uploadFile">
<result name="jsonres" type="json">
<param name="contentType">text/html</param>
</result>
</action>
</package>
jsp:
……
<script type="text/javascript">
……
$("#loading")
.ajaxStart(function(){
$(this).show();
})
.ajaxComplete(function(){
$(this).hide();
});
$.ajaxFileUpload
(
{
url:'<%=path%>/uploadimg/uploadfileimg.action?index='+index,
secureuri:false,
fileElementId:'img'+index,
dataType: 'json',
success: function (data, status){
……
</script>
……
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>charEncodingFilter</filter-name>
<filter-class>com.jinying.util.CharEncodingSetFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>utf-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>charEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener> 展开
struts.xml:
<!-- ajax上传图片-->
<package name="uploadimg" extends="json-default" namespace="/uploadimg">
<action name="uploadfileimg" class="com.jinying.struts.action.upload.VoteFileUploadAction" method="uploadFile">
<result name="jsonres" type="json">
<param name="contentType">text/html</param>
</result>
</action>
</package>
jsp:
……
<script type="text/javascript">
……
$("#loading")
.ajaxStart(function(){
$(this).show();
})
.ajaxComplete(function(){
$(this).hide();
});
$.ajaxFileUpload
(
{
url:'<%=path%>/uploadimg/uploadfileimg.action?index='+index,
secureuri:false,
fileElementId:'img'+index,
dataType: 'json',
success: function (data, status){
……
</script>
……
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>charEncodingFilter</filter-name>
<filter-class>com.jinying.util.CharEncodingSetFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>utf-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>charEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener> 展开
Storm代理
2023-08-29 广告
2023-08-29 广告
"StormProxies是全球大数据IP资源服务商,其住宅代理网络由真实的家庭住宅IP组成,可为企业或个人提供满足各种场景的代理产品。点击免费测试(注册即送1G流量)StormProxies有哪些优势?1、IP+端口提取形式,不限带宽,I...
点击进入详情页
本回答由Storm代理提供
展开全部
url:'<%=path%>/握灶uploadimg/uploadfileimg.action?index='+index中拦脊先把
path alert()出来看看简皮渗有没有跟uploadimg/uploadfileimg重复的
path alert()出来看看简皮渗有没有跟uploadimg/uploadfileimg重复的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2011-08-22
展开全部
首先检查struts.xml文件中关于Action标签的配置,看看侍慧局前台碧茄页面提交的Action路径老让是否存在
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询