Polycom 1725-17693-210 Rev. A manual Http//WEBSERVERADDRESSPORT/PLCM/Sample.xhtml

Page 24

Developer’s Guide SoundPoint IP / SoundStation IP

2.Configure the Web server to serve the above XHTML file.

For example, if you are using Apache Tomcat to try this example, then put this file into the webapps\PLCM folder of Tomcat.

3.Configure SoundPoint IP and SoundStation IP phones to point to the XHTML file in the sip.cfg configuration file.

For this example, change mb.main.home to

http://<WEBSERVER_ADDRESS:PORT>/PLCM/Sample.xhtml .

4.Reboot the phones.

5.On a SoundPoint IP phone, press the Services (or Applications) key. The text “Hello World!” appears on the graphic display.

To develop a dynamic XHTML application:

1.Create a AddStock.xhtml page.

This XHTML page is designed for getting a stock symbol as input from the SoundPoint IP or SoundStation IP phone, then retrieve the information for this stock symbol.

<html xmlns="http://www.w3.org/1999/xhtml"> <!- - HEADER START - ->

<head>

<title>Stocks</title>

</head>

<!- - HEADER END - ->

<!- - BODY START - -> <body>

<!- - ADD STOCK FORM START - ->

<form method="POST" action="GetQuote.jsp"> <p>Symbol<input type="text" name="stockname"/> <input type="submit" value="Get Quote"/></p> </form>

<!- - ADD STOCK FORM END - -> </body>

<!- - BODY END - -> </html>

2.Configure the Web server to serve the above XHTML file.

For example, if you are using Apache Tomcat to try this example, put this file into the webapps\PLCM folder of Tomcat.

3.Write an application that is going to retrieve the stock information from a data service provider.

For this example, this application will be retrieving stock information from Yahoo and will send it to the Microbrowser. This application is written using a Java Server Page (JSP).

2 - 14

Image 24
Contents SIP Trademark Information About This Guide Developer’s Guide SoundPoint IP / SoundStation IP Contents Developer’s Guide SoundPoint IP / SoundStation IP What is the Microbrowser OverviewWhat is Xhtml How to Create Applications Microbrowser Application Development Supported Xhtml ElementsBasic Tags Another document by using the href attribute Link TagsInput Tags Following link tag is supported Defines an anchorSpecified URL Following attributes are supported Method=get This methodMethod=post This method Input Image Tags Following image tag is supported Img-Defines an imageRequirement is 38400 bytes Img element defines an imageTable Tags Attribute Value/s Description Http Support Meta Information TagsMicrobrowser User Interface Launching the Microbrowser Navigation and Form EditingChanging Configuration Parameters Developing an Xhtml ApplicationIdle Display Microbrowser Sample Application Change mb.main.home to the URL used for Microbrowser homeHttp//WEBSERVERADDRESSPORT/PLCM/Sample.xhtml Getting the Path Where BMP File has to be Saved Xhtml file in the sip.cfg configuration file Reboot the phonesEnter a stock symbol, then select the Get Quote soft key AddStock.xhtml appears on the graphic displayTroubleshooting XML ErrorsSymptom Problem Corrective Action Developer’s Guide SoundPoint IP / SoundStation IP Appendix Unsupported Xhtml ElementsUnsupported elements and attributes are Tag Type Tag Description Basic TagsTag Type Tag Description Output Tags Block TagsLink Tags Frame TagsTag Type Tag Description Input Tags List TagsImage Tags Tag Type Tag Description Table Tags Style TagsMeta Information Tags Tag Type Tag Description Programming Tags Developer’s Guide SoundPoint IP / SoundStation IP Index Developer’s Guide SoundPoint IP / SoundStation IP