急急,在线等,jsp上传到服务器后,无法正常运行!!!!
<%@ page contentType= "text/html; charset=gb2312 " language= "java " import= "java.sql.* "
errorPage= " " %>
<%@ page import= "java.util.* "%>
<%@ page import= "java.util.Iterator "%>
<%@ page import= "java.util.List "%>
<%@ page import= "java.util.ArrayList "%>
<%@ page import= "product.bean.car_product "%>
<%@ page import= "product.bean.product "%>
<%@ page import= "product.bean.product_series "%>
<%@ page import= "hib.tools.* "%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN " "http://www.w3.org/TR/html4/loose.dtd ">
<html>
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<title> 无标题文档 </title>
</head>
<%
try{
HibernateUtil.beginTransaction();
String hsql= "from car_product ";
List list=HibernateUtil.getCurrentSession().createQuery(hsql).list();
Iterator it=list.iterator();
while(it.hasNext()){
car_product cp=(car_product)it.next();
out.println(cp.getProduct_name()+ " <br> ");
}
HibernateUtil.commitTransaction();
}catch (Exception ex)
{
System.out.println(ex.getMessage());
HibernateUtil.rollbackTransaction();
}finally{
HibernateUtil.closeSession();
}
%>
<body>
</body>
</html>
上面代码在我所建立的环意中可以正常运行,可是传到租来的服务哭器上就无法正常显视.结是空白页.查看网页代码是:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN ">
<HTML> <HEAD>
<META http-equiv=Content-Type content= "text/html; charset=gb2312 "> </HEAD>