From d8ff1e37c38c37304fb44ba6618da141e4d08c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Mon, 12 Oct 2015 12:21:15 +0200 Subject: Remove the deprecated webtool application --- lib/webtool/doc/html/.gitignore | 0 lib/webtool/doc/man1/.gitignore | 0 lib/webtool/doc/man3/.gitignore | 0 lib/webtool/doc/pdf/.gitignore | 0 lib/webtool/doc/src/Makefile | 132 --------------- lib/webtool/doc/src/book.xml | 48 ------ lib/webtool/doc/src/fascicules.xml | 18 -- lib/webtool/doc/src/notes.xml | 253 ----------------------------- lib/webtool/doc/src/notes_history.xml | 74 --------- lib/webtool/doc/src/part.xml | 38 ----- lib/webtool/doc/src/part_notes.xml | 40 ----- lib/webtool/doc/src/part_notes_history.xml | 40 ----- lib/webtool/doc/src/ref_man.xml | 39 ----- lib/webtool/doc/src/start_webtool.xml | 104 ------------ lib/webtool/doc/src/webtool.xml | 157 ------------------ lib/webtool/doc/src/webtool_chapter.xml | 246 ---------------------------- 16 files changed, 1189 deletions(-) delete mode 100644 lib/webtool/doc/html/.gitignore delete mode 100644 lib/webtool/doc/man1/.gitignore delete mode 100644 lib/webtool/doc/man3/.gitignore delete mode 100644 lib/webtool/doc/pdf/.gitignore delete mode 100644 lib/webtool/doc/src/Makefile delete mode 100644 lib/webtool/doc/src/book.xml delete mode 100644 lib/webtool/doc/src/fascicules.xml delete mode 100644 lib/webtool/doc/src/notes.xml delete mode 100644 lib/webtool/doc/src/notes_history.xml delete mode 100644 lib/webtool/doc/src/part.xml delete mode 100644 lib/webtool/doc/src/part_notes.xml delete mode 100644 lib/webtool/doc/src/part_notes_history.xml delete mode 100644 lib/webtool/doc/src/ref_man.xml delete mode 100644 lib/webtool/doc/src/start_webtool.xml delete mode 100644 lib/webtool/doc/src/webtool.xml delete mode 100644 lib/webtool/doc/src/webtool_chapter.xml (limited to 'lib/webtool/doc') diff --git a/lib/webtool/doc/html/.gitignore b/lib/webtool/doc/html/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lib/webtool/doc/man1/.gitignore b/lib/webtool/doc/man1/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lib/webtool/doc/man3/.gitignore b/lib/webtool/doc/man3/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lib/webtool/doc/pdf/.gitignore b/lib/webtool/doc/pdf/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lib/webtool/doc/src/Makefile b/lib/webtool/doc/src/Makefile deleted file mode 100644 index 57de52a616..0000000000 --- a/lib/webtool/doc/src/Makefile +++ /dev/null @@ -1,132 +0,0 @@ -# ``Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# The Initial Developer of the Original Code is Ericsson Utvecklings AB. -# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings -# AB. All Rights Reserved.'' -# -# $Id$ -# -include $(ERL_TOP)/make/target.mk -include $(ERL_TOP)/make/$(TARGET)/otp.mk - -# ---------------------------------------------------- -# Application version -# ---------------------------------------------------- -include ../../vsn.mk -VSN=$(WEBTOOL_VSN) -APPLICATION=webtool - -DOC_EXTRA_FRONT_PAGE_INFO=Important note: \ -The Webtool application is obsolete and will be removed \ -in the next major OTP release - -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - -# ---------------------------------------------------- -# Target Specs -# ---------------------------------------------------- -XML_APPLICATION_FILES = ref_man.xml - -XML_REF1_FILES = start_webtool.xml - -XML_REF3_FILES = webtool.xml - -XML_PART_FILES = \ - part.xml \ - part_notes.xml \ - part_notes_history.xml - -XML_CHAPTER_FILES = \ - webtool_chapter.xml \ - notes.xml \ - notes_history.xml - -BOOK_FILES = book.xml - -XML_FILES = \ - $(BOOK_FILES) $(XML_CHAPTER_FILES) \ - $(XML_PART_FILES) $(XML_REF3_FILES) \ - $(XML_REF1_FILES) $(XML_APPLICATION_FILES) - -GIF_FILES = - -# ---------------------------------------------------- - -HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \ - $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html) - -INFO_FILE = ../../info - -MAN1_FILES = $(XML_REF1_FILES:%.xml=$(MAN1DIR)/%.1) -MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3) - -HTML_REF_MAN_FILE = $(HTMLDIR)/index.html - -TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf - -# ---------------------------------------------------- -# FLAGS -# ---------------------------------------------------- -XML_FLAGS += -DVIPS_FLAGS += - -# ---------------------------------------------------- -# Targets -# ---------------------------------------------------- -$(HTMLDIR)/%.gif: %.gif - $(INSTALL_DATA) $< $@ - -docs: pdf html man - -$(TOP_PDF_FILE): $(XML_FILES) - -pdf: $(TOP_PDF_FILE) - -html: gifs $(HTML_REF_MAN_FILE) - - -clean clean_docs: - rm -rf $(HTMLDIR)/* - rm -f $(MAN1DIR)/* - rm -f $(MAN3DIR)/* - rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo) - rm -f errs core *~ - -man: $(MAN1_FILES) $(MAN3_FILES) - -gifs: $(GIF_FILES:%=$(HTMLDIR)/%) - -debug opt: - -# ---------------------------------------------------- -# Release Target -# ---------------------------------------------------- -include $(ERL_TOP)/make/otp_release_targets.mk - -release_docs_spec: docs - $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf" - $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf" - $(INSTALL_DIR) "$(RELSYSDIR)/doc/html" - $(INSTALL_DATA) $(HTMLDIR)/* \ - "$(RELSYSDIR)/doc/html" - $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)" - $(INSTALL_DIR) "$(RELEASE_PATH)/man/man1" - $(INSTALL_DATA) $(MAN1_FILES) "$(RELEASE_PATH)/man/man1" - $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3" - $(INSTALL_DATA) $(MAN3_FILES) "$(RELEASE_PATH)/man/man3" - -release_spec: - diff --git a/lib/webtool/doc/src/book.xml b/lib/webtool/doc/src/book.xml deleted file mode 100644 index feccee7c62..0000000000 --- a/lib/webtool/doc/src/book.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - -
- - 20012013 - Ericsson AB. All Rights Reserved. - - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - - WebTool - - - - 1.0 -
- - - WebTool - - - - - - - - - - - - - -
- diff --git a/lib/webtool/doc/src/fascicules.xml b/lib/webtool/doc/src/fascicules.xml deleted file mode 100644 index 37feca543f..0000000000 --- a/lib/webtool/doc/src/fascicules.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - User's Guide - - - Reference Manual - - - Release Notes - - - Off-Print - - - diff --git a/lib/webtool/doc/src/notes.xml b/lib/webtool/doc/src/notes.xml deleted file mode 100644 index 21309261a8..0000000000 --- a/lib/webtool/doc/src/notes.xml +++ /dev/null @@ -1,253 +0,0 @@ - - - - -
- - 20042013 - Ericsson AB. All Rights Reserved. - - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - - Webtool Release Notes - otp_appnotes - nil - nil - nil - notes.xml -
-

