Struts development configuration manual based on SQL Server database, test! 1.eclipse download URL: http://www.eclipse.org/2.tomcat download URL: http://jakarta.apache.org/site/binindex.cgi3.struts download URL: http://jakarta.apache. ORG / Site / BinIndex.cgi4.tomcat for eclipse plugin download URL: http://www.sysdeo.com/eclipse/tomcatplugin.html5.easy struts plugin download URL: http://sourceforge.net/projects/easystruts6.ejb Development Tools Lomboz (not required) Download URL: http://www.objectLearn.com/ The com.sysdeo.eclipse.tomcat_2.2.1 in the above 4 and the com.cross.easystruts.eclipse_0.6.4 in the above 5, respectively Copy to Eclipse / Plugins /, then make the following settings 1.Tomcat initialization setting: Start Eclipse, open the Settings window by menu Windows-> Preferences Open the Settings window Select Tomcat and configure the initialization settings for Configuration 1.Easy Struts: Start Eclipse, through the menu Windows- > Preferences Open Settings window Select Struts 1.1 and add Struts.jar files in the library file required for Struts 1.1. JAR file 3. It is recommended to join the three description files mentioned earlier in Struts 1.1. Yes: struts_html.tld, struts_bean.tld, struts_logic.tld, these three files automatically copy to the project's Web-Inf directory 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 connections 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.exe Download Driver 2. When the download start installation, you will be installed with the default settings, which 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 main directory / jre / lib / ext, now JDBC driver is configured 4. Compile the test: 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 (connUR); statement stmt = conn.createstatement (); stringbuffer strsql = new stringbuffer (); s Trsql.Append ("Select * from userTable where username = '" username "); resultset = stmt.executeQuery (STRSQL.TOSTRING ()); if (! rs.next () ||! Password.equals (NullTString ("Password")). Trim ())) {dbmsg = "Sorry, the user you entered does not exist or the user password is incorrect";} else {username = nulltostring (rs.getstring " "); class = nulltostring (rs.getstring (" class "); deleteright = nulltostring (rs.getstring (" deleteright "); updateright = nulltostring (rs.getstring"