JSP's environment engine--websphere

Source: Internet
Author: User
Tags html tags ibm db2 ibm db2 database include connect naming convention pack websphere application server
Features of Js|web WebSphere

WebSphere is IBM's suite of software offerings, including WebSphere application servers, WebSphere Studio, and WebSphere performance packs. There will be other products added to the Order to supplement and expand. He is IBM network infrastructure software, is the development and integration of E-COMMERCE applications of intermediary software, from simple Web pages to complex business transactions, it can be fully supported.

WebSphere can operate on 35 operating system platforms, in addition to computers, can also be used for PDA, information appliances and other products, cross-platform ability.

WebSphere currently employs more than 35,000 companies worldwide and has grown by more than two digits for 9 consecutive quarters. 1999, the Application server (application Server) market share of IBM 14%, and 2000 this number has risen to 30%, in the market has been sitting two. In the near future, IBM's push middleware (middleware) platform WebSphere will launch version 4.0, which is expected to further increase IBM's share of the application server market, posing a threat to market leader Bea Systems. WebSphere is currently ranked second in global application server products, after BEA Systems's WebLogic, but has ranked first in the Asia Pacific region. IBM and WebSphere Information intermediary software MQSeries has a market share of up to 75% in the world.

The WebSphere Application Server enables you to implement the purpose of "write, use everywhere" for the development of the servlet. The product includes a java-based Servlet engine, independent of the WEB server and the operating system on which it is based. The WebSphere Application Server provides options for server plug-ins that are compatible with most popular application design interfaces (APIs). The supported WEB servers are:
• IBM HTTP Server
L Apache Server
L Domino
L Lotus Domino Go Webserver
• Netscape Enterprise Server
• Netscape FastTrack Server
L Microsoft Internet Information Server
In addition to the Servlet engine and plug-in, the WebSphere Application Server provides:
1. JavaSoft Java Servlet API implementations, and extensions and additions to these APIs.
2. Examples and documentation, sample Servlet and Web site applications demonstrate simple and advanced techniques. Online and printable documents for you to get started quickly, and to help master server advanced features using demo basic classes and their extended sample applications.
3. The manager of the WebSphere application server, using a graphical interface, is easy to:
(1) Set options for mounting the local and remote Servlet
(2) Set initialization parameters
(3) Managing the Servlet
(4) Specify a Servlet alias
(5) Create a Servlet chain and filter
(6) Enable Lightweight Directory Access Protocol (LDAP) directory support
(7) Record Servlet messages
(8) Enable JVM debugging
(9) Monitor the resources used by the WebSphere application server
(10) Monitor mounted servlet, active servlet session, and JDBC connection
(11) Control errors, events, anomalies, and log output
(12) Create dumps and data snapshots
(13) Dynamically enable and disable tracing
4. Caching and reuse of connection management features with jdbc-subordinate database connections. When a Servlet requires a database connection, it is available from the available connection's buffer pool, eliminating the overhead of opening a new connection for each request.
5. Additional Java classes, followed by the JavaBeans specification, allow programmers to access jdbc-subordinate databases. These data access beans provide enhanced functionality when hiding the complexity of using relational databases. They can be used in a visual integrated development environment.
6. JSP dynamic page content support. JSP technology enables you to generate dynamic Web pages from server-side scripting. The result is a separation of rendering logic, such as HTML code that defines the structure and appearance of the Web site, from the business logic (for example, accessing the database for Java-encoded information to be displayed on the Web site). In terms of flexibility, JSP files can include any combination of:<servlet> tags, NCSA tags, and JavaBean that are directly inserted into Java.
7. Enable directory services supported by LDAP (Lightweight Directory Access Protocol).
8. Modules and command-line interfaces for integrating WebSphere application servers and Web servers (such as Apache server) into the Tivoli Management Environment (Tivoli Management Environment) for distributed monitoring and operations. The Tivoli modules are not released with the WebSphere Application Server, please visit the Web site (http://www.software.ibm.com/webservers/appserv/) for more information.
9. Includes Enetworkdispatcher, webtrafficeexpress proxy servers, and AFS Distributed file systems to provide a scalable Web server environment.
The overall structure of the WebSphere applecation server is shown in the following illustration:




screen.width-333) this.width=screen.width-333; " >