This document describes the changes made to the Webtool - application.

- -
WebTool 0.9 - -
Improvements and New Features - - -

- The Webtool application has been marked as obsolete and - will be removed from OTP in the next major release (OTP - 19.0).

-

- Own Id: OTP-10922 Aux Id: OTP-12705

-
-
-
- -
- -
WebTool 0.8.10 - -
Fixed Bugs and Malfunctions - - -

- Application upgrade (appup) files are corrected for the - following applications:

-

- asn1, common_test, compiler, crypto, debugger, - dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe, - inets, observer, odbc, os_mon, otp_mibs, parsetools, - percept, public_key, reltool, runtime_tools, ssh, - syntax_tools, test_server, tools, typer, webtool, wx, - xmerl

-

- A new test utility for testing appup files is added to - test_server. This is now used by most applications in - OTP.

-

- (Thanks to Tobias Schlager)

-

- Own Id: OTP-11744

-
-
-
- -
- -
WebTool 0.8.9.2 - -
Improvements and New Features - - -

- Misc build updates

-

- Own Id: OTP-10784

-
-
-
- -
- -
WebTool 0.8.9.1 - -
Improvements and New Features - - -

- Miscellaneous documentation build updates

-

- Own Id: OTP-9813

-
-
-
- -
- -
WebTool 0.8.9 - -
Fixed Bugs and Malfunctions - - -

