% /* ***** JSQLConnect Examples ****** Overview -------- This sample JSP demonstrates using JSQLConnect to create and populate a table then fetch and display the data to the web browser. Database connections are aquired through the JDBC driver manager. Steps ----- 1. Load the JSQLConnect JDBC Driver. 2. Make a JDBC connection using the JDBC Driver Manager. 3. Create and populate a table 4. Display the rows from the table 5. Close the connection Requires -------- 1. Microsoft SQL Server is up and running. 2. The datasource, user and password in jdbc:JSQLConnect://localhost/database=master/user=sa/password=secret are valid 3. JSQLConnect.jar is in the classpath of your JSP/servlet engine. For example, if you are using Apache Tomcat 4.x JSQLConnect.jar should be in %CATALINA_HOME%\common\lib If you are using another servlet engine please consult that product's documentation regarding deployment of 3rd party libraries. 4. Your JSP/servlet engine and web server are running. Run the JSP ------------- There is no need to compile a JSP. Deploy the JSP. If you are using Tomcat 4.x :- Copy ExampleJSP.jsp to %CATALINA_HOME%/webapps/examples/jsp The specific URL to run the example depends on the servlet engine you are using. If you are using Tomcat 4.x run the example at a web browser with:- http://localhost:8080/examples/jsp/ExampleJSP.jsp The results of the result query will be displayed. */ %>
| Column 1 | Column 2 |
| "+queryResult.getString(1)+" | "+queryResult.getString(2)+" |