Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application Server Vs Web Server

Status
Not open for further replies.

teky

Programmer
Mar 24, 2000
55
US
Can anybody please explain me the difference between
Application Server and Web Server.

Thanks,
Teky.


 
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.
 
Also, think about nTier systems.

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
 
Hi,
can anybody tell me the oracle odbc driver resources
and easy way to connect oracle with java
Thanx

Sree
 
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
 
parthasara,

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 ();

System.out.println ("Connecting...");
Connection conn =
DriverManager.getConnection ("jdbc:eek:racle:thin:mad:" + database,
user, password);
// DriverManager.getConnection ("jdbc:eek:racle:eek:ci8:mad:" + database,
// user, password);

System.out.println ("connected.");

// Create a statement
Statement stmt = conn.createStatement ();

// Do the SQL "Hello World" thing
ResultSet rset = stmt.executeQuery ("select 'Hello World' from dual");

while (rset.next ())
System.out.println (rset.getString (1));

System.out.println ("Your JDBC installation is correct.");

// close the resultSet
rset.close();

// Close the statement
stmt.close();

// Close the connection
conn.close();
}

// Utility function to read a line from standard input
static String readEntry (String prompt)
{
try
{
StringBuffer buffer = new StringBuffer ();
System.out.print (prompt);
System.out.flush ();
int c = System.in.read ();
while (c != '\n' && c != -1)
{
buffer.append ((char)c);
c = System.in.read ();
}
return buffer.toString ().trim ();
}
catch (IOException e)
{
return "";
}
}
}

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top