- Do not install *.bat files on non-win32 machines (Thanks - to Hans Ulrich Niedermann)

-

- Own Id: OTP-9515

-
-
-
- -
- -
WebTool 0.8.8 - -
Fixed Bugs and Malfunctions - - -

- Various small documentation fixes (Thanks to Bernard - Duggan)

-

- Own Id: OTP-9172

-
-
-
- -
- -
WebTool 0.8.7 - -
Improvements and New Features - - -

- Up until now Netscape has been the default web browser on - Unix/Linux. Webtool has now been updated to start Firefox - as default browser instead.

-

- Own Id: OTP-8651 Aux Id: OTP-8650

-
-
-
- -
- -
WebTool 0.8.6 - -
Improvements and New Features - - -

- Misc updates

-

- Own Id: OTP-8456

-
-
-
- -
- -
WebTool 0.8.5 - -
Improvements and New Features - - -

- The documentation is now built with open source tools - (xsltproc and fop) that exists on most platforms. One - visible change is that the frames are removed.

-

- Own Id: OTP-8201

-
-
-
- -
- -
WebTool 0.8.4 - -
Improvements and New Features - - -

The copyright notices have been updated.

-

- Own Id: OTP-7851

-
-
-
- -
-
WebTool 0.8.3.2 - -
Improvements and New Features - - -

- Minor updates.

-

- Own Id: OTP-6998

-
-
-
- -
- -
- WebTool 0.8.3.1 - -
- Improvements and New Features - - -

Minor Makefile changes.

-

Own Id: OTP-6689

-
- -

Obsolete guard tests (such as list()) have been replaced - with the modern guard tests (such as is_list()).

-

Own Id: OTP-6725

-
-
-
-
- -
- WebTool 0.8.3 - -
- Improvements and New Features - - -

Removed some dead code discovered by Dialyzer.

-

Own Id: OTP-6041

-
-
-
-
-
- diff --git a/lib/webtool/doc/src/notes_history.xml b/lib/webtool/doc/src/notes_history.xml deleted file mode 100644 index 792475d948..0000000000 --- a/lib/webtool/doc/src/notes_history.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - -
- - 2006 - 2013 - Ericsson AB, All Rights Reserved - - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - The Initial Developer of the Original Code is Ericsson AB. - - - Webtool Release Notes History - otp_appnotes - nil - nil - nil -
- -
- Webtool 0.8.2 - -
- Fixed Bugs and Malfunctions - - -

Bugfix: webtool crashed when trying to find a free - port number if connection failed with other reason than - econnrefused.

-

Own Id: OTP-5166

-
-
-
- -
- Improvements and New Features - - -

Misc improvements:

- - The function debug_app/1 and some error - printouts are added to simplify debugging of own - application. - Multiple webtool instances can now be started on - the same host. If the default port (8888) is in use, port - 8889 is tried. If 8889 is also used, 8890 is tried and so - on. Max number of ports tried is 256. - Incompatible: If Data is set to - PortNumber in start(Path,Data), the default - data will be used for ip-number (127.0.0.1) and - server name (localhost). - -

