为什么这个程序老是报内部服务器出错呢?有知道的吗?

lzedu 2003-04-08 07:35:15
<%-- 留言本程序文件 gb.jsp --%>
<%@ page contentType="text/html; charset=gb2312" %>
<HTML><BODY bgcolor="#FFFFFF" text="#0000C0">
<FORM method="POST" action=gb.jsp>
<INPUT type="text" name="name" size="21" value="姓名和留言" onFocus="this.value=''">
<BR><TEXTAREA rows="4" name="content" cols="20"></TEXTAREA>
<INPUT type="submit" value="提交">
</FORM>

<%
// 初始化
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
java.sql.Connection sqlConn
=java.sql.DriverManager.getConnection("jdbc:oracle:thin:@10.1.1.139:1521:lztest","system","manager");

java.sql.Statement sqlStmt = sqlConn.createStatement();
// 写入数据
sqlStmt.executeUpdate("insert into gb(name,content,time)"
+ "values('" + request.getParameter("name")+ "','" + request.getParameter("content")
+ "','" + new java.util.Date() + "');"
);
// 读取数据
java.sql.ResultSet sqlRst = sqlStmt.executeQuery("select * from gb;");
while (sqlRst.next()) {
out.println("<B STYLE='FONT-SIZE:9pt'>" + sqlRst.getString("name")
+ ":</B><FONT STYLE='FONT-SIZE:9pt;COLOR:#C00000'> " + sqlRst.getString("content")
+ "</FONT><FONT STYLE='FONT-SIZE:9pt;COLOR:#CCCCCC'> @ " + sqlRst.getString("time")
+ "</FONT><BR>");
}
sqlStmt.close();
sqlConn.close();
%>
</body></html>
...全文
28 点赞 收藏 3
写回复
3 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
lzedu 2003-04-08
2003-4-8 上午08时04分49秒> <Error> <HTTP> <[WebAppServletContext(7525605,testwe
app,/testwebapp)] Servlet failed with Exception
eblogic.servlet.jsp.JspException: (line 15): scriptlet close brace '}' unbalanc
d at line 15 which breaks scope '_base_service_scope_'
at weblogic.servlet.jsp.ScriptletScopeLexer.mCLOSE_BRACE(ScriptletScopeL
xer.java:527)
at weblogic.servlet.jsp.ScriptletScopeLexer.mTOKEN(ScriptletScopeLexer.j
va:232)
at weblogic.servlet.jsp.ScriptletScopeLexer.nextToken(ScriptletScopeLexe
.java:159)
at weblogic.servlet.jsp.ScriptletScopeLexer.parse(ScriptletScopeLexer.ja
a:119)
at weblogic.servlet.jsp.JspLexer.mSCRIPT(JspLexer.java:3961)
at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2054)
at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1862)
at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1744)
at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:1023)
at weblogic.servlet.jsp.JspParser.doit(JspParser.java:80)
at weblogic.servlet.jsp.JspParser.parse(JspParser.java:183)
at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:119)
at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:255

at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:327)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:189)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:154)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
ava:368)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
l.java:242)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
l.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
vletContext.java:2495)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
l.java:2204)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)


回复
lzedu 2003-04-08
用weblogic 提示内部服务器错阿。
回复
study_body 2003-04-08
贴出错误信息。是异常代码
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2003-04-08 07:35
社区公告
暂无公告