jspÒ³Ãæµ¼³öexcel ²¢ÇÒ¿ÉÒÔµ¯³ö±£´æ¶Ô»°¿ò
Ö÷ÒªÔÚjspÒ³Ãæ¼ÓÈë
<%@ page contentType="application/msexcel;charset=GBK"%>
<%
response.setHeader("Content-disposition",
"attachment; filename=shouExcel.xls");
%>
ÍêÕûÒ³ÃæÈçÏ£º
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%@ page contentType="application/msexcel;charset=GBK"%>
<%
response.setHeader("Content-disposition",
"attachment; filename=shouExcel.xls");
%>
<html>
<head>
<title>µ¼³ö</title>
</head>
<body>
<table width="100%" border="1" cellpadding="1" cellspacing="1">
<tr>
<td height="22">
<div align="center">
<strong>É豸Ãû³Æ</strong>
</div>
</td>
<td height="22">
<div align="center">
<strong>´íÎóÀàÐÍ</strong>
</div>
</td>
<td height="22">
<div align="center">
<strong>´ÎÊý</strong>
</div>
</td>
<td>
<div align="center">
<strong>ʱ¼ä</strong>
 
Ïà¹ØÎĵµ£º
Ò» ǰÌá
Ï£Íû×îеļͼÔÚ¿ªÍ·¸øÄãµÄ±í½¨Á¢²éѯ£º
񡜧mytable
²éѯ£ºcreate or replace view as mytable_view from mytable order by id desc ÆäÖУ¬×îºÃʹÓÃÐòÁкÅcreate sequence mytable_sequence À´×Ô¶¯Ôö¼ÓÄãµÄ¼ ......
jspÖÐÎÄÏÔʾÂÒÂë½â¾ö·½°¸2006-12-27 22:56
Ò»¡¢JSPÒ³ÃæÏÔʾÂÒÂë
¶þ¡¢±íµ¥Ìá½»ÖÐÎÄʱ³öÏÖÂÒÂë
Èý¡¢Êý¾Ý¿âÁ¬½Ó
´ó¼ÒÔÚJSPµÄ¿ª·¢¹ý³ÌÖУ¬¾³£³öÏÖÖÐÎÄÂÒÂëµÄÎÊÌ⣬¿ÉÄÜÒ»ÖÁÀ§ÈÅ×ÅÄú£¬ÎÒÏÖÔÚ°ÑÎÒÔÚJSP¿ª·¢ÖÐÓöµ½
µÄÖÐÎÄÂÒÂëµÄÎÊÌâ¼°½â¾ö°ì·¨Ð´³öÀ´¹©´ó¼Ò²Î¿¼¡£
Ò»¡¢JSPÒ³ÃæÏÔʾÂÒÂë
ÏÂÃæµÄÏÔÊ¾Ò³Ãæ(display.jsp)¾Í³öÏÖÂÒ ......
Õë¶ÔgetÌá½»·½Ê½¡¢ÂÒÂë½â¾ö·½Ê½
tomcat5ÖУ¬ÎªÁ˱£Ö¤getÊý¾Ý²ÉÓÃGBK±àÂ룬ÔÚserver.xmlÖнøÐÐÁËÈçÏÂÉèÖ㺸ıäwebÈÝÆ÷ÇëÇóÊý¾ÝµÄ±àÂë¸ñʽ(¶ÔpostÇëÇó·½Ê½ÎÞЧ)
<Connector port="8080" maxHttpHeaderSize="8192"
&nbs ......
ÒÔǰÓÃWSAD wizard×öµÄ£¬¶¼¿ÉÒÔÔÚJSPÒ³ÃæÖнâÎöµ½EL±í´ïʽ£¬µ±È»Ç°ÌáÊÇJSP2.0µÄÇé¿öÏ¡£
½ñÌìÓöµ½ÁËÒ»¸öĪÃûÆäÃîµÄÎÊÌâ¡£¸ÕÏÂÔØEclipse3.3+MyEclipse6.0ÌåÑéµÄ¹ý³ÌÖУ¬ÓöÉÏÁ˽âÎö²»µ½EL±í´ïʽµÄÎÊÌâ¡£¾¹ýºÃ¼¸¸öСʱµÄ×ÁÄ¥ÖÕÓÚ·¢ÏÖÁË£¬¸ø´ó¼Òshareһϣº
ÎÊÌâ¾Í³öÔÚ½¨Web ProjectµÄʱºòweb.xmlÉùÃ÷ÉÏ¡£
web.xmlÉùÃ÷²¿ ......
package DBbean;
import java.sql.*;
public class ConnBean
{
private Connection con;
//³õʼ»¯Á¬½Ó¡£
public ConnBean()
{
try
{
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
......