*** POTENTIAL INCOMPATIBILITY ***

-

Own Id: OTP-4724

-
-
-
-
-
- diff --git a/lib/webtool/doc/src/part.xml b/lib/webtool/doc/src/part.xml deleted file mode 100644 index b0c4ee310d..0000000000 --- a/lib/webtool/doc/src/part.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - -
- - 20012013 - Ericsson AB. All Rights Reserved. - - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - - WebTool User's Guide - - - - -
- -

WebTool provides a easy way to use web based tools with - Erlang/OTP. It configures and starts a webserver as well as all - available tools.

-
- -
- diff --git a/lib/webtool/doc/src/part_notes.xml b/lib/webtool/doc/src/part_notes.xml deleted file mode 100644 index db2b790f3f..0000000000 --- a/lib/webtool/doc/src/part_notes.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - -
- - 20042013 - Ericsson AB. All Rights Reserved. - - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - - WebTool Release Notes - - - - -
- -

WebTool provides an easy way to use web based tools with - Erlang/OTP. It configures and starts a webserver as well as all - available tools.

-

For information about older versions, see - Release Notes History.

-
- -
- diff --git a/lib/webtool/doc/src/part_notes_history.xml b/lib/webtool/doc/src/part_notes_history.xml deleted file mode 100644 index 50ce62e58d..0000000000 --- a/lib/webtool/doc/src/part_notes_history.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - -
- - 2006 - 2013 - Ericsson AB, All Rights Reserved - - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - The Initial Developer of the Original Code is Ericsson AB. - - - WebTool Release Notes History - - - - -
- -

WebTool provides a easy way to use web based tools with - Erlang/OTP. It configures and starts a webserver as well as all - available tools.

-
- -
- diff --git a/lib/webtool/doc/src/ref_man.xml b/lib/webtool/doc/src/ref_man.xml deleted file mode 100644 index aa81392b11..0000000000 --- a/lib/webtool/doc/src/ref_man.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - -
- - 20012013 - Ericsson AB. All Rights Reserved. - - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - - WebTool Reference Manual - - - - -
- -

WebTool provides an easy way to use web based tools with - Erlang/OTP. It configures and starts a webserver as well as all - available tools.

-
- - -
- diff --git a/lib/webtool/doc/src/start_webtool.xml b/lib/webtool/doc/src/start_webtool.xml deleted file mode 100644 index e9c94c4271..0000000000 --- a/lib/webtool/doc/src/start_webtool.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - -
- - 20032013 - Ericsson AB. All Rights Reserved. - - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - - start_webtool - - - 1 - - - 2003-06-18 - - start_webtool.sgml -
- start_webtool - WebTool Start Script - -

The start_webtool script starts WebTool, a WebTool - application and a web browser pointing to this application.

-
- - - start_webtool application [ browser ] - Start a WebTool Application - -

Starts WebTool, the given WebTool Application and a web - browser pointing to this application. -

-

If no argument is given, a list of available applications - is displayed, e.g.

-
->start_webtool
-Starting webtool...
-WebTool is available at http://localhost:8888/
-Or  http://127.0.0.1:8888/
-
-Usage: start_webtool application [ browser ]
-
-Available applications are: [orber,appmon,crashdump_viewer,webcover]
-Default browser is 'iexplore' (Internet Explorer) on Windows or else 'firefox'        
-

To start any of the listed applications, give the - application name as the first argument, e.g.

-
->start_webtool webcover
-Starting webtool...
-WebTool is available at http://localhost:8888/
-Or  http://127.0.0.1:8888/
-Starting webcover...
-Sending URL to netscape...done        
-

The WebTool application WebCover is then started and the - default browser is used. The default browser is Internet - Explorer on Windows or else Firefox. -

-

To use another browser, give the browser's start command - as the second argument, e.g.

-
->start_webtool webcover mozilla
-Starting webtool...
-WebTool is available at http://localhost:8888/
-Or  http://127.0.0.1:8888/
-Starting webcover...
-Sending URL to mozilla...done        
-

