1.) ANSI Applet : Alternative Version
==========================================================================
This version of the applet can read ANSI-art directly from an (separate)
ANSI files and no conversion Program is needed. You can copy the ANSI
files to your server and submit the URL to the applet as
parameter. Although this sounds very practice there are some
disadvantages. Here a short overview:
- Less error tolerance
- Server must allow upload and access of the ANSI files
- 3 connections are used (HTML file, Java file, ANSI file)
- Sometimes a manually correction of the files is required
- Works ONLY online
The big advantage of this version is that you can work with original ANSI
files. You need only one file which works with the applet and with DOS.
The surfer can view the file online and download it.
2.) Usage:
==========================================================================HTML code (Example):
<APPLET CODE="meph4.class" WIDTH=640 HEIGHT=350>
<PARAM NAME=copyright VALUE="Meph. is a alien">
<PARAM NAME=fileurl VALUE="http://your.domain.com/ansi/test.ans">
<PARAM NAME=scrolling VALUE="No">
<PARAM NAME=WidthInChar VALUE="80">
</APPLET>
fileurl = A URL with the same host like the applet.
scrolling = optional, default=true
WidthInChar = optional, default=80
NOTE: THE COMPLETE URL IS REQUIRED ! (no relative ones)
3.) Restrictions:
==========================================================================
The alternative Version has the same restrictions as the normal version
(no unsupported ESC-Sequences, no control characters for painting ...).
Note 1:
The Java security settings didn't allow to read files from a extern host.
You can't check the applet offline, because the files (html,class,ansi)
must be on the same host ! ( Exception: You have a local webserver
installed)Note 2:
Possibly the security settings of your sever didn't allow to upload
unknown file types (.ans, .prn, ...). The applet don't care about the
extensions and you can rename the extension (.txt,...).
Note 3:
If the security settings of the server or the user system didn't allow an
applet to read files, then you have bad luck.
4.) Dynamic usage and more :
==========================================================================a) Sending a string direct to the applet
Works like the normal version. The only difference is that no conversion
is required. EXAMPLE
b) Working with file upload
If you can upload files directly to your server it is possible to use the
"fileupload" tag (4+browser) to display files from the local drive. It
would be a good idea to implement a CGI which checks (and corrects) the
files: remove unsupported ESC-sequences, ...
c) Working with compressed JAR files
You can use and compress the applet in the same way like the normal version.
EXAMPLE
5.) Copyright:
==========================================================================
Free for non commercial use, no warranty or other guarantee of fitness for
this software.
(c) 1999 Marc Schmitz (Meph.)