易截截图软件、单文件、免安装、纯绿色、仅160KB

jsp读取foxpro的dbf文件

<%@page contentType="text/html"%>
<%@page pageEncoding="GBK"%>
<%@page import="java.sql.*;" %>
<!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=GBK">
        <title>JSP+DBF</title>
    </head>
    <body>
        <h2 align="center">JSP连接DBF</h2><hr>
        <%!
    Connection con = null;
    Statement st = null;
    ResultSet rs = null;
        %>
        <%
        String path = "";
        request.setCharacterEncoding("GBK");
        path = request.getRealPath("").replace('\\', '/');
        out.println(path);    /**/
        int i = 1;
        String url = "jdbc:odbc:driver={Microsoft Visual FoxPro Driver};" +
                "SourceType=DBF;SourceDB=" + path + "/";
        con = DriverManager.getConnection(url);
        String Showsql = "select * from inform";
        st = con.createStatement();
        rs = st.executeQuery(Showsql);
        while (rs.next()) {
            String str = i +


相关文档:

jsp上传文件到数据库和从数据库下载文件

用了commons-fileupload-1.2.jar和commons-io-1.3.2.jar这两个包。
save.jsp
<%@ page language="java" contentType="text/html;charset=utf-8"%>
<%@ page import="java.util.*"%>
<%@ page import="java.io.*"%>
<%@ page import="java.util.regex.*"%>
<%@ page import="org.apache.co ......

让html以及jsp页面不被缓存

对于HTM网页,加入:
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<meta HTTP-EQUIV="expires" CONTENT="0">
然后,jsp页面中加入:
<%
     response.setHeader("Cache-Control","no-store") ......

JSP文件

<%@ page language="java" import="kg.TestBean2;" %>
<%@ page contentType="text/html;charset=gb2312" %>
<html>
<head>
<title>HelloBean</title>
</head>
<body>
<%--
<%
kg.TestBean2 testbean=(kg.TestBean2)session.setAttribute("testbean");
if ......

小JSP程序

<%@ page language="java" import="kg.TestBean2;" %>
<%@ page contentType="text/html;charset=gb2312" %>
<html>
<head>
<title>HelloBean</title>
</head>
<body>
<%--
<%
kg.TestBean2 testbean=(kg.TestBean2)session.setAttribute("testbean");
if ......

javabean向传jsp传值

struts-config:
<action path="/articleManage" name="articleManageForm"  scope="request" type="auction.action.ArticleManageAction" validate="false">
   <forward name="atriclesList" path="/WEB-INF/publish/articleManage/atriclesList.jsp"/>
   <forward ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号