If the given browser name is not known to WebTool, WebTool - will run it as a command with the start URL as the only - argument, e.g.

-
->start_webtool webcover mybrowser
-Starting webtool...
-WebTool is available at http://localhost:8888/
-Or  http://127.0.0.1:8888/
-Starting webcover...
-Starting mybrowser...        
-

Here the command "mybrowser http://localhost:8888/webcover" is executed. -

-
-
-
- -
- See Also -

webtool(3)

-
-
- diff --git a/lib/webtool/doc/src/webtool.xml b/lib/webtool/doc/src/webtool.xml deleted file mode 100644 index 2647518dae..0000000000 --- a/lib/webtool/doc/src/webtool.xml +++ /dev/null @@ -1,157 +0,0 @@ - - - - -
- - 2001 - 2013 - Ericsson AB, All Rights Reserved - - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - The Initial Developer of the Original Code is Ericsson AB. - - - webtool - - - - -
- webtool - WebTool is a tool used to simplify the implementation of web based tools with Erlang/OTP. - -

WebTool makes it easy to use web based tools with Erlang/OTP. WebTool - configures and starts the webserver httpd.

-
- - - start()-> {ok,Pid}| {stop,Reason} - Start WebTool. - -

Start WebTool with default data, i.e. port 8888, ip-number - 127.0.0.1, and server-name localhost. If port 8888 is - in use, port 8889 is tried instead. If 8889 is also in use, - 8890 is tried and so on. Max number of ports tried is 256. -

-

The mime.types file and WebTool's own HTML files - are assumed to be in the directory - /priv/root/conf]]>.

-
-
- - start(Path,Data)->{ok,Pid}|{stop,Reason} - Start WebTool with default configuration. - - Path = string() | standard_path - Data = [Port,Address,Name] | PortNumber | standard_data - Port = {port,PortNumber} - Address = {bind_address,IpNumber} - Name = {server_name,ServerName} - PortNumber = integer() - IpNumber = tuple(), e.g. {127,0,0,1} - ServerName = string() - Pid = pid() - - -

Use this function to start WebTool if the default port, - ip-number,servername or path can not be used.

-

Path is the directory where the mime.types - file and WebTool's own HTML files are located. By default - this is /priv]]>, and in most cases there - is no need to change this. If Path is set to - standard_path the default will be used.

-

If Data is set to PortNumber, the default data - will be used for ip-number (127.0.0.1) and server - name (localhost).

-
-
- - stop()->void - Stop WebTool. - -

Stop WebTool and the tools started by WebTool.

-
-
- - debug_app(Module)->void - Debug a WebTool application. - - Module = atom() - - -

Debug a WebTool application by tracing all functions in the - given module which are called from WebTool.

-
-
- - stop_debug()->void - Stop debugging an application and format the trace log. - -

Stop the tracing started by debug_app/1, and format - the trace log.

-
-
-
- -
- CALLBACK FUNCTIONS -

The following callback function must be implemented by each web - based tool that will be used via WebTool. When started, WebTool - searches the Erlang code path for *.tool files to locate all web - based tools and their callback functions. See the WebTool User's Guide for more - information about the *.tool files.

