Webpages.uncc.edu
JDBC Information to connect CCI Oracle Server
1. Driver name: "oracle.jdbc.driver.OracleDriver"
2. Connection URL: "jdbc:oracle:thin:@cci-ora02.1521:class"
3. When connecting via JDBC, do not append "@class" to your username.
4. If you're using a non-centrally-managed PC, either on or off campus, then you'll most likely need to download the jar files, store them locally on your machine, then adjust your CLASSPATH according to where you've saved the jar files.
For students, you may follow the following steps to setup, compile, and load your servlet files to the servlet server.
• First, you need to have some client software to login to the server. For example, you may use putty
The server name is coit-servlet02.uncc.edu. You can connect to the server using your NinerNet username and password.
After you login change directories, cd public_html/WEB-INF you will find:
classes directory which should contain all your class files (and java files). Some servlet examples may have been already created there.
• Second, you need some software (e.g., WinSCP or psftp, you can download from: ) to transfer files back and forth between your local machine and uncc servlet machine. The host name is still coit-servlet02.uncc.edu
• download the following two jar files from the class webpage to your local directory, create a file folder named “lib”, move the two jar files to “lib” folder, then move the folder to public_html/WEB-INF (of host server coit-servlet02.uncc.edu) using WinSCP.
JDBC driver servlet-api.jar
• After you login to the server using putty, you need to specify your classpath by typing this command:
export CLASSPATH=$CLASSPATH:~/public_html/WEB-INF/lib/ojdbc14.jar
• Example to connect to Oracle:
¬ Download SampleJDBC.java from our class webpage and move to your public_html/WEB-INF/classes, compile to see whether JDBC works.
• Servlet examples:
¬ Example 1: Download HelloWorld.java from our class webpage and move to your public_html/WEB-INF/classes, then compile.
Note: you need to set access right to all servlet class files, e.g.
chmod 755 HelloWorld.class
Edit the web.xml file under your public_html/WEB-INF by adding the following lines:
HelloWorld
HelloWorld
HelloWorld
/HelloWorld
Then you can use to see whether it works.
¬ Example 2: Download DBServlet.html from our webpage and move to the servlet server under the public_html directory.
Download DBServlet.java and move to your public_html/WEB-INF/classes on host machine.
♣ For DBServlet.java, please change Oracle account login in information using your own account. You may also want to change queries if you want.
♣ For DBServlet.html, change the link of ACTION as your new servlet such as
♣ Compile DBServlet.java and set access rights to the following file.
chmod 755 DBServlet.class
♣ Edit the web.xml file under your public_html/WEB-INF by adding the following lines:
DBServlet
DBServlet
DBServlet
/DBServlet
♣ Setup your database by running the SQL statements provided to you in the “sailor” handout in class.
For more information on how to access the Oracle database web interface visit the following page:
♣ Test the setup
You can see a working example at:
Please note you need to follow the above steps strictly. Contact me if you have any question.
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.