0415:JSP的运行原理图
1 web服务器{TOMCAT(JSP)、WEBLOGIC(JSP) }
应用服务器
Web服务器传送(serves)页面使浏览器可以浏览,然而应用程序服务器提供的是客户端应用程序可以调用(call)的方法
(methods)。确切一点,你可以说:Web服务器专门处理HTTP请求(request),但是应用程序服务器是通过很多协议来为应用程序提供
(serves)商业逻辑(business logic)。
相关文档:
我要调用JExcelApi 读取用户在客户端选择的Excel中的文件中的数据,
我是这样做的:
首先做一个页面upLoadExcel.jsp让用户选择本地的Excel文件,我就是用的上传的那个页面:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD &nb ......
<html:html>
<HEAD>
<tiles:insert attribute="header" />
</HEAD>
<body>
<tiles:insert attribute="top" />
<table width="100%" height="400" border="0" align="center"
cellpadding="0" cellspacing="0">
<tr>
<td width="178" ......
<body>
<%
Cookie[] cookies = request.getCookies() ;
Cookie cookie = null ;
if(cookies!=null){
cookie = cookies[0] ;
out.print("上次访问的ip是: " + request.getRemoteAddr() +"<br>") ;&n ......
通过jsp(SUN企业级应用的首选)程序获得database里的数据,然后通过程序控制其显示方式,这种方式明显缺点是如果数据量比较大的时候会有明显的性能下降
现将测试代码奉上,尽管我尽量限制代码的长度
先说下开发步骤;DB脚本,测试获得的数据是否正确的显示在一个table中,添加那 ......
源程序
<%String sConn="你的连接"
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn=DriverManager.getConnection(sConn,"你的用户名","密码");
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
Statement stmtcount=conn.createStat ......