#!/usr/local/bin/perl
#
# CGI script to supply a specified file after reading a password from a form
#
$query_string = $ENV{'QUERY_STRING'};
$path_info    = $ENV{'PATH_INFO'};
$expected     = $ENV{'CONTENT_LENGTH'};

$secret	= "fido";

read(STDIN, $inputline, $expected);
($userpw) = $inputline =~ /^userinput=([\w]+)$/;
if ($userpw eq $secret) {

print "Content-type: text/html\n\n";
print STDOUT <<"EOM";

<HTML>
<HEAD>
<TITLE>Internet Development with JAVA</TITLE>
<!-- Changed by: Dr. Charles Nicholas, 12-Jun-1996 -->

<!-- Update this with the name of the interdev directory under -->
<!-- the USF&amp;G server document root -->
<!-- BASE HREF="http://170.202.74.33/" -->
<BASE HREF="http://ruff.cs.umbc.edu:1080/">
</HEAD>

<BODY><H1>Internet Development with JAVA</H1> 


<H3>Objectives</H3>

<P> The purpose of this course is to provide Web administrators with
the knowledge they need to bring up Web servers and offer useful
content, static or executable, over the World-wide Web.  Specific
objectives include: </P>

<UL>
<LI> Present a broad introduction to the variety of Internet tools
<LI> Discuss the architecture of the WWW in detail
<LI> Discuss issues involved in connecting text and other data to the Web
<LI> Present HTML, including tools for creating HTML documents
<LI> Discuss installation and configuration of Web servers
<LI> Discuss Web forms and scripts
<LI> Discuss the use and construction of imagemaps
<LI> Present some example scripts
<LI> Discuss security issues with Web servers 
<LI> Present the JAVA language
<LI> Discuss the use and construction of JAVA applets
<LI> Discuss the JAVA API
<LI> Discuss data structures in JAVA
<LI> Discuss security issues with JAVA
</UL>

<H3>Prerequisites</H3>

<P> Knowledge of a high-level programming language such as C is
helpful.  Some experience with the Web would be desirable.  We assume
little or no prior knowledge of HTML.  We assume no previous server
administration experience. </P>

<UL>

<LI>The variety of Internet tools is increasing all the time.  Look at
December's list of <A
HREF="http://www.december.com/net/tools/internet-tools.html"> Network
Information Retrieval Tools</A>.
(<A HREF="interdev/tools.htm">Local copy (no images)</A>.)

<LI>We can also look at a chart showing the increasing <A
HREF="http://www.mids.org/mids/growth/internet/hostsl.gif"> number of
Internet hosts worldwide</A>.
(<A HREF="interdev/hostsl.htm">Local copy</A>.)

<LI>There are several ways to comment on the explosive growth of the
Internet.  Look at the most recent <A
HREF="ftp://ftp.cs.wisc.edu/connectivity_table/Connectivity_Map.color.gif">
Internet connectivity map.</A> 
(<A HREF="interdev/Connect.htm">Local copy</A>.)

<LI> Although this course concentrates on the World-Wide Web, it's
important to note that other Internet services exist.  We can
demonstrate WAIS, using "The Computists' Communique" as an example.
Once the USF&amp;G firewall permits it, we can access the <a
href="wais://ruff.cs.umbc.edu:2210/TCC">TCC corpus</a> using WAIS.

<LI> Chapters 7 and 8 of the O'Reilly book, "Managing Internet
Information Services", discuss WAIS in detail.  WAIS broke ground
early on, by being the first Information Retrieval engine to be widely
available on the Internet.  The <A
HREF="http://www.eit.com/goodies/software/swish">SWISH system from
EIT</A> is one of several other IR engines now available for use with
WWW.

<LI> Web browsers can be used to access other computers using Telnet.
For example, you can try to <A HREF="telnet://ruff.cs.umbc.edu">telnet
to ruff.cs.umbc.edu </A>

<LI> Note that the Netscape browser must be configured to use
<em>proxies</em> for certain tools, including WAIS, especially if a
firewall is being used.

<LI> There's lots of good web-related material at the <A
HREF="http://www.w3.org/">World-Wide Web Home</A> 
(<A HREF="interdev/WWWhome.htm"> local copy </A>) 
The Web is still very much under development!

<LI>The Web has a client/server architecture.  Clients send requests
using the 
<A HREF="http://www.w3.org/pub/WWW/Protocols/HTTP/1.0/spec.html">
http protocol</A>, 
(<A HREF="interdev/spec.htm"> local copy </A>) 
and servers reply using HTML.  
(Actually, only a subset of http is used in WWW</A>.)

<LI>The on-line documentation for Mosaic has a good <A
HREF="http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html">
Introduction to HTML</A>.  
(<A HREF="interdev/Primer.htm">Local copy</A>.) 

<LI> <B>Exercise:</B> Use HTML Assistant, or an ordinary editor if you
prefer, to create a home page for yourself.  

<LI>Michael J. Hannah of Sandia National Laboratories has prepared an
<a href="http://www.sandia.gov/sci_compute/html_ref.html">HTML
Reference Manual</a> 
(<A HREF="interdev/html_ref.htm">Local copy</A>), 
and a <a href="http://www.sandia.gov/sci_compute/elements.html"> list of
elements</a>.  
(<A HREF="interdev/elements.htm">Local copy</A>.)

<LI> Several tools for creating HTML documents are available:

<UL> 

<LI> On Windows, we can use HTML Assistant to create HTML documents.

<LI> In the X environment, we might want to use use SoftQuad's
HoTMetaL.  

</UL>

<LI> Several versions of HTML are available, and development of HTML
continues.  You might want to look at a <A
HREF="http://www.w3.org/pub/WWW/MarkUp/Wilbur/features.html">
Description of HTML 3.2</A>
(<A HREF="interdev/html32.htm">Local copy</A>.)  

<LI> Several documents offer advice on HTML style and content.  Look,
for example, at the <A
HREF="http://info.med.yale.edu/caim/StyleManual_Top.HTML">Yale HTML
Style Guide</A>.

<LI> There are a number of servers out there.  The most popular UNIX
servers are from NCSA and CERN.  As shown in this <A
HREF="http://www.proper.com/www/servers-chart.html">server comparison
chart</A>, servers vary widely in their platforms and features.
(<A HREF="interdev/compare.htm">Local copy</A>.)  

<LI> Here's a good <a href="http://www.city.net/win-httpd/"> server
for Windows 3.1.</a>

<LI> Greg Bean has compiled lots of <a href="http://www.charm.net/~cyber>
information on DOS/Windows web software</a>, including a tutorial on
<a href="http://www.charm.net/~cyber/slide01.html">Building Web Servers
on Microcomputer Platforms.</a>

<LI> Demonstrate how one installs a Web server under Windows 95 and/or
NT.

<LI> Note that although the various servers may use a different
directory structure, the basic idea is the same.  In general, the
important directories and files include:

<UL>

<LI> The <TT>bin</TT> directory, which is where the <TT>httpd</TT>
executable resides.

<LI> Scripts, written using the GET or POST method for taking input,
reside in the <TT>cgi-bin</TT> directory.  (The GET method is where
the input data for a script is appended to the script's URL.  In the
POST method, the script reads its input data off stdin.)  Scripts used
by servers tend to be written in perl, shell language, or compiled C
code.  The name of this directory may be changed by modifying an
appropriate configuration file in the <TT>conf</TT> directory.

<LI> The <TT>conf</TT> directory contains several configuration files.
Errors in these files may result in flaky server behavior, especially
under Windows.  <TT>access.conf</TT> specifies the IP addresses of
those machines that may or may not issue GET or PUT commands to your
server.  <TT>httpd.cnf</TT> describes the server itself, e.g. what
TCP/IP port it's supposed to listen to.  <TT>srm.cnf</TT> tells the
server where to find icons and scripts.  The file <TT>mime.typ</TT>
tells the server what MIME type to attach to files with a given
suffix.

<LI> The <TT>html</TT>documents themselves reside under the
<TT>doc</TT> directory.

<LI> The <TT>icons</TT> directory is where icons used in the IMG tag
are kept.  The most common formats are <TT>xbm</TT> for black and
white, and <TT>gif</TT> for color icons.

<LI> The <TT>logs</TT> directory is where the server keeps its access
and error logs.

</ul>

<LI> Especially under UNIX, pathnames in several configuration files
have to be changed to reflect local directories.

<LI> Using the Net from home is easier than ever.  Programs like TIA
and SlipKnot let you access the Web and so forth over ordinary phone
lines.  Modems that run at 28.8 kbps are now quite affordable, and
even faster modems are said to be in development for sale next year.

<LI> <B>Exercise</B> Bring up a server on your PC, and configure it to
bring up the home page you created last session.  <B>Extra credit
:-)</B> Bring up a server on your home PC.