Its basic working process:
After the customer makes the request, the servlet call request is handed over to application Server by Httpserver, by application
The Server and Java servlet Engine execute a user-invoked servlet for database connections and send SQL requests to the database for processing. The database returns the results to Appliction Server. When the servlet generates a dynamic page, it gives the processing results to httpserver. Httpserver returns the page to the user.

The WebSphere Application server support for JSP is implemented through the JSP processor. When you install the WebSphere Application server on a Web server, the configuration of the Web server is set to pass HTTP requests to the JSP file (that is, the file name extension. jsp) to the WebSphere application server. The WebSphere Application server configuration is set to pass the JSP file to its JSP processor (Pagecompile).
The JSP processor creates and compiles a Servlet for each JSP file. The processor also generates two files for each JSP file:
(1) Java file: Contains Java language code that can be used for the Servlet;
(2) class file: the compiled Servlet.
The JSP processor places the. Java and. class files under the directory Servletspagecompilejsp_file_path, where Jsp_file_path is the directory path where the JSP source files reside. For example, if the JSP file is in the Websphereappserversampleswebbank directory, the. Java and. Class The file is in the Websphereappserverservletspagecompilewebsphereapp Serversampleswebbank directory. Java and. class files have the same file name. The processor uses the naming convention, which includes adding underscore characters and suffixes to the JSP file name. For example, if the JSP file name is login.jsp, the resulting file is _login_xjsp.java and _login_xjsp.class.

As with all servlet, the servlet generated by the JSP file is a subclass or descendant class of Javax.servlet.http.HttpServlet. If the Servlet class is part of a package, the servlet Java code contains the import statements for some of the required classes and package statements. If the JSP file contains JSP syntax (such as directives and scriptlets), the JSP processor translates the JSP syntax into equivalent Java code. If the JSP file contains HTML tags, the processor adds Java code so that the Servlet can output HTML one character after another.

WebSphere has a certain degree of difficulty in fully mastering the professional. In addition, WebSphere itself has more than 2G of capacity, requires more than 256M of memory support, system requirements are high.

Installation of WebSphere

WebSphere installation under Linux

1. The X terminal is recommended for all of the following steps in the console (console) or graphics Xwindow x terminal, as Superuser root is logged into the Linux system.
2. Load this tournament IBM I love Linux Web application development disk, typing at the command line: Mount/mnt/cdrom

3. Go to the disc root and typing at the command line: Cd/mnt/cdrom

4. Run the CD-ROM installer and type at the command line:./install.sh. Installation screen automatically entered as shown in the picture, because you want to enter the advanced group for the application Development contest, so according to the installation screen prompts, we choose to type: A, into the Advanced group installation.




screen.width-333) this.width=screen.width-333; " >

5. Go to the Advanced Group installation screen as shown in the picture. IBM I love the Linux Web application contest using a number of IBM applications, in order to reduce the number of competition participants in the installation of many products, the CD-ROM for turbolinux dataserver The Chinese version 6.1 has made a lot of customization work to make it easier for you to install the application contest software. In order to successfully participate in this grand Prix, we hope you will use our bundled Turbolinux as Linux system platform. According to the screen prompts to: Y, the next automatic installation.




screen.width-333) this.width=screen.width-333; " >

6. Setup automatically installs the In-progress screen, which shows the automatic installation of the IBM JDK, IBM HTTP Server, IBM SSL Modules ... And so many applications, please refer to your installation of the actual situation.




screen.width-333) this.width=screen.width-333; " >

7. IBM http Server is a WWW server developed on the basis of Apache HTTP server, and has added the functionality of SSL and online Web page HTTP server configuration on the original Apache basis. In order for you to securely make remote Web configuration and manage HTTP server, you must set up access and Access user passwords for your HTTP Management server. During installation, the program automatically prompts you for the Admin user name (the default username is: admin, press ENTER directly as the default user), and manage user password (password must be entered two times, and two times the same password). Specific as shown in the picture.




