2007年2月24日 星期六

Running ArcIMS9.1 with Tomcat5.5 in Windows - Part C: Configure Virtual Directory

Use virtual directory in Tomcat5.5 Application Server

1. Create ArcIMS Website and Ouput folders at desired location, for example,
D:\arcgis\ArcIMS\Website
D:\arcgis\ArcIMS\Output
Note: both of folders have been created in for sample as installing ArcIMS9.1. They can be copied to the path above.

2. Create xml-format context files for both directories in Tomcat, they are put in \conf\Catalina\localhost\ for virtual directory service, for example, if the website is ArcIMS_WebSite and output site it ArcIMS_OutputSite, then create ArcIMS_WebSite.xml and ArcIMS_OutputSite.xml with following content, respectively, (omit ... symbol since it is escape character)
<...?xml version="1.0" encoding="UTF-8"?...>
<...Context path="/ArcIMS_WebSite" docBase="D:\arcgis\ArcIMS\Website" debug="0" privileged="true" /...>

<...?xml version="1.0" encoding="UTF-8"?...>
<...Context path="/ArcIMS_OutputSite" docBase="D:\arcgis\ArcIMS\Output" debug="0" privileged="true" /...>

3. Run ArcIMS Administrator, with correct login username and password, the web folder, server and service will be listed.

4. Check view->site properties, input data for ArcIMS Site and Server Ouput tags:
in ArcIMS Site tag, make sure hostname and host alias are correct, then input HTTP Location (URL) and Web Site Directory. For example:
http://server_name:8000
D:\arcgis\ArcIMS\Website
in Server Output tag, input Directory Location and HTTP Location (URL), e.g.
D:\arcgis\ArcIMS\Output
http://server_name:8000/ArcIMS_OutputSite

5. Check service item, and create new service. Herein, in Service pan, the name, map file and virtual server are required. For example, set them as
ServiceTest
mapfile.mxd
ImageArcMapServer1
Note: as selecting map file, if mxd format file is selected, the virtual server must be ImageArcMapServer; if axl format file is selected, the virtual server would be ImageServer. The mxd file is created by ArcMap tool, the axl file is created by ArcIMS Author tool.

6. Then, go to check service output in the same panel, the image type should be jpeg format, the output directory and URL should be the same as setup above, i.e.
D:\arcgis\ArcIMS\Output
http://server_name:8000/ArcIMS_OutputSite

7. Click OK! If the service works, the service status would be running.

8. It is also available to create a virtual server by selecting server item and indicating server type. The new virtual server can be assigned to service.

9. Check Tools->Start Designer, input a web site directory, say ShapeTest, the folder “ShapeTest” will be created under D:\arcgis\ArcIMS\Website\ and include all material related to display image map.

10. Determinate a hostname and connect it, then select a service for display map.
Note: the hostname will be a key to browse it from the client site. For example, if the hostname is servername in this case, it might be only browsed at local machine or local network; e.g., http://server_name:8000/.... If the hostname is intranet IP address, such as 192.168.1.2, or internet IP like 140.128.65.114, it would be able to work through internet.

11. Follow up indication for choosing viewer such as html or Java viewer and click OK. HTML viewer will be recommended for easy setup.

12. When it is done, click “create site” button to complete.

Open the browser, type the website to view. For example in this case,
http://server_name:8000/ArcIMS_WebSite/ShapeTest
if the hostname is IP like 192.168.1.2, the it would be
http://192.168.1.2:8000/ArcIMS_WebSite/ShapeTest

Running ArcIMS9.1 with Tomcat5.5 in Windows - Part B: Configure Real Directory

Use real directory in Tomcat5.5 Application Server

1. Create ArcIMS Website and Ouput folders under \webapps\ROOT\, e.g.
C:\Tomcat5.5\webapps\ROOT\Website
C:\Tomcat5.5\webapps\ROOT\Output
Note: both of folders have been created in as installing ArcIMS9.1. They can be copied to the path above.

2. Run ArcIMS Administrator, with correct login username and password, the web folder, server and service will be listed.

3. Check view->site properties, input data for ArcIMS Site and Server Ouput tags:
in ArcIMS Site tag, make sure hostname and host alias are correct, then input HTTP Location (URL) and Web Site Directory. For example:
http://server_name:8000
C:\Tomcat5.5\webapps\ROOT\Website
in Server Output tag, input Directory Location and HTTP Location (URL), e.g.
C:\Tomcat5.5\webapps\ROOT\Output
http://server_name:8000/Output

4. Check service item, and create new service. Herein, in Service pan, the name, map file and virtual server are required. For example, set them as
ServiceTest
mapfile.mxd
ImageArcMapServer1
Note: as selecting map file, if mxd format file is selected, the server type of virtual server “ImageArcMapServer1” must be ImageServer-ArcMap; if axl format file is selected, that of virtual server would be ImageServer. The mxd file is created by ArcMap tool, the axl file is created by ArcIMS Author tool.

