|
| |
Running Servlets with JSDK
- Start the JSDK web server by double clicking on the Start
Server icon in the Java
Tools folder (or go to the root directory of the JSDK (e.g., d:\jskd) and type
"startserver")
- Copy your servlet bytecode into the D:\jsdk\examples\WEB-INF\servlets
directory and copy your HTML documents into the D:\jsdk\examples\servlets
directory.
- To test your servlets, simply type http://localhost:8080/examples/servlet/YourServlet
(where YourServlet is the name of the servlet that you want to test) in the browser. Note
that the default port is 8080 and subdirectory is servlet (without the s).
- To serve HTML pages, simply type http://localhost:8080/examples/servlets/myDoc.html.
Note that the subdirectory is servlets (with the s this time (confusing
enough? J )).
- If you need to recompile your servlet, you need to:
- Edit the source
- Recompile the source
- Copy the bytecode (i.e., .class file) into the D:\jsdk\examples\WEB-INF\servlets directory.
- Stop the web server! (Just close the web server MS-DOS window that was opened when
you started the server (or go to the root directory of the JSDK (e.g., d:\jskd) and type
"stopserver"). This is to make sure the servlet is reloaded.
- Restart the web server
(i.e., back to Step 1)

Setting Up an Access DataStore for your JDBC-ODBC Java Programs
- Double click on the Start | Setting | Control Panel | 32 Bit ODBC icon. Will see the
ODBC Data Source Administrator screen.
- On the User DSN tab, click Add.
- Will see the Create New Data Source screen.
- Select Microsoft Access Driver and click Finish.
- Will see the ODBC Microsoft Access 97 Setup screen. Under Data Source Name, enter the
name that you want to have associated with the database, e.g., eCommerceDB. (This is the
same name that you need to use when specifying the DB URL in your program, e.g.,
jdbc:odbc:eCommerceDB.)
- Click on the Select
button to select the file that is associated with your
database (e.g., c:\somedir\myDb.mdb). This assumes that you have already created an Access
database using Access earlier.
- Click OK
- Click OK again to leave the ODBC Data Source Administrator screen.
|