screen.width-333) this.width=screen.width-333; " >

8. Next, the installer automatically installs the IBM DB2 UDB Workgroup Edition database V7.1, which is automatically completed without any human intervention. As shown in the figure.




screen.width-333) this.width=screen.width-333; " >

9. Displays the status of the IBM DB2 installation success.




screen.width-333) this.width=screen.width-333; " >


10. After the system automatically installs the IBM DB2 database, automatically enters the installation phase of the IBM WebSphere Application server and related applications, automatically mount the WebSphere application server, related documents, IBM VisualAge for Java for Linux 3.0, WebSphere application Development instance template Easyportal ... Some of these packages are relatively large, such as VisualAge for Java, the installation time may be longer, please be patient and wait for the system to automatically install the end. As shown in the figure.




screen.width-333) this.width=screen.width-333; " >

11. Shows that the entire advanced Group application software installation is successful and can go into the practical phase.




screen.width-333) this.width=screen.width-333; " >


12. After the installation was successful, the background IBM DB2 and IBM HTTP should have been started normally, and you should be able to browse to the home page of this computer in the browser. In Xwindow, start the Netscape,url field by typing: http://localhost or http://your_host_ip or http://your_host_name, if the background IBM HTTP Server starts normally, should see the picture




screen.width-333) this.width=screen.width-333; " >


! Note: If you do not see the front page screen, IBM HTTP Server may not start normally, primarily because of the problem of naming the host name during the installation of the Linux system. You can resolve the problem by using the following methods:
A. Query your current Linux system host name, type command: hostname
B. Assume that the system return answer is: linux.cn.ibm.com
C. Immediately thereafter, typing command: Ping linux.cn.ibm.com, see if you can connect to the host through this host name, if you can connect, please skip D. Enter E..
D. If you do not ping the normal linux.cn.ibm.com, typing command: vi/etc/hosts edit the file.
Join this row at the end of the file
xxx.xxx.xxx.xxx yourhostname.com Yourhost
Here xxx.xxx.xxx.xxx is the digital IP address that you actually use to install Linux system, for example: 192.168.1.100, this IP address must be able to ping directly (ping 192.168.1.100)
E. Edit IBM HTTP configuration file, typing command: vi/opt/ibmhttpserver/conf/httpd.conf
Locate the line that starts with the #ServerName your.machine.com, and then add another line:
ServerName Yourhostname
F. Restart IBM HTTP server servers, typing command:
/opt/ibmhttpserver/bin/apachectl restart
You can start the HTTP server normally.

WebSphere Installation under NT

WebSphere can be installed on Windows operating system platforms such as NT, 95/98, Win2000, and the following describes how to install and configure a WebSphere application server on Windows NT.

Installing WebSphere under Windows requires more than 128 megabytes of memory, which is even better if you have 256 megabytes. The operating system requires Windows NT (Pack 3). Before you install, you must have a Web server, which can be one of the following:
IBM HTTP Server version Windows NT Edition (WebSphere Application Server installation CD includes IBM HTTP server)
Apache Server version of Windows NT Edition
Domino version 5.0 Windows NT Edition
Lotus Domino Go Webserver version 4 Windows NT Edition
Microsoft Internet Information Server version 3.x above Windows NT Edition
Netscape Enterprise Server version 3.01 and version 3.51 Windows NT Edition (recommended version 3.5.1)
Netscape FastTrack Server version 3.01 Windows NT Edition
The Java Development Component (JDK) is also required, and we recommend using the JDK provided with the WebSphere application server. You also need the Java servlet api,websphere application server to include JSDK version 2.0 or later. Of course, you also need web browsers and appletviewer or browsers that support JDK1.1. For example: Netscape Navigator 4.06 or 4.0.7, or Microsoft Internet Explorer 4.01 or later with a fix pack, or Sun HotJava 1.1 or later. Some older browsers do not properly handle text that enables native language support. If you see a foreign character on the user interface, such as "senable" instead of "Enable," you can correct it by upgrading your browser.
First step: Install the Web server:
If you plan to install an IBM HTTP server, you must install it before you install the WebSphere application server. The WebSphere Application Server installation CD has IBM HTTP server. Installing the WebSphere Application Server changes the WEB server httpd.conf file. However, if the Web server was installed after the WebSphere Application server was installed, no changes were made and the WebSphere application Server was not able to run correctly. After you install the IBM HTTP server, you need some configuration to enable SSL support. For specific configuration, refer to the IBM HTTP Server documentation for instructions.
For other Web servers that you plan to install, such as Apache server, install the WebSphere Application Server before installing it.