-
- - - Module:Func(Data)-> {Name,WebData}|error - Returns configuration data needed by WebTool to configure and start a tool. - - Data = term() - Name = atom() - WebData = [WebOptions] - WebOptions = LinkData | Alias | Start - LinkData = {web_data,{ToolName,Url}} - Alias = {alias,{VirtualPath,RealPath}} | {alias,{erl_alias,Path,[Modules]} - Start = {start,StartData} - ToolName = Url = VirtualPath = RealPath = Path = string() - Modules = atom() - StartData = AppData | ChildSpec | Func - AppData = {app,AppName} - ChildSpec = {child,child_spec()} - See the Reference Manual for the module supervisor in the STDLIB application for details about child_spec(). - Func = {func,{StartMod,StartFunc,StartArg}, {StopMod,StopFunc,StopArg}} - AppName = StartMod = StartFunc = StopMod = StopFunc =atom() - StartArg = StopArg = [term()] - - -

This is the configuration function (config_func) - which must be stated in the *.tool file.

-

The function is called by WebTool at startup to retrieve the - data needed to start and configure the tool. LinkData is - used by WebTool to create the link to the tool. Alias is - used to create the aliases needed by the webserver. Start - is used to start and stop the tool.

-
-
-
- -
- See Also -

start_webtool(1), - WebTool User's Guide

-
-
- diff --git a/lib/webtool/doc/src/webtool_chapter.xml b/lib/webtool/doc/src/webtool_chapter.xml deleted file mode 100644 index 160a42f855..0000000000 --- a/lib/webtool/doc/src/webtool_chapter.xml +++ /dev/null @@ -1,246 +0,0 @@ - - - - -
- - 20012013 - Ericsson AB. All Rights Reserved. - - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - - WebTool User Guide - - - - - webtool_chapter.xml -
- -
- Introduction -

WebTool provides an easy and efficient way to implement web - based tools with Erlang/OTP. WebTool configures and starts the - webserver and the various web based tools.

-

All tools that shall run under WebTool must have a *.tool - file in the code path or in its priv directory. When WebTool - starts it searches the code path for such files. For each - ebin directory in the path, the priv directory is - also searched. The *.tool files contain the configuration data - for each web based tool.

-
- -
- Starting WebTool -

Start WebTool by calling the function webtool:start/0 or - webtool:start/2. If webtool:start/0 is used the - start page of WebTool is available at - http://localhost:8888/ or - http://127.0.0.1:8888/, and the directory containing - the root directory for the webserver, is assumed to be - /priv]]>.

-

Use webtool:start/2 if the default path for the root - directory, port, ip-number or server name can not be used. See - the Reference Manual for webtool for more information.

-

WebTool, with the default configuration as in start/0, - can also be started with the start_webtool script which - is available in the priv directory of the WebTool - application. See the Reference Manual for start_webtool for further - information about this script. For Windows users, the batch file - start_webtool.bat can be used for the same purpose.

-
- -
- Using WebTool -

Start WebTool and point the browser to the corresponding URL. - At the top of the page there is a frame with a link named - WebTool. Click that link and a page where it is - possible to start the available tools will appear in the main - frame.

-
- -
- Start a web based tool -

Click on the link labeled WebTool in the topmost frame, - select the checkbox for each tool to start and - click on the button labeled Start. A link to each tool - that WebTool succeeded to start will appear in the topmost frame.

-
- -
- Stop a web based tool -

Click on the link labeled WebTool in the topmost - frame. Select Stop Tools in the left frame. Select the - checkbox for each tool to stop and click on the button labeled - Stop.

-
- -
- Develop new web based tools -

WebTool can be used as a framework when developing new web based - tools.

-

A web based tool running under WebTool will typically consist of - three parts.

- - A *.tool file which defines how WebTool can find the tool's - configuration data - The Erlang code generating the web interface to the tool (HTML - code) - The tool itself. - -

In most cases it is a good idea to separate the code for - creation of the html-pages and the code for the logic. This - increases the readability of the code and the logic might be - possible to reuse.

- -
- The *.tool file -

When WebTool starts it searches the current path for - *.tool files to find all available tools. The *.tool - file contains a version identifier and a list of tuples which - is the configuration data. The version identifier specifies - the *.tool file version, i.e. not the version of - webtool. Currently the only valid version is "1.2" and the - only valid configuration tag is - config_func. config_func specifies which - function WebTool must call to get further configuration data - for the tool. This means that a *.tool file generally must - look like this:

- - {version,"1.2"}. - [{config_func,{Module,Function,Arguments}}]. -

Module is the name of the module where the callback - function is defined. Function is the name of the - callback function, and Arguments is the list of - arguments to the callback function.

-
- -
- The configuration function -

The *.tool file points out a configuration function. This - function must return a list of configuration parameters (see - the Reference Manual for webtool).

-

The web_data parameter is mandatory and it specifies - the name of the tool and the link to the tool's start - page. All other parameters are optional.

-

If the tool requires any processes to run, the start - parameter specifies the function that WebTool must call in - order to start the process(es).

-

The alias parameters are passed directly on to the - webserver (INETS). The webserver has three ways to create - dynamic web pages CGI, Eval Scheme and Erl Scheme. All tools - running under WebTool must use Erl Scheme.

-

Erl Scheme tries to resemble plain CGI. The big difference is - that Erl Scheme can only execute Erlang code. The code will - furthermore be executed on the same instance as the webserver.

-

An URL which calls an Erlang function with Erl Scheme can have - the following syntax:

- ]]> -