<LI> Most browsers now support forms.  The <A
HREF="http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/fill-out-forms/overview.html"
>Mosaic documentation for forms</A> is quite useful.</LI>
(<A HREF="interdev/forms.htm">Local copy</A>.)  

<LI>I'm running the CERN server on
<TT>http://ruff.cs.umbc.edu:3080</TT>.  If the firewall permits, we
can see a couple of forms from <A
HREF="http://ruff.cs.umbc.edu:3080/homepage.html"> my homepage</A>.
Notice that the <A HREF="http://170.202.74.33/idgate.htm"> course
gateway screen at USF&amp;G</A> (and the corresponding <A
HREF="http://ruff.cs.umbc.edu:1080/IDgateway.html"> screen at
UMBC</A>) use a simple form.

<LI> <B>Exercise</B> Create a fill-out form using HTML. If the
firewall permits (again) you can test your form by running it against
NCSA's form tester, which you can access by specifying
<CODE>ACTION="http://hoohoo.ncsa.uiuc.edu/htbin-post/post-query"</CODE>
in the FORM tag.</LI>

<LI> Forms are usually used in conjunction with scripts.  For example,
the course gateway form is connected to a later version of this <a
href="interdev/script.htm"> relatively long Perl script.</a>

<LI> This <A
HREF="http://ruff.cs.umbc.edu:1080/courses/491/html/date.html">example
of a script</A> returns the system date.</LI>
(<A HREF="interdev/date.htm">Local copy</A>.)  

