doctest/ WEB-INF/ classes lib |
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>isCOBOL EIS</display-name> <welcome-file-list> <welcome-file>Hello.htm</welcome-file> </welcome-file-list> <filter> <filter-name>isCOBOL filter</filter-name> <filter-class>com.iscobol.web.IscobolFilter</filter-class> </filter> <filter-mapping> <filter-name>isCOBOL filter</filter-name> <url-pattern>/servlet/*</url-pattern> </filter-mapping> <servlet> <servlet-name>isCobol</servlet-name> <servlet-class>com.iscobol.web.IscobolServletCall</servlet-class> </servlet> <servlet-mapping> <servlet-name>isCobol</servlet-name> <url-pattern>/servlet/*</url-pattern> </servlet-mapping> <listener> <listener-class>com.iscobol.web.IscobolSessionListener</listener-class> </listener> </web-app> |
<HTML><HEAD><TITLE>isCOBOL Example</TITLE></HEAD> <BODY> <H2>isCOBOL Example.</H2> <H3>This example shows how easily you can compose an HTML page with an isCOBOL program running on the web server. The HTML page is composed of two parts; a header and a footer. The isCOBOL program will insert a message to the header and footer, as well as inserting the text "Hello world from isCOBOL" between the header and footer.</H3> <HR size="2"> <FORM method="post" action="servlet/isCobol(HELLO)"> <p><input type="submit" value="Invoke isCOBOL HELLO program" /></p> </FORM> |
<HTML> <HEAD><TITLE>CGI Header</TITLE></HEAD> <BODY> <CENTER> <H1>This is the header HTML page of the isCOBOL Example</H1> <H2>This is the message sent by the isCOBOL program: %%opening-message%%</H2> <HR> |
</CENTER> <BR> <HR> This is the footer HTML page of the isCOBOL Example. <H2>This is the message sent by the isCOBOL program: %%closing-message%%</H2> </BODY></HTML> |
PROGRAM-ID. HELLO initial. CONFIGURATION SECTION. REPOSITORY. class web-area as "com.iscobol.rts.HTTPHandler" . WORKING-STORAGE SECTION. 01 hello-buffer pic x(40) value "Hello World from isCOBOL!". 01 rc pic 9. 01 html-header-form identified by "Header". 05 identified by "opening-message". 10 opening-message pic x(40). 01 html-footer-form identified by "Footer". 05 identified by "closing-message". 10 closing-message pic x(40). LINKAGE SECTION. 01 comm-area object reference web-area. PROCEDURE DIVISION using comm-area. MAIN-LOGIC. move "This is the header" to opening-message set rc = comm-area:>processHtmlFile (html-header-form). comm-area:>displayText (hello-buffer). move "Bye Bye by isCOBOL" to closing-message set rc = comm-area:>processHtmlFile (html-footer-form). goback. |
iscobol.http.html_template_prefix=webapps/doctest |
jar -cfv doctest.war * |