0072223162 ch01

  • View
    76

  • Download
    0

Embed Size (px)

Transcript

  • CHAPTER 1

    WebLogic Server Basics

    1

    OsbNetw / BEA WebLogic 7 Server Administration / Akbar, Shah / 222316-2 / Chapter 1

    P:\010Comp\OsbNetw\316-2\ch01.vpMonday, September 30, 2002 11:59:09 AM

    Color profile: Generic CMYK printer profileComposite Default screen

  • 2 BEA WebLogic 7 Server Administrat ion

    OsbNetw / BEA WebLogic 7 Server Administration / Akbar, Shah / 222316-2 / Chapter 1

    In this chapter, we will introduce you to the basics of WebLogic Server, with termsand concepts that will be referenced throughout this book. This chapter offers anoverview of the following: Various ways to use WebLogic Server as an HTTP server

    The role of WebLogic Server as an application server

    Major Java 2 Enterprise Edition (J2EE) components such as servlets,JSPs (Java Server Pages), and EJB (Enterprise JavaBeans)

    The Resource Adapter

    Details about and differences between development and productionenvironments

    The environment provided by WebLogic Server for application developersand administrators

    WebLogic Application Server comes with an HTTP server. As an administrator,you need to be comfortable with administering the HTTP server, and you must gain thenecessary skills to administer server-side Java applications with this server. Organizationshave hybrid collections of Web servers installed on their sites to support enterpriseapplications. Therefore, you should be able to integrate WebLogic Server with otherHTTP servers.

    UNDERSTANDING TCP/IP AND HTTPHTTP is a protocol that regulates the Way web browsers and servers communicate. TheTCP/IP (Transmission Control Protocol/Internet Protocol) suite of protocols is the primaryopen standard for network communication. HTTP (HyperText Transfer Protocol), partof this suite, is the protocol of the World Wide Web. All the information that resides onthe Web as documents or pages is transferred from server to client with the help of HTTP.It is a stateless protocol, meaning that it doesnt maintain active session state informationabout each client connected to the server. Rather, it is based on request and responsearchitecture: the client contacts the server only when it needs information, and theserver communicates with the client only when it needs to deliver information back tothe client. Other protocols in the TCP/IP suite include UDP (User Datagram Protocol),ICMP (Internet Control Message Protocol), FTP (File Transfer Protocol), ARP (AddressResolution Protocol), RARP (Reverse Address Resolution Protocol), SMTP (SimpleMail Transfer Protocol), and NNTP (Network News Transfer Protocol).

    WEBLOGIC WEB SERVERWeb server software runs HTTP services and is able to host one or more Web sites.Each site is a collection of various documents and applications that form the Webcontent. This content needs to be delivered to Web clients over the network using HTTP.

    P:\010Comp\OsbNetw\316-2\ch01.vpMonday, September 30, 2002 11:59:09 AM

    Color profile: Generic CMYK printer profileComposite Default screen

  • Various HTTP servers are available on the market today, and most are similar in termsof what they provide because HTTP service is a standard feature of the Web. TheWebLogic Web server is a Java-powered server capable of delivering not only staticcontent, but also dynamic content with the help of Java-enabled technologies such asJSP and Java servlets. WebLogic Web server hosts and delivers static HTML/HTMfiles, images, Java applets, XML (Extensible Markup Language) documents, JSP, Javaservlets, multimedia files, and other types of files.

    The way Web servers and browsers communicate is represented in Figure 1-1.The client running the browser software sends a user request to the server using

    HTTP. The server software (in our case, the WebLogic Server) examines and interpretsthe request, prepares to locate the appropriate information, locates the information,and then sends an HTTP response to the client. This response is either an HTMLdocument or an image file, which is then interpreted by the clients browser softwareand presented on the clients interface accordingly.

    NOTE Web server software such as Apache, Microsoft Internet Information Services (IIS), IBMHTTP server, WebLogic Server, JRun, and many others are available to provide HTTP services.Presently, because HTTP services have become a subset of application servers, each vendordealing with application servers has built-in support for Web content handling and management.

    Lets break it down even further. The Web server serves requested contents to theclientcontents that are either statically available as HTML or dynamically generatedusing JSP and servlets. When a client sends a request for information to the Web server,the server maps the URL (Uniform Resource Locator) to a file with the given name on thelocal file system. Then either it reads the content from the disk and serves it out to thenetwork with the aid of HTTP, or the server-side program generates it dynamically.

    For example, in the case of a URL that reads http://www.softwareklinic.com/index.html,the Web server software will serve index.html after locating and loading the file from diskto client. The information contained in the document is placed between HTML tagsthat, along with the requested information, are carried over the network using HTTP.The client software interprets these tags and presents the information in a fashionappropriate for the user.

    Chapter 1: WebLogic Server Basics 3

    OsbNetw / BEA WebLogic 7 Server Administration / Akbar, Shah / 222316-2 / Chapter 1

    Figure 1-1. Web client/server architecture

    P:\010Comp\OsbNetw\316-2\ch01.vpMonday, September 30, 2002 11:59:09 AM

    Color profile: Generic CMYK printer profileComposite Default screen

  • Static Web documents are always placed in the respective folder in the appropriatedirectory. For example, all the static Web documents for the default Web app are placedin the default Web application folder. (Figure 1-2 shows the directory structure ofWebLogic 6.1 and 7.0.)

    The default Web application directory contains documents delivered when the browserdoesnt specify a URI (Uniform Resource Identifier). In other words, if the server islistening on http://server:7001, that URL will respond with documents from the defaultWeb application directory. If the browser requests http://server:7001/otherdocs, another Webapplication directory serves the otherdocs URI.

    4 BEA WebLogic 7 Server Administrat ion

    OsbNetw / BEA WebLogic 7 Server Administration / Akbar, Shah / 222316-2 / Chapter 1

    Figure 1-2. Directory structure for WebLogic 6.1 (left) and WebLogic 7.0 (right)

    P:\010Comp\OsbNetw\316-2\ch01.vpMonday, September 30, 2002 11:59:09 AM

    Color profile: Generic CMYK printer profileComposite Default screen

  • PortsWebLogic Server typically listens on port 80, but it can be set to listen on port 7001instead. You can assign the listener port address to any value ranging between 1024and 65536 (01023 are reserved). Figure 1-3 demonstrates the various communicationports available.

    If you already have a running server installed at port 80, WebLogic Server can beinstalled to listen on a port other than 80. It is not possible for WebLogic Server to listento your clients requests on the same port as another server. For example, if you are usingWindows NT/2000, Microsoft IIS will already be installed and running on port 80. Inthis case, you will either have to stop (shut down) IIS to free up port 80 for WebLogicServer or you must configure the server to listen on another port.

    NOTE No two Web servers can be configured to listen at the same HTTP port at the same time,but every Web service can be listened to on a particular port over the network.

    To access the home page of your WebLogic server, enter the following link into thebrowsers address bar: http://localhost:7001. Here, http:// is the protocol, localhost isthe computer on which the Web site is hosted, and 7001 is the port at which the WebLogicWeb server will be ready to listen for a clients request.

    Chapter 1: WebLogic Server Basics 5

    OsbNetw / BEA WebLogic 7 Server Administration / Akbar, Shah / 222316-2 / Chapter 1

    0

    1023

    1024

    65536

    Reservedport numbers

    User-definedport numbers

    Figure 1-3. Communication ports

    P:\010Comp\OsbNetw\316-2\ch01.vpMonday, September 30, 2002 11:59:10 AM

    Color profile: Generic CMYK printer profileComposite Default screen

  • Other HTTP ServersTable 1-1 provides information about other HTTP servers.

    For AdministratorsIf you use WebLogic Server as a Web server, you should be interested in the followingaspects of its functionality:

    Security Security is the key to keeping critical data related to systems andcustomers safe from hackers and pirates. It is the responsibility of administratorsto ensure that systemwide security policies and profiles are constructedand implemented to discourage hackers/pirates from breaking into theapplication/site.

    Virtual hosting Virtual hosting enables WebLogic Server to host multipleWeb sites on a single Web server or a cluster of Web servers.

    Support for proxy server configuration WebLogic Server can be integratedwith other Web servers such as Microsoft IIS, Apache, and Netscape EnterpriseServer. Client requests can be redirected or proxied from a WebLogic server toanother Web server.

    Load balancing A cluster of servers can be set up to share the load andprovide performance enhancements.

    6 BEA WebLogic 7 Server Administrat ion

    OsbNetw / BEA WebLogic 7 Server Administration / Akbar, Shah / 222316-2 / Chapter 1

    HTTP Server Vendor Description

    Apache Apache Software Foundation The most popular Web server on the Internet sinceApril 1996. The Januar