|
Apache 2.0.55
jdk 1.5.0.04
mysql 4.1.14
apache-tomcat 5.5.12
jakarta-tomcat-connectors-jk 1.2.6
参考了本论坛的有关apache tomcat jsp等文章
现在可以处理简单的JSP文件,但安装JSP的OA系统时,出现如下信息:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 28 in the jsp file: /installok.jsp
Generated servlet error:
WriteHtml cannot be resolved
An error occurred at line: 28 in the jsp file: /installok.jsp
Generated servlet error:
DelHtml cannot be resolved
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:32
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:409)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:28
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs.
文件如下:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ include file="../conn/conn.jsp"%>
<%@ include file="../conn/time.jsp"%>
<%@ page import="com.lynews.news.*"%>
<%
String username=request.getParameter("username");
String pass=request.getParameter("pass");
String question=request.getParameter("question");
String answer=request.getParameter("answer");
String bumen=request.getParameter("bumen");
String email=request.getParameter("email");
String sex="男";
String systemname=request.getParameter("config");
%>
<%
stmt = con.createStatement() ;
rs=stmt.executeQuery("SELECT * from member where systemop=1 and flag=1");
if(!rs.next()){
%>
<%
String sql="insert into member(username,password,question,answer,email,bumen,regtime,lastlogintime,flag,systemop,sex) values('"+username+"','"+pass+"','"+question+"','"+answer+"','"+email+"','"+bumen+"','"+time+"','"+time+"',1,1,'"+sex+"')";
stmt.executeUpdate(sql);
%>
<%
String templateContent="<%String systemname=\""+systemname+"\";"+"%"+">";
Calendar calendar = Calendar.getInstance();
String fileName = "config.jsp";
String pathName = application.getRealPath("conn")+"/";
WriteHtml.save(templateContent,pathName,fileName);
//生成完成
//删除install.jsp
String aaName = "install.jsp";
String bbName = application.getRealPath(aaName) ;
boolean del = DelHtml.del(bbName);
response.sendRedirect("index.jsp");
%>
<%}else{
response.sendRedirect("index.jsp");
}%> |
|