Step two: Before installing:

Before installing, if you have an older version of WebSphere in your system, uninstall the old version first. Then install the new version. Before uninstalling, it is a good idea to back up the WebSphere Application Server version 1.x file.

(1) File backup
Before uninstalling a previous version of WebSphere Application Server from Windows NT, make sure that the files you want to migrate are already or will be saved. The graphical user interface that is displayed when you install the WebSphere Application Server version 2.0 backs up the files in the WebSphere Application Server directory, including classes, domains, Servlet, property files, where the property files include Servlet.properties, Admin_ Port.properties, Rules.properties, Jvm.properties, Aliases.properties, Connmgr.properties, Userprofile.properties. If a file resides outside these four directories (for example, if you create your own directory in a WebSphere Application Server installation), install WebSphere Application Server version 2.0. Before, back up files in a location other than the WebSphere Application server installation.

(2) Uninstall previous version
For Windows NT, use the Add/Remove option in the Start--> Control Panel, or uninstall from the IBM WebSphere--> WebSphere Application Server version 1.x from the start--> program-->.

Note: When a version of the WebSphere Application server is installed, it copies the Web site configuration file as a backup file, and then modifies the original configuration file. This modified file becomes the active profile when you use the WEB server. When you uninstall the WebSphere Application Server, the previous configuration file is not restored, and it is still a backup file. In order for these settings to be active again, they must be converted from the backup file to the active Web server configuration file.

In addition, you need to clear the CLASSPATH. Delete this information before you install version 2.0. For Web servers using Go Webserver on Windows NT, Java support on the Go Webserver is automatically uninstalled when the WebSphere Application server is installed. Please refer to the documentation for other information.
Step three: Install the WebSphere server:

Before you install the WebSphere application Server, make sure that you have:

(1) Back up all files that have not been automatically backed up by Setup
(2) Install the WEB server that you plan to use. The WEB server must be installed before the WebSphere Application server is installed.
(3) Make sure that the Web server has stopped running before you install it.

Note: If you specify the use of an IBM HTTP server or Apache server during the installation of the WebSphere application server, you will be prompted to confirm the location of the WEB server httpd.conf file.
On Windows NT, insert the WebSphere Application Server installation CD, go to a subdirectory named after the Windows NT operating system, and run the executable installer (Setup.exe). A series of dashboards will guide you through the installation.

Configuring the WebSphere Application Server

The following describes how to configure a WebSphere application server so that it and its components can work together. After these tasks are completed, the WebSphere Application server is able to run almost all functions by default configuration.

(1) Configure Apache Server
If you are using Apache server as your Web server, join this line in the httpd.conf file:
Addmodule mod_app_server.c.
(2) using the database.
To ensure that a WebSphere application server is connected to a relational database such as Oracle or DB2: Add a. zip file to the Java.classpath property in the file/properties/bootstrap.properties. You can also specify files by using the Java engine page of the manager interface of the WebSphere application server. Also, make sure Java.classpath contains valid drivers for database connections.
(3) Operating mode
The Ose.mode property is used to control whether the WebSphere application server is part of a Web server (in-process) or run in standalone mode (out-of-process). This property is in the/properties/bootstrap.properties file. The default value for Ose.mode is out. The Apache server or IBM HTTP server requires that the set Ose.mode property must be out, meaning that the WebSphere application server must be running in standalone mode. For other Web servers, you can ose.mode as in and run the WebSphere Application server as part of the Web server. But that's not usually the way to do it. If necessary, reset Ose.mode means to set the value of Ose.mode to out. For example, if you convert from Netscape Enterprise Server (ose.mode=in), which runs as part of Webserver, to an IBM HTTP server (requiring ose.mode=out), don't forget to run the IBM HTTP Server , change the Ose.mode property to out.