<LI>Let's go through this <A
HREF="http://hoohoo.ncsa.uiuc.edu:80/cgi/primer.html">tutorial on the
Common Gateway Interface</A></LI>

<LI>The NCSA server keeps separate directories for GET and POST
scripts.  With the GET method, the arguments are appended to the
requested URL.  With the POST method, the arguments are sent as a
separate data structure, and read as input by the scripts themselves.
Scripts that take no input arguments can be used with either method.

<LI> Demonstrate installation of a web server under Windows NT.

<LI> If time permits, we can demonstrate the use of image maps and the
Windows <TT>mapedit</TT> tool.

<LI> For more background on the Web, there are many on-line
references.  The August 94 Communications of the ACM has a good
overview article.  <A HREF="http://www.ora.com/">O'Reilly &amp;
Associates</A> has several appropriate books.

<LI> The related notions of URI, URL, URC, URA and URN are explained
on this <A
HREF="http://www.w3.org/hypertext/WWW/Addressing/Addressing.html">UR*
page</A>.  All this continues to be under development.</LI>

<LI>The <A
HREF="http://www.ncsa.uiuc.edu/SDG/IT94/Agenda/Papers-received.html"
>papers from the Fall 1994 Web conference</A> in Chicago are, of course,
available on the Web.  The papers from the Spring 1995 conference in
Darmstadt are available from <A HREF="http://www.elsevier.nl/">Elsevier</A>.

