PEPmodel 3.42 KB
<HTML>
<HEAD>
  <TITLE>PEP Java Demo</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff" TEXT="#000000">
<P>
<IMG ALT="PEPmodel" BORDER="0" WIDTH="48" HEIGHT="48" SRC="Icons/WWW/model.gif">
<A HREF="http://www.w3.org/pub/WWW"><IMG ALT="W3C" BORDER="0" WIDTH="72" HEIGHT="48"
    SRC="Icons/WWW/w3c_home.gif"></A>
<A HREF="http://www.w3.org/Architecture/"><IMG SRC="Icons/arch.gif" ALT="Architecture Domain"
    BORDER="0" WIDTH="212" HEIGHT="48"></A>
<A HREF="http://www.w3.org/Protocols/PEP"><IMG ALT="HTTP" BORDER="0" WIDTH="48" HEIGHT="48" SRC="Icons/WWW/PEP.gif"></A>
<H1>
  PEPmodel
</H1>
<P>
Welcome to the PEP demonstration code.
<P>

Please see the <A HREF=src/classes/doc/Overview.html>documentation</A> in <A
HREF=src/classes/doc/>src/classes/doc</A> or the source code in <A
HREF=src/classes/w3c/model>src/classes/model</A>. The source has been HTMLized
under doc/model whit a java app called JavaExpander which I hope to find time
to finish and give out.

<P>
<H2>Purpose</H2>
<P>
The PEPmodel package was designed for:
<UL>
<LI>proof of concept</LI> - prove that PEP is both useful and implementable
<LI>API testbed</LI> - implement different PEP extensions and learn
what PEP  <A HREF=src/classes/doc/ExtensionDesign.html>library
interface</A> is needed to support them
<LI>implementation suggestions</LI> - provide a starting point for PEP
implementation in browsers and servers
</UL>
<P>
<H2>Obtaining</H2>
<P>

The <B>PEPmodel</B> package is distributed in <A
HREF=PEPmodel.zip>zipped</A> and <A HREF=PEPmodel.tar.gz>gzipped</A>
formats. The source tree may be browsed in java <A
HREF=src/classes/w3c/model>source file form</A> or <A
HREF=src/classes/doc/w3c/model>html form</A>.

<P>
<H2>Building</H2>
<P>

Because the Makefiles change directory, "." is not a sufficient
CLASSPATH. Instead, you must specify a full path up to src/classes. You must
also specify where the makefiles directory is. For instance, if you have
copied PEPmodel into /usr/local/src/PEPmodel, you may go to
/usr/local/src/PEPmodel/src/classes and type:

<PRE>
CLASSPATH=/usr/local/src/PEPmodel/src/classes MAKEDIR=/usr/local/src/PEPmodel/makefiles make
<PRE>

This will also require to have the java compiler, javac, in your classpath.

<H2>Running</H2>
<P>Of course, java renders all of this moot as the distribution binaries may be run on any
JVM. You need to set your CLASSPATH. If you installed this package in
<EM>/usr/local/src</EM>, your CLASSPATH will point to
/usr/local/src/PEPmodel/src/classes. With a Sun JVM, you may hae to
add classes.zip to the CLASSPATH, eg
<PRE><B>
export CLASSPATH=/usr/local/src/PEPmodel/src/classes:/usr/java/lib/classes.zip</B></PRE>
On windows, the CLASSPATH separator is a ';' rathern than a ':':
<PRE><B>
set CLASSPATH c:\PEPmodel\src\classes;\Java\lib\CLASSES.ZIP</B></PRE>

<P>Here's how you run the Server:</P>
<PRE>
<B>java w3c.model.tools.basicweb.Server -port 8888</B>
</PRE>
You will see something like: <PRE>
&lt;!- server root
"/afs/w3.org/pub/WWW/Protocols/PEP/PEPmodel/src/classes/"></PRE> and it will
sit there until you give it a reuqest from the client:
<PRE>
<B>java w3c.model.tools.basicweb.Client http://localhost:8888/escaped/doc/Overview.html</B>
</PRE>
You should see a status line from server like this:
<PRE>
&lt;!- reading "HTTP/1.1 200 OK" -&gt;
</PRE>
<P>
For a more detailed view of the output, please see the <A HREF=src/classes/doc/SampleSession.html>SampleSession</A>.
<P>
  <HR>
<P>
<A HREF="mailto:eric@w3.org">Eric Prud'hommeaux</A>
</BODY></HTML>