|
 |
ISeries Website
Setting up the AS400 to serve webpages is actually pretty simple. All you
need do is make changes to your configuration file, place a webpage into the IFS folder
/Web, then STRTCPSVR *HTTP. POW now you have a website.
The fun part is creating RPGLE programs that will generate webpages back to browser
by using the POST command. I have a great example I will put up on this
page. You can also run jobs at end of day to create XML files, These files
can then be linked to a static HTML page, making it dynamic.
You can also create some pretty modern looking emails(with sales figures...etc)
that can be sent inter-company.
Now this is all without WEBSPHERE. Please check below for information on WEBSPHERE.
- User profiles for webserver transactions
- QTMHHTP1 - HTTP Server CGI User Profile
- QTMHHTTP - HTTP Server User Profile
- Use the command WRKHTTPCFG to access configuration file.
- # = REM or Commented out
- Highlighted lines are all that is required to get website up and running.
- Exec /cgi-bin/* /QSYS.LIB/CGI_BIN.LIB/*.PGM %%EBCDIC%%
- Above line sets AS400 library CGI_BIN as the cgi-bin of the website.
- Copy of my config file.
# * * * * * * * * * * * * * * * * * * * * * * * * * * *
# HTTP DEFAULT CONFIGURATION
# * * * * * * * * * * * * * * * * * * * * * * * * * * *
#
#
# HostName your.full.host.name
#
# The default port for HTTP is 80; Should specify por
# if port 80 is not used.
# Port 80
#
Enable GET
Enable HEAD
Enable POST
# Disable {all others}
#
# Map /test/* /as400/*
# Pass /as400SYS/* /QSYS.LIB/HTTPDEV.LIB/HTML.FILE/*
# Pass /as400/* /QDLS/400HOME/*
# Pass /QSYS.LIB/AS400LIB.LIB/HTML.FILE/*
# Pass /QDLS/graphics/*
# Fail /QDLS/TESTING/*
# Redirect /some_url/* http://some_server/some_url/*
#
# Search
# Post-Script
# Put-Script
# Delete-Script
#
#
# Scripts; URLs starting with /cgi-bin/ will be unders
# script calls in the directory /your/script/directory
# Exec /cgi-bin/* /your/script/dir
#
#
# *** DIRECTORY LISTINGS ***
DirAccess On
# Welcome Welcome.html
Welcome index.html
AlwaysWelcome On
Exec /cgi-bin/* /QSYS.LIB/CGI_BIN.LIB/*.PGM %%EBCDIC%%
PASS /* /Web/*
# DirReadme Top
# DirShowDate On
# DirShowSize On
# DirShowBytes On
# DirShowOwner Off
# DirShowDescription On
# DirShowMaxDescrLength 25
#
# Logging; if you want logging uncomment these lines a
# locations for your access and error logs
# AccessLog /QDLS/ERROR/LOG
# LogFormat Common
# LogTime LocalTime
#
# InputTimeOut 2 mins
# OutputTimeOut 20 mins
# ScriptTimeOut 5 mins
#
#
# * * * * * * * * * * * * * * * * * * * * * * * * * * *
The webserver jobs run in subsystem QHTTPSVR and can be seen below
QHTTPSVR QSYS SBS .0 DEQW
ADMIN QTMHHTTP BCH .0 PGM-QZHBHTTP SIGW
ADMIN QTMHHTTP BCI .0 PGM-QZSRHTTP JVAW
APACHEDFT QTMHHTTP BCH .0 PGM-QZHBHTTP SIGW
DEFAULT QTMHHTTP BCH .0 PGM-QZHBHTTP CNDW
DEFAULT QTMHHTTP BCI .0 PGM-QZHBHJOB TIMW
DEFAULT QTMHHTTP BCI .0 PGM-QZHBHJOB TIMW
DEFAULT QTMHHTTP BCI .0 PGM-QZHBHJOB TIMW
DEFAULT QTMHHTTP BCI .0 PGM-QZHBHJOB TIMW
Link to what IBM says
iSeries Webserver Search Engine - Set up for running on an Apache server
Real-life example of Iseries CGI application
Download RPGLE/DDS source here
-or-
Iseries save file - V5R1M0
Below webpage generated from Iseries.
Drop downs provide for change of year and Month (interactive)
10.10.10.7 is current IP of Iseries box.
|
| |
| |
Suggestions ©
Monday May 12, 2008 @ 7:46 AM
|
|