<LI> Graphics (large and small) are becoming more popular in HTML
documents.  There are <A HREF="http://white.nosc.mil/images.html">many
collections of useful icons</A> out there.

<LI> Some of the available graphics include symbols for: 
<MENU> 
<LI><IMG SRC="interdev/binary.xbm">A binary file 
<LI><IMG SRC="interdev/movie.xbm">A movie 
</MENU>

<LI> Take a look at some of the other image repositories around the
Web, and convert some of them for use on your home page.  If an image
is transparent, then it blends into the browser's background color, no
matter what that color is.  To see how this works, check out the <A
HREF="http://melmac.corp.harris.com/transparent_images.html">Transparent
Image Page</A>.  Discuss and demonstrate conversion tools such as
giftrans.

<LI> Some applications with graphics are quite impressive.  Here, for
example, is the <A
HREF="http://www.galcit.caltech.edu/~ta/lb/lb.html">lite bright
page</A>.
<LI>There are several other useful <A
HREF="http://hoohoo.ncsa.uiuc.edu/docs/tutorials/" >NCSA httpd
tutorials</A>. </LI>

<LI>There are a number of wonderful image maps out there.  One fine
way to use this feature is to make a floorplan of your office or house
or whatever.  The <A
HREF="http://insti.physics.sunysb.edu/itp/floorplan1.html"> floorplan
of the Physics department at SUNY Stony Brook</A> was the first
example.  There's an excellent <A
HREF="http://wintermute.ncsa.uiuc.edu:8080/map-tutorial/image-maps.html"
>tutorial on image maps</A>.

<LI> If time permits, we can go through some detailed information on
<A
HREF="http://ruff.cs.umbc.edu:1080/courses/491/html/maps.html">creating
image maps</A>.

<LI> Demonstrate the <A
HREF="http://sunsite.unc.edu/boutell/mapedit/mapedit.html#getmapedit">mapedit</A>
tool for creating image maps.

<LI> <B>Exercise</B> Use mapedit to install an image map under the
your server.  You may use an image of your own, or we can fetch some
suitable images off the net.

<LI> Converting a large collection of documents to HTML is a task that
<EM>must</EM> be automated to keep one's sanity.  Perl scripts are a
good way to do this.  NASA's <A
HREF="http://banzao.gsfc.nasa.gov/stelar/stelar_homepage.html">Stelar
Project</A> gave me some insight into this process.

<LI> Security on the Web is a big issue for a lot of people.  Research
in this area is ongoing.  One effort has been towards a <A
HREF="http://www.commerce.net/information/standards/drafts/shttp.txt"
>Secure HTTP</A> protocol.  There is also some material on <A
HREF="http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/security.html"
>Mosaic Security Issues</A>.</LI>

<LI>There's lots of good information under Yahoo.  Performance is an
issue for many people, so it's appropriate to consider <A
HREF="http://akebono.stanford.edu/yahoo/Computers/World_Wide_Web/Caching/"
>caching</A>, and issues related to the TCP/IP protocol used in WWW.
We also need to discuss capacity issues.

<LI> The material on Java will follow.

<LI> Issues & Wrapup

</ul>
<hr>

<ADDR>This page is the responsibility of <A
HREF="http://ruff.cs.umbc.edu:1080/charles_nicholas.html">Charles
Nicholas</A>.  If you wish, you can send mail to <A
HREF="mailto:nicholas\@cs.umbc.edu">nicholas\@cs.umbc.edu</A>.  Please
note, however, that this mail feature is not (yet) supported by all
browsers.

</BODY>
</HTML>

EOM

} 
else {
    print "Content-type: text/html\n\n";
    print "<TITLE>Internet Development with JAVA</TITLE>\n";
    print "<PRE>\n";
    print "Invalid password.\n";
    print "</PRE>\n";
}

