读书人

拷贝过来的项目上传使用不了求围观,

发布时间: 2013-09-23 11:21:05 作者: rapoo

拷贝过来的项目上传使用不了,求围观


<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>添加头像页面</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<link rel="StyleSheet" href="../css/table.css" type="text/css" />
<link rel="StyleSheet" href="../css/check.css" type="text/css" charset="GB2312"/>
<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/check.js" charset="GB2312"></script>
</head>

<body>
<div class="title">
<h1>
智慧城市后台管理系统——添加头像
</h1>
</div>
<form action="addFace.action" enctype="multipart/form-data"
method="post" id="mc-form">
<table width="90%" id="mytab" border="1" class="t1">
<tr class="a1">
<th colspan="2" scope="col">
添加头像信息
</th>
</tr>
<tr>
<th scope="row">
头像性别:
</th>
<td>
<input type="radio" checked="checked" name="FSex" value="男" />
 男
<input type="radio" name="FSex" value="女" />
 女
</td>
</tr>
<tr class="a1">
<th scope="row">
头像位置:
</th>
<td>
<input type="file" name="image" class="editbox4" id="mustWrite"/>
<font color="red">支持宽度为40px,长度40px</font>
</td>
</tr>
<tr>
<th colspan="2" scope="row">
<input type="submit" name="Submit" value="提交" id="send"/>
 
<input name="reset" type="reset" id="reset" value="重置" />
</th>
</tr>
</table>
<font color="red">${feedback}</font>
</form>
</body>
</html>

这是jsp代码:中间也没有<!-- -->
这个是错误信息
2013-9-8 12:09:07 org.apache.jasper.compiler.TldLocationsCache tldScanJar
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.


下面是struts2的配置文件的一段
<action name="addFace" class="com.action.FaceAction" method="addFace">
<interceptor-ref name="fileUpload">
<param name="maximumSize">1024*1024</param>
<param name="allowedTypes">image/bmp,image/x-png,image/png,image/gif,image/jpeg,image/jpg,image/pjpeg</param>
</interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
<result name="success" type="chain">lookAllFace</result>
<result name="error">addFace.jsp</result>
<result name="input">addFace.jsp</result>
</action>

这个主要是都进去不去Action,配置肯定没错,因为在原先的机子上就没事
上个编辑器是MyEclipse9这回换的是MyEclipse8.5,使得都是tomcat7
一点击提交就进入result=“input”,连Action都不进。怎么回事啊?跟上方的报错有关吗 struts2 jsp myeclipse tomcat
[解决办法]
把 页面中含有<!---->的注释 去掉就好了,tomcat7.0.20.
试试看
[解决办法]
我要看你的namespace啊命名空间贴出来啊,不然怎么知道是不是你的路径出问题的,你不是说进不了action,吗,很可能是命名空间写错了。

读书人网 >J2SE开发

热点推荐