the web server is the one you call when you request a page. It knows where to find the page, which protocols to use, how the page is protected, how to send it back to you ...
application server is only aware of the application it is designed for. It doesn't serve web pages but this application's answers
Think of the application sever as a subset of the web server. A real world example is ColdFusion running on IIS.
IIS (the web server) handles all incoming requests and outgoing responses. When the request is for a ColdFusion page (ie a page that requires interpretation by the ColdFusion application server), IIS knows to pass the request on to ColdFusion, which will process the page and return results to the Web Server, which in turn sends the response to the client.
For example, B2B Enterprise Architectural Apps require something like:
Server Node 1: Web Server
Server Node 2: Middle Tier App Server
Server Node 3: SQL Server
Being an M$ example, of course, as that's what we have here.
The page served up on the web server calls for certain procedures to run when, for instance, a form is submitted. Those procedures are stored on the App server(s) in the form of .dll's, usually. And from that point the app does what it needs to do and life goes on.
In the meantime, the webserver continues to go about it's business, making sure anyone who goes to
get's the information they are requesting (web pages, usually). Web servers handle the front end of our application.
Having an app server allows us the freedom to make 'adjustments' (read: emergency revisions) on the fly without disrupting workflow or traffic. App servers handle the 'guts' to our application.
Of course, this is just a very basic, general idea of the differences. "Absorb what is useful, discard what is not. Add what is uniquely your own." - Bruce Lee - The Tao of Jeet Kune Do
An application server need not have anything to do with web pages, and indeed many don't even run IIS. An application server serves up an application, like say "Excel", to a number of client machines. Instead of loading Excel on each client, you just map a shortcut from the application server to the client desktops and when the client clicks on the icon, the application is launched on the server and "served" to the client machines. Several clients can run an application from one application server. These can, of course, be run in the context of a web-based environment, and I think that accounts for much of the confusion that surrounds your very good question. John Hoarty
jhoarty@quickestore.com
You need to connect via jdbc, not odbc. Jdbc drivers are included with Oracle product -- check documentation for thei location. I've attached code below that does a simple connect to an Oracle db and does a simple SQL as an example.
/*
* This sample can be used to check the JDBC installation.
* Just run it and provide the connect information. It will select
* "Hello World" from the database.
*/
// You need to import the java.sql package to use JDBC
import java.sql.*;
// We import java.io to be able to read from the command line
import java.io.*;
class JdbcCheckup_dos
{
public static void main (String args [])
throws SQLException, IOException
{
// Load the Oracle JDBC driver
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
// Prompt the user for connect information
System.out.println ("Please enter information to test connection to the database"
String user;
String password;
String database;
user = readEntry ("user: "
int slash_index = user.indexOf ('/');
if (slash_index != -1)
{
password = user.substring (slash_index + 1);
user = user.substring (0, slash_index);
}
else
password = readEntry ("password: "
database = readEntry ("database (a TNSNAME entry): "
System.out.print ("Connecting to the database..."
System.out.flush ();
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.