Struts Environmental Configuration Manual

xiaoxiao2021-03-05  32

1.ECLIPSE download URL: http://www.eclipse.org/

2.Tomcat download URL: http://jakarta.apache.org/site/binindex.cgi

3.Struts download URL: http://jakarta.apache.org/site/binindex.cgi

4.Tomcat for Eclipse plugin download URL: http://www.sysdeo.com/eclipse/tomcatplugin.html

5.easy struts plugin download URL: http://sourceforge.net/projects/easystruts

6. EJB Development Tools Lomboz (not required) Download URL: http://www.objectlearn.com/

The com.sdeo.eclipse.tomcat_2.2.1 in the above 4 and the com.cross.easystruts.eclipse_0.6.4 of the above 5 are copy to eclipse / plugins /, and then do the following settings

1.Tomcat's initialization setting: Start Eclipse, open the Settings window by menu Windows-> Preferences to select Tomcat and configure the Configuration 1.EaSy Struts Initialization Settings: Start Eclipse, open the Settings window to select Struts 1.1 and in Struts 1.1 Required library files and add struts.jar files 3. Type library description files required in Struts 1.1 It is recommended to join the three description files mentioned earlier: struts_html.tld, struts_bean.tld, struts_logic .tld, these three files automatically copy to the project's web-inferiology when creating a struts application project. 4. Create a Tomcat project, then right-click Project-> Properties-> Libraries, join all the package in Struts 1.1 to 5. New Add Easy Struts Support6. Put the package in Struts 1.1 Copy to Project-> Web-INF / LIB /

JAVA connection with SQL Server 2000 to obtain data 1. Download the JDBC FOR SQLSERVER drive: http: //www.microsoft.com/downloads/details.aspx FamilyID = 4f8f2f01-1ed7-4c4d-8f7b-3d47969e66ae & DisplayLang = en # filelist click setup? Download driver 2. When downloaded, install it with the default settings, will be installed to: C: / Program Files / Microsoft SQL Server 2000 Driver For JDBC3. Put C: / Program Files / Microsoft SQL Server 2000 Driver for JDBC / LIB's mssqlser.jar, msbase.jar, msutil.jar three files copied to your JDK home directory / jre / lib / ext, now JDBC driver is configured 4. Compilation Test Program: String Drivername = "com.microsoft.jdbc.sqlserver.SQLServerDriver"; String connURL = "jdbc: microsoft: sqlserver: // BLUESKY: 1433; User = sa; Password = sa; DatabaseName = sitedb"; try {Class.forName (driverName); Connection conn = DriverManager.getConnection (connURL); Statement stmt = conn.createStatement (); StringBuffer strsql = new StringBuffer (); strsql.append ( "select * from uSERTABLE where username = '" username "'"); ResultSet RS = stmt.executequery (strsql.tost Ring ()); if (! rs.next () ||! Password.equals (NullTString (RS.GetString ("Password")). Trim ())) {dbmsg = "Sorry, the user you entered does not exist or user password is incorrect ";} else {username = NulltoString (rs.getString (" username ")); selectright = NulltoString (rs.getString (" selectright ")); deleteright = NulltoString (rs.getString (" deleteright ") Updateright = nulltostring (rs.getstring ("Updateright");}

转载请注明原文地址:https://www.9cbs.com/read-34240.html

New Post(0)