forum_jsp

所属分类:Java编程
开发工具:TEXT
文件大小:61KB
下载次数:2
上传日期:2008-07-24 13:43:47
上 传 者donghaic
说明:  这是一个关于JSP的论坛实例。全是JSP语法写的。提供给大家学习
(This is a forum on the JSP examples. Is written in JSP syntax. Learning available to everyone)

文件列表:
Common.jsp (11243, 2001-06-28)
database (0, 2001-06-28)
database\Forum_MSAccess.mdb (196608, 2001-06-26)
database\SQL (0, 2001-06-28)
database\SQL\Forum_MSSQL.sql (5734, 2001-06-26)
database\SQL\Forum_MySQL.sql (5607, 2001-06-26)
dirinfo.cci (638, 2001-06-26)
header.jsp (2441, 2001-06-26)
images (0, 2001-06-28)
images\forum.gif (16020, 2001-04-13)
images\home.gif (394, 2001-04-13)
images\new.gif (603, 2001-04-13)
images\reply.gif (426, 2001-04-13)
images\thread.gif (809, 2001-04-13)
images\Thread_small.gif (97, 2001-04-13)
index.jsp (12873, 2001-06-26)
newthread.jsp (10964, 2001-06-26)
reply.jsp (15901, 2001-06-26)
searches.jsp (11033, 2001-06-26)
viewthread.jsp (16817, 2001-06-26)

Introduction: This document contains instructions on how to configure and install the downloaded JSP application. It assumes that: 1. You have some basic knowledge of server and database technologies. 2. You have a web server where the application will be deployed and if applicable, a database server as well. 3. Your server supports specifications of JSP 1.1 and Servlet 2.2 When you download the application, you should find the following components contained in the zip archive: 1. Language specific script files and html template files if you downloaded the template version. 2. A database file or a SQL script file that can be used to recreate the database. 3. A folder containing images if applicable. Installation: The installation process is pretty straightforward and requires minimal adjustment of the application files. Proceed as follows: 1. Unzip the files into a folder within your web server hierarchy from where the application will be served. Ensure that the folder name does not have spaces in it. During the process of unzipping, make sure that the files are unzipped to their respective folders. Don't simply open the zip archive and drag all the files to the same folders. For the application to work correctly, some files such as the image files need to be in specific folders. 2. Once you have unzipped the files, the next task is to alter the database connection string to reflect the current location/name of the database. Follow the relevant instructions below depending on the type of connection that you want to use: ODBC Connection To Configure an ODBC connection: (a) Use the ODBC option in Control Panel to setup a system DSN for the application database. The database file is located in the main folder of the application. In the interest of security, you can and are encouraged to move the database file to a more secure location outside the web server hierarchy. Your application will work fine as long as the DSN you configure points to the correct location of the database file. Ensure that the DSN is a system DSN so that it will be available to all users. (b) Open the file 'Common.jsp' which is in the main folder of your application path. (c) Find the database connection strings in the file. Their basic format is: static final String DBDriver =""; static final String strConn =""; (d) Using the guidelines below, change the statement to look something like the example shown below: static final String DBDriver ="sun.jdbc.odbc.JdbcOdbcDriver"; static final String strConn ="jdbc:odbc: "; where: sun.jdbc.odbc.JdbcOdbcDriver - This is the bridge JDBC-ODBC used for the work with databases via ODBC. jdbc:odbc - This is the prefix for the database connection via ODBC. - This is the name of the ODBC DSN you created in Control Panel. (e) If you have configured authentication for your database, locate the following two statements below the connection string statement and set their values accordingly: static final String DBusername=""; static final String DBpassword=""; JDBC Connection (a) You need to have the JDBC driver for the used database. The list of the allowable drivers can found on the database producer site or at the site of the Sun Corporation: http://industry.java.sun.com/products/jdbc/drivers. (b) Open the file 'Common.jsp' which is in the main folder of your application path. (c) In the documentation for the selected driver find the usage section. (d) Find the database connection strings in the file. Its basic format is: static final String DBDriver =""; static final String strConn =""; where, DriverName - This is the name of the class-driver DBUrl - a database url of the form jdbc:subprotocol:subname subprotocol & subname - This is defined according to the documentation ofthe used driver. (e)Change the database connection strings as the following. (f) If you have configured authentication for your database, locate the following two statements below the connection string statement and set their values accordingly: static final String DBusername=""; static final String DBpassword=""; where, DBusername - This is the user name for the database connection Dbpassword - This is the password for the database connection

近期下载者

相关文件


收藏者