;
帖子
3919 
精华
积分
11710 
鱼币
0 ¥ 
来自
大连 
在线时间
1858 小时 
注册时间
2007-6-11 
最后登录
2009-10-20 

贴图大师勋章新人进步勋章宣传大使勋章论坛元老勋章

3
发表于 2009-1-5 19:48 | 只看该作者
websphere濡備綍鍒嗙闈欐佸拰鍔ㄦ亀eb鍐呭 - 缂栫▼搴 - Powered by SupeSite

浣犵殑浣嶇疆锛缂栫▼搴 >> 璧勮 >> WEB鏈嶅姟鍣 >> WebSphere >> 璇︾粏鍐呭 鍦ㄧ嚎鎶曠ǹ

websphere濡備綍鍒嗙闈欐佸拰鍔ㄦ亀eb鍐呭

鍙戝竷: 2008-7-01 22:16 |  浣滆: admin |   鏌ョ湅: 14娆

This tip describes how to separate static content from a WebSphere application

so it can be served by the Web server instead of the application server.

Separating static and dynamic Web

content

Separating your static Web content

(HTML, GIF, CSS files, etc.) and dynamic Web content (servlets and JSPs) allows

processing capacity to be split between the Web server and application server.

You can then allocate capacity between the two based on the amount of dynamic

and static content in your site. If your site serves mostly static content, it

is more cost effective to add more Web servers than it is to add more

application servers.

To separate a Web

application's static and dynamic Web content:

Disable the WebSphere file-serving feature

in the Web module:

Start the Application Assembly Tool

(AAT), for example:

/bin/assembly

Select File -> Open... from the AAT main

menu and open the enterprise archive (EAR) file.

Select the required Web module in the

navigation tree on the left. Click the IBM

Extensions tab on the right, then un-check

the File serving enabled option, as shown in the figure below. Click Apply.

720)this.style.width=720;" border=0>姝や富棰樼浉鍏冲浘鐗囧涓嬶細

720)this.style.width=720;" border=0>

Save your changes and exit AAT.

Install the updated EAR file on your application server machine.

You can do this using the WebSphere Administrative Console, or wsadmin.

Copy the plug-in configuration file (/config/cells/plugin-cfg.xml) to the remote Web server machine.

This is the plugin-cfg.xml entry when the WebSphere file serving feature is enabled:

...

WebSphere will serve all URIs starting with /itsobank/....

Now that we have disabled the file-serving feature of WebSphere, only JSP and servlet URIs are served by the application server. Regenerating the plug-in configuration updates the plugin-cfg.xml entry as follows:

...

WebSphere has intelligently updated the plug-in file to let the Web server serve static content. The Web server passes dynamic URIs for servlets and JSPs back to WebSphere.

Next we need to set up the Web server to serve the application's static content.

First, extract the static content from the application archive and copy it to the Web server.

Tip: To prevent errors and to make the process repeatable, it is best to use some type of script to extract and deploy the static content to the Web server. Alternatively, intelligent content management software can be used to automatically route documents around the network when they are updated.

Next, add an alias for the application's static content folder to the IBM HTTP Server configuration:

Open the /conf/httpd.conf file in an editor and add the required alias to the end of the file, for example:

Alias /itsobank/ "C:/IBMHttpServer/htdocs/itsobank"

Save your changes.

Restart the IBM HTTP Server.

Try out the application from your browser.

The Web server should serve the static content. If you stop the application server, you should still get the static pages from the Web server, but servlets or JSPs can鈥檛 be accessed.

鎵撳嵃 | 鏀惰棌姝ら〉 |  鎺ㄨ崘缁欏ソ鍙 | 涓炬姤
涓婁竴绡 涓嬩竴绡
 

璇勫垎锛0

鍙戣〃璇勮
鏌ョ湅鍏ㄩ儴鍥炲銆愬凡鏈0浣嶇綉鍙嬪彂琛ㄤ簡鐪嬫硶銆