An alias parameter in the configuration function can be - an ErlScriptAlias as used in the above URL. The definition of - an ErlScriptAlias shall be like this:

-

{alias,{erl_alias,Path,[Modules]}}, e.g.

-

{alias,{erl_alias,"/testtool",[helloworld]}}

-

The following URL will then cause a call to the function - helloworld:helloworld/2 (if WebTool is started with default - settings i.e. servername "localhost" and port 8888):

-

http://localhost:8888/testtool/helloworld/helloworld

-

Note that the module helloworld must be in the code - path of the node running WebTool.

-

Functions that are called via the Erl Scheme must take two - arguments, Environment and Input. -

- - Environment is a list of key/value tuples. - Input is the part of the URL after the "?", i.e. the - part of the URL containing name-value pairs. If the page was - called with the URL: -

-

-Input will be the string - . In the module - httpd in the INETS application there is a function - parse_query which will parse such a string and return - a list of key-value tuples.
-
-

An alias parameter in the configuration function can - also be a normal path alias. This can e.g. be used to point - out a directory where HTML files are stored. The following - definition states that the URL - http://localhost:8888/mytool_home/ really points to the - directory /usr/local/otp/lib/myapp-1.0/priv:

-

{alias,{"/mytool_home","/usr/local/otp/lib/myapp-1.0/priv"}}

-

See the INETS documentation, especially the module - mod_esi, for a more in depth coverage of the Erl Scheme.

-
- -
- A small example -

A Hello World example that uses Erl Scheme would look like - this. Note that this example does not have a process running - and thus does not need a start parameter in the - configuration function. -

-

helloworld.erl:

-
-        -module(helloworld).
-        -export([config_data/0]).
-        -export([helloworld/2]).
-        
-        config_data()->
-            {testtool,
-             [{web_data,{"TestTool","/testtool/helloworld/helloworld"}},
-              {alias,{erl_alias,"/testtool",[helloworld]}}]}.
-        
-        helloworld(_Env,_Input)->
-            [header(),html_header(),helloworld_body(),html_end()].
-
-        header() ->
-            header("text/html").
-
-        header(MimeType) ->
-            "Content-type: " ++ MimeType ++ "\r\n\r\n".
-
-        html_header() ->    
-            "<HTML>
-               <HEAD>
-                  <TITLE>Hello world Example </TITLE>
-               </HEAD>\n".
-
-        helloworld_body()->
-            "<BODY>Hello World</BODY>".
-
-        html_end()->
-            "</HTML>".
-      
-

To use this example with WebTool a *.tool file must be created - and added to a directory in the current path, e.g. the same - directory as the compiled helloworld.beam.

-

testtool.tool:

- - {version,"1.2"}. - [{config_func, {helloworld,config_data,[]}}]. - -

When helloworld.erl is compiled, start WebTool by - calling the function webtool:start() and point your - browser to http://localhost:8888/. Select WebTool in - the topmost frame and start TestTool from the web page. Click - on the link labeled TestTool in the topmost frame.

-
-
-
- -- cgit v1.2.3