程序异常,麻烦各位帮我看下!谢谢 把你这个出错的JSP贴出来看看啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在tomcat下\work\Catalina\localhost\admin\目录中看看info_add.jsp(99,2)这个位置,有可能是编码错误,你先看看那个位置怎么了 <%@ page contentType="text/html;charset=gb2312" %> <%@include file="InfoComm.jsp"%><% // 取得当前用户名 String userId = (String)session.getValue("user_id"); String pwd = (String)session.getValue("passwd"); // 只有系统用户才可以有权限 //if(IsUser(userId,pwd)) //{ System.out.print("userId"); System.out.print("pwd");%><%! String strTitle,sDatetime,strContent,strCate,Filename="",iFrom; Vector v_Cate; int cateid,iattpic,InfoId;%><% // 取得当前时间,按照指定格式显示 java.util.Date dnow = new java.util.Date(); SimpleDateFormat formatter1 = new SimpleDateFormat ("yyyy-MM-dd"); String ShowDate = formatter1.format(dnow);%><html><head><title>添 加 信 息</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><link rel="stylesheet" href="../style.css"><script Language="JavaScript"> // 提交表单前校验指定域function checkdata() { if (document.myform.txttitle.value=='') { window.alert ("请输入新闻的标题!") return false } if (document.myform.txttitle.value.length > 60) { window.alert ("标题需短于60个汉字 !") return false } if (document.myform.txtcontent.value=='') { window.alert ("请输入新闻的详细内容!") return false } return true}</script></head><body><form method="POST" action="info_addSave.jsp" name="myform" onSubmit="return checkdata()" > <table align="center" border="1" cellspacing="0" width="95%" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0"> <tr> <td align=center width="100%" bgcolor="#FEEC85" height="20">添 加 信 息</td> </tr> <tr><td width="100%"> <table align=center border="0" cellspacing="1" width="100%"> <tr> <td width="20%" align="center" height="23" bgcolor="#FFFCD9">信息类别</td> <td width="80%" valign="center" height="23" bgcolor="#FFFCD9"> <select name="cate" size="1" style='FONT-SIZE: 9pt'> <% try { Categories o_Cate = new Categories(); v_Cate = o_Cate.getMoreCategories(); for(int m=0;m<v_Cate.size();m++) { o_Cate =(Categories)v_Cate.elementAt(m); cateid = o_Cate.getCateId(); strCate = o_Cate.getCateTitle(); %> <OPTION value="<%=cateid%>"><%=strCate%></OPTION> <% } } catch(Exception e) { System.out.println(e.toString());} %> </SELECT> 提交人 <%=getName(userId)%> 提交日期 <%=ShowDate%> </td> </tr> <tr> <td align="center" height="23" bgcolor="#FFFCD9">信息主题</td> <td height="23" bgcolor="#FFFCD9"><input type="text" name="txttitle" size="60"> <input type="checkbox" name="attpic" value="1">附图</td> </tr> <tr> <td align="center" height="23" bgcolor="#FFFCD9">文件上传</td> <td height="23" bgcolor="#FFFCD9"><iframe frameborder="0" width="100%" height="23" scrolling="no" src="info_upload.jsp"></iframe> </td> </tr> <tr><td align="center" height="23" bgcolor="#FFFCD9">UBB标签</td> <td bgcolor="#FFFCD9"> <%@include file="template.jsp"%> </td></tr> <tr> <td colspan="2" bgcolor="#FFFCD9" align="center"><textarea rows="19" name="txtcontent" cols="100"></textarea></td> </tr> <tr> <td align="center" valign="top" bgcolor="#FFFCD9"></td> <td bgcolor="#FFFCD9"> <input type="hidden" name="upimages" value="<%=Filename%>"> <input type="hidden" name="userid" value="<%=userId%>"> </tr> </table> </td> </tr> </table><p><center> <input type="submit" value=" 预 览 " name="cmdok" onclick="myform.action='info_preview.jsp';return true;"> <input type="submit" value=" 提 交 " name="cmsdok" onclick="myform.action='info_addSave.jsp'"> </form></BODY></HTML><%//}//else// out.println("你没有添加的权限"); %> 不太明白,好像是/admin/info_add.jsp这个文件有问题,可能是第99行。 servlet为什么没有调用destroy方法? 用struts2标签iterator遍历的时候 汉字显示不正确怎么办 hibernate spring struts 等調包有沒有什麽方法啊? eclipse+tomcat+lomboz如何配置问题 本人刚接触JSP想请教一些基本的知识 怎样实现在jsp中超级连接到下一个页面时,还能保持原来页面不被关闭?高手指点,小妹初学 兄弟们帮忙! struts2下载功能,为什么有些文件360浏览器不能下载? jdbc-odbc桥是否需要安装。 高分请教两个问题 struts2 textfield 初值问题!!!! 有关JS 的问题??
这个位置,有可能是编码错误,你先看看那个位置怎么了
<%@include file="InfoComm.jsp"%><%
// 取得当前用户名
String userId = (String)session.getValue("user_id");
String pwd = (String)session.getValue("passwd");
// 只有系统用户才可以有权限
//if(IsUser(userId,pwd))
//{
System.out.print("userId");
System.out.print("pwd");
%><%!
String strTitle,sDatetime,strContent,strCate,Filename="",iFrom;
Vector v_Cate;
int cateid,iattpic,InfoId;
%><%
// 取得当前时间,按照指定格式显示
java.util.Date dnow = new java.util.Date();
SimpleDateFormat formatter1 = new SimpleDateFormat ("yyyy-MM-dd");
String ShowDate = formatter1.format(dnow);
%><html>
<head>
<title>添 加 信 息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../style.css">
<script Language="JavaScript">
// 提交表单前校验指定域
function checkdata() {
if (document.myform.txttitle.value=='') {
window.alert ("请输入新闻的标题!")
return false
}
if (document.myform.txttitle.value.length > 60) {
window.alert ("标题需短于60个汉字 !")
return false
}
if (document.myform.txtcontent.value=='') {
window.alert ("请输入新闻的详细内容!")
return false
}
return true
}
</script>
</head>
<body>
<form method="POST" action="info_addSave.jsp" name="myform" onSubmit="return checkdata()" >
<table align="center" border="1" cellspacing="0" width="95%" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0">
<tr>
<td align=center width="100%" bgcolor="#FEEC85" height="20">添 加 信 息</td>
</tr>
<tr><td width="100%">
<table align=center border="0" cellspacing="1" width="100%">
<tr>
<td width="20%" align="center" height="23" bgcolor="#FFFCD9">信息类别</td>
<td width="80%" valign="center" height="23" bgcolor="#FFFCD9">
<select name="cate" size="1" style='FONT-SIZE: 9pt'>
<%
try
{
Categories o_Cate = new Categories();
v_Cate = o_Cate.getMoreCategories();
for(int m=0;m<v_Cate.size();m++)
{
o_Cate =(Categories)v_Cate.elementAt(m);
cateid = o_Cate.getCateId();
strCate = o_Cate.getCateTitle();
%>
<OPTION value="<%=cateid%>"><%=strCate%></OPTION>
<%
}
}
catch(Exception e)
{ System.out.println(e.toString());}
%>
</SELECT>
提交人 <%=getName(userId)%>
提交日期 <%=ShowDate%>
</td>
</tr>
<tr>
<td align="center" height="23" bgcolor="#FFFCD9">信息主题</td>
<td height="23" bgcolor="#FFFCD9"><input type="text" name="txttitle" size="60">
<input type="checkbox" name="attpic" value="1">附图</td>
</tr>
<tr>
<td align="center" height="23" bgcolor="#FFFCD9">文件上传</td>
<td height="23" bgcolor="#FFFCD9"><iframe frameborder="0" width="100%" height="23" scrolling="no" src="info_upload.jsp"></iframe>
</td>
</tr>
<tr><td align="center" height="23" bgcolor="#FFFCD9">UBB标签</td>
<td bgcolor="#FFFCD9">
<%@include file="template.jsp"%>
</td></tr>
<tr>
<td colspan="2" bgcolor="#FFFCD9" align="center"><textarea rows="19" name="txtcontent" cols="100"></textarea></td>
</tr>
<tr>
<td align="center" valign="top" bgcolor="#FFFCD9"></td>
<td bgcolor="#FFFCD9">
<input type="hidden" name="upimages" value="<%=Filename%>">
<input type="hidden" name="userid" value="<%=userId%>">
</tr>
</table>
</td>
</tr>
</table>
<p><center>
<input type="submit" value=" 预 览 " name="cmdok" onclick="myform.action='info_preview.jsp';return true;">
<input type="submit" value=" 提 交 " name="cmsdok" onclick="myform.action='info_addSave.jsp'">
</form>
</BODY>
</HTML>
<%//}
//else
// out.println("你没有添加的权限");
%>