用的SSH框架,页面出现404问题,请高手帮忙看看啊。

zslqw 2011-05-13 06:09:15
做了一个添加新闻内容的界面,在详细内容那里使用了一个内容编辑器插件(附代码如下)。我的问题很奇怪,该页面只有详细内容添加这块不能显示,并且提示404错误,但点击确定按钮后又可以显示并使用。麻烦哪位大侠解说解说

日志信息:2011-05-13 17:27:43 [日志信息] Struts has detected a file upload UI tag (s:file) being used without a form set to method 'POST'. This is probably an error!(不太懂这是啥意思)


代码:
<td valign="top">详细内容:</td>
<td colspan="5" height="500">
<s:if test="content!=null">
<s:set name="contentvalue" value="@com.eportal.util.Tools@unescape(#request.content)"/>
</s:if>
<fck:editor id="content" basePath="../" height="500"
skinPath="../editor/skins/silver/"
toolbarSet="Default"
imageBrowserURL="../editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"
linkBrowserURL="../editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"
flashBrowserURL="../editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"
imageUploadURL="../editor/filemanager/upload/simpleuploader?Type=Image"
linkUploadURL="../editor/filemanager/upload/simpleuploader?Type=File"
flashUploadURL="../editor/filemanager/upload/simpleuploader?Type=Flash">
${contentvalue}
</fck:editor>
</td>
</tr>
</table>
<br>
<div align="center">
<s:submit key="label_submit"/> 
<s:reset key="label_reset"/> 
<s:set name="label_return" value="%{getText('label_return')}"/>
<input type="button" name="btn_ret" value="${label_return}" onClick="window.location='introduce_browseIntroduce.action';">
</div>
</s:form>
</div>
</center>
<br/><br/>
<s:if test="hasFieldErrors()">
<e:msgdialog basepath="<%=basepath%>">
<s:fielderror/>
</e:msgdialog>
</s:if>
<s:if test="hasActionMessages()">
<e:msgdialog basepath="<%=basepath%>">
<s:actionmessage/>
</e:msgdialog>
</s:if>
<script language="javascript">
//显示与隐藏图片上传区域
function hideShowFile(v){
if (v==1){
document.all.fileSpan.style.display="inline";
}else{
document.all.fileSpan.style.display="none";
}
}
</script>
</body>
</html>
...全文
260 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
zslqw 2011-05-15
  • 打赏
  • 举报
回复
还有0回帖率会导致代码质量下降,这个道理明白么 ?





为什么啊?
zslqw 2011-05-15
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 zhuchao_ko 的回复:]
引用 5 楼 zslqw 的回复:
大家还有没有其他见解的啊。


404就是资源找不到,就是你点的那个东西路径不对,还有什么啊?

还有0回帖率会导致代码质量下降,这个道理明白么 ?
[/Quote]

资源找到了,但是只显示了一半。也就是说找到一半的资源
hepeng_8 2011-05-14
  • 打赏
  • 举报
回复
配置文件
宁波朱超 2011-05-14
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 zslqw 的回复:]
大家还有没有其他见解的啊。
[/Quote]

404就是资源找不到,就是你点的那个东西路径不对,还有什么啊?

还有0回帖率会导致代码质量下降,这个道理明白么 ?
顾燕良Simmaker 2011-05-14
  • 打赏
  • 举报
回复
路径错误啊,超链那的问题吧。?
sdls10qq 2011-05-14
  • 打赏
  • 举报
回复
路径问题,最好不要用..容易出问题
用这个比较好myeclipse自动建jsp是生成的<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%>,在head里加入<base href="<%=basePath%>">,这样比较好
draling 2011-05-14
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 zslqw 的回复:]
引用 1 楼 wern0565 的回复:
Java code

Struts has detected a file upload UI tag (s:file) being used without a form set to method 'POST'. This is probably an error!



用struts的的标签file了吧?
要设method="pos……
[/Quote]

不是说s:file标签设置method=post,他是说你的Form没有设置这个属性,试试给form设置这个属性
zslqw 2011-05-14
  • 打赏
  • 举报
回复
大家还有没有其他见解的啊。
zslqw 2011-05-14
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 wern0565 的回复:]
Java code

Struts has detected a file upload UI tag (s:file) being used without a form set to method 'POST'. This is probably an error!



用struts的的标签file了吧?
要设method="post"的。
[/Quote]




貌似<s:file>标签没有 method=“post”这类属性设置哦。我加上去现实没定义,网上也没查到这个属性。
zslqw 2011-05-14
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 ztyjr888 的回复:]
404是最简单的路径问题,自己好好找
[/Quote]


我仔细考虑过我的路径问题,。没发现有什么问题。
所以才发帖求指导啊。
Phoenix Slade 2011-05-13
  • 打赏
  • 举报
回复
404是最简单的路径问题,自己好好找
wern0565 2011-05-13
  • 打赏
  • 举报
回复

Struts has detected a file upload UI tag (s:file) being used without a form set to method 'POST'. This is probably an error!


用struts的的标签file了吧?
要设method="post"的。

81,094

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