In addition to the manual editing of the Bootstrap.properties file, the Java engine page of the manager interface provides an easy way to lock the Ose.mode property value. The Java engine page provides a radio button that can be used to indicate that a WebSphere application server is running as part of a WEB server (ose.mode=in) or in stand-alone mode (ose.mode=out).

Running the WebSphere Application server as part of a WEB server provides high performance for the servlet and other applications, but is less secure. Running the WebSphere Application server as part of a Web server allows the WebSphere application server to stop automatically when the Web server is closed. Running the WebSphere Application Server in standalone mode requires additional steps.

Start and stop the WebSphere application server

When you start a WEB server, the WebSphere application server starts automatically.
If you run a WebSphere application server as part of a Web server, the WebSphere application server will automatically stop when the Web server is closed. If you run in standalone mode, the WebSphere application server does not automatically stop.

When the WebSphere application server is running out-of-process on Windows NT, stopping the WEB server requires you to manually stop the WebSphere Servlet service to stop the WebSphere application server. To do this, select the WebSphere Servlet service from the Start--> Settings--> Control Panel--> and press the Stop button.

Installation inspection and fault finding

To verify that the WebSphere Application server is installed and configured correctly, invoke the Snoop servlet provided by the WebSphere application server. Use a Web browser to enter in the Address bar: Http://your.server.name/servlet/snoop. The Snoop Servlet should echo the HTTP requests sent by the client and the initialization parameters of the servlet. The code for Snoopservlet and other servlet is located in the/servlets directory. If the servlet fails:

(1) If you have previously edited the. properties file by hand or changed the configuration of the WebSphere application server, first look at the files to see if they introduce illegal or incorrect values. Especially to check the/properties/bootstrap.properties file.
(2) Open local logs and traces for the Web server. Locate the WebSphere Application Server Bootstrap.properties file first. The ose.trace.enabled and Ose.trace.to.webserver properties are then set to true. Stop the WEB server and restart. If the WebSphere application server is running in standalone mode, it does not stop when the WEB server is stopped. Check the WEB server error log and the logs in the/logs directory of the WebSphere application server. Look at the cause of the error.
(3) Enable the debug console and restart the Web server. The debug console for the WebSphere Application server is used to collect and view tracking and monitoring data. For example, from the debug console, you can act as a set of monitoring programs that start and stop columns in the collection and monitoring of server data. In the server console of the debug console, the stdout and stderr streams of the servlet are allowed to be viewed. By default, the console is not started. Set the Debug.server.console.enabled property to True in the WebSphere Application server Debug.properties file, and then restart the Web server to make the changes take effect. Alternatively, you can run Http://your.server.name/servlet/DebugConsoleServlet in the Web to enable the debug console. On Windows NT, to successfully view the debug console, you must configure Windows NT to allow one or more services to interact with the Windows desktop. If you are using a WEB server that is running as a Windows NT service:
Select Start--> Settings--> Control Panel--> service.
Select the appropriate service for the WEB server.
Click the Start button.
In the Results dialog box, select the check boxes that allow the service to interact with the desktop.
Restart the WEB server for the changes to take effect.

For Microsoft's IIS servers, perform the above procedures for each service associated with the Web server, such as Web publishing and FTP services. These services must be allowed to interact with the Windows NT desktop. If the WebSphere application server does not start any WEB server-related processes at run time, you need to perform the above procedure for the WebSphere Servlet service to allow the service to interact with the desktop.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.