5. Then, go to check service output in the same panel, the image type should be jpeg format, the output directory and URL should be the same as setup above, i.e.
C:\Tomcat5.5\webapps\ROOT\Output
http://server_name:8000/Output

6. Click OK! If the service works, the service status would be running.

7. It is also available to create a virtual server by selecting server item and indicating server type. The new virtual server can be assigned to service.

8. Check Tools->Start Designer, input a web site directory, say ShapeTest, the folder “ShapeTest” will be created under C:\Tomcat5.5\webapps\ROOT\Website\ and include all material related to display image map.

9. Select a service for display map; then, follow up the indication for choosiPublishng viewer such as html or Java viewer and click OK. HTML viewer will be recommended for easy setup.

10. When it is done, click “create site” button to complete.

Open the browser, type the website to view. For example in this case,
http://server_name:8000/Website/ShapeTest

Running ArcIMS9.1 with Tomcat5.5 in Windows - Part A: Setup Servlet

1. After finishing installation and post-installation of ArcIMS9.1, find the servlet file “arcimsservletconnector.war” in \Connectors\Servlet\, then rename it as servlet.war.

2. Copy the servlet file to \webapps, and startup Tomcat5.5. The servlet website will be automatically created.

3. Under \webapps\servlet\WEB-INF\classes, find the file Esrimap_prop, revise the parameter below
### appServerMachine=129.103.35.97,123.151.62.57
appServerMachine=server_name
Where, server_name means the name of server or computer installing Tomcat

4. Go to service console, make sure following ArcIMS services are active:
ArcIMS Application Server 9.1
ArcIMS Monitor 9.1
ArcIMS Tasker 9.1

5. Execute ArcIMS Diagnostics to check if both Servlet and Application Server are running well. In the example herein, Tomcat5.5 is running as following IP and port:
http://server_name:8000

2007年2月22日 星期四

Deploy Virtual Directory in Tomcat 5.5

Tomcat5.5中部署虛擬路徑站台

1. /conf/Catalina/localhost下要存在一個以站台名稱為檔名的xml組構檔,Tomcat伺服器會根據此檔找到站台名稱及磁碟中對應的站台路徑,假如只有站台名稱,表示其對應之路徑會是在/webapps底下

2. 假設已經有一開發好的站台WebAssessment,所有相關的網頁均放置在C:\Inetput\wwwroot\WebAssessment之下,則可以手動建立WebAssessment.xml檔,假設存放在C:\Inetput\wwwroot下,則設定其內容如下(...在此為跳脫字,實作時略去):
<...?xml version="1.0" encoding="UTF-8"?...>
<...Context path="/ArcIMS_OutputSite" docBase="D:\arcgis\ArcIMS\Output" debug="0" privileged="true" /...>

3. WebAssessment.xml複製到/conf/Catalina/localhost下,啟動Tomcat即可在瀏覽器中以http://localhost:8000/WebAssessment打開此站台。其中localhost:8000Tomcat網站伺服器所在IP

4. 如利用netbeans開發網站上述網站之頁面,所開發完成的所有頁面資料會被存放在/build/web底下,其中Project_Home為所開發之網站專案路徑;假設要以上述之C:\Inetput\wwwroot\WebAssessment為站台之虛擬路徑,則應將/build/web下所有網站資料全部複製到此虛擬路徑下。

5. 其中,站台之組構檔為context.xml,被存放在META-INF資料夾中,可直接更改此檔案之內容加入如上之docBase, debug, privileged參數,即可依上述第2點建立虛擬站台之xml組構檔,並重複第3點。

6. 亦可利用Tomcat Manager在遠端部署虛擬站台,執行Tomcat Manager(或在Tomcat伺服器首頁點選Tomcat Manager連結),輸入管理者帳號密碼後,會被導至站台管理頁面下,並顯示出所有的站台清單。在最下面的Deploy工作區之Deploy directory or WAR file located on server中,輸入站台資訊,例如以上述步驟,
Context Path (optional):
輸入站台名稱,如/WebAssessment
XML Configuration file URL:
輸入組構檔路徑,如C:\Inetput\wwwroot\WebAssessment\WebAssessment.xml或者netbeans專案開發完成的contex.xml亦可
WAR or Directory URL:
輸入虛擬站台路徑,如C:\Inetput\wwwroot\WebAssessment

7. 如整個站台以被包裝在一個war檔中,可直接利用此工作區的上傳功能傳入伺服器路徑之下。

My Blogger's Test!
心有多寬, 世界就有多大!!