![]() |
CS/INFO 530 S05 TR 11:40-12:55 Olin 245CS/INFO 530: Architecture of Large-Scale Information Systems |
|
Project 0: Getting StartedThis pseudo-project is intended to get you started with the environment on the laptops. Each of you should do this independently to your own laptop. On the other hand, you are encouraged to help one another if you get stuck. There is a section below for each of the necessary software components. By the way, the first thing you should do to your laptop is set the password to something other than blank, right? The Database Management System: Microsoft SQL ServerThis installation is straightforward from the CD provided with your laptop. The description, long and full of screen shots, is here. JavaNext install the Java runtime. The version you want is
available here from Sun Microsystems.
Note the
installation instructions
are a separate download.
The Application ServerJBoss is a J2EE-capable application server bundled with the Apache Tomcat web engine. You can find it at the JBoss downloads page. The current version is 4.0.1. Installation is pretty straightforward. Follow the directions from Installation through Startup at this page. If you are not familiar with setting environment variables in Windows, one place to find instructions for this is the Sun JDK installation notes referenced above. If your installation is successful, you should be able to start the JBoss server and visit the JBoss server console using Internet Explorer or FireFox.The Eclipse IDENext you need the Eclipse IDE platform. You can find the download at the eclipse.org downloads page (the current release is 3.0.1; click View all platforms for release 3.0.1 to get the download for Windows XP). This is just a.zip file that you can expand where you want
the IDE to live.
Mine is
To start the IDE, double-click the Eclipse icon
you'll find in the bin subdirectory.
It requires the JAVA_HOME environment variable.
The JBoss-IDE PluginFinally, you need the plugins to help Eclipse interface with a JBoss running J2EE. Eclipse will download the JBoss-IDE plugins for you automatically, if you follow the instructions here. These instructions work pretty well, with one problem. In the section called Adding the shortcuts to the Top Menu where it says to check Default Server in the Available Command Groups pane, you must make sure that Launch is also checked. Otherwise the following step will fail (you will not find a Debug item in the Run menu). For now, you want to configure the default version of the server, rather than all or minimal. Use the IDE to start the default JBoss server you have just configured. Visit the JBoss server console with your favorite browser to check that things are working. JDBC DriversTo access a database from Java Servlet code, you must install a JDBC driver. A JDBC driver for SQL Server is available from Microsoft as a free download here. In theory, you can simply download the driver package and run the installer that comes with it. Caveat: I have not tried this personally. An alternative is to get the JDBC driver .jar files and either incorporate them into your project or install them in the
subdirectory of the JBoss installation.
Three .jar files are required: msbase.jar, mssqlserver.jar, and msutil.jar .
An archive comprising only these files is available
here
There are a few other things you need to know (or figure out) to create create and use a JDBC connection:
A Simple Web SiteTo demonstrate that all these components work, build the following simple website. The site has a number of users, and maintains a collection of <name, value> pairs for each user. This data is stored persistently in a back-end database. Note the data could be stored in a single relation R( userid, name, value )where all columns are strings and the pair <userid, name> is the primary key. When a user enters the site, she fills her name (i.e. userid) into a form. (You might expect a login password here, but we're trying to keep things simple.)A (really Spartan) version of the entry page might look like this. The site remembers the userid in a session data object, as discussed in lecture on Tuesday, then repeatedly presents a form that allows the user to query or update any of her stored <name, value> pairs. Before issuing the first query, the form page could look like this. After issuing a query, it might look like this. This site can be implemented with a few Java servlets using the session API and JDBC. If you are a bit rusty on these things, here are: A Few Helpful Links:
Unfortunately, the hardest part of all this will be learning to get all the deployment descriptor stuff right in an unfamiliar IDE. What to Submit
Create a
|