The Web Interface For The LCD Display

The goal of the web interface was to send the data to my c program in a file called "displayinput" that would contain exactly 32 characters of text for the LCD display.

To do this I implemented a Java Servlet which read the input from the text fields on the html form, wrote the text to the input file "displayinput", and then called my c program "display".

The source for the main page is here: maininterface.htm The page displaying the results is here: displayresults.htm

The webcam images were being captured on usb enabled computer on the local network and uploaded to the machine in a file called "webcam/Webcam.jpg". There was a problem displaying them on the webpage though. Since the images were of a static name, they would be cached. So when the user sent their text the image wouldn't be updated. The cached original would still be displayed since the file name was the same. To prevent this, I used a simple Javascript which added a unique query to the url of the image. The result was an original url for the image each time the page was displayed, so the image would reloaded everytime the page was displayed.

The text input would be submitted to a Java Servlet called "DisplayLCD"

The main page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!-- maininterface.htm
Author: Dan Burke
Place under /webapps/root of the jakarta installation -->
<HTML>
<HEAD>
<TITLE>Dan Burke's CSC 494 Project - An Interactive Internet LCD display</TITLE>
<meta http-equiv="pragma" content="no-cache">
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EF" VLINK="#55188A" ALINK="#FF0000">

<H2>Dan Burke's CSC 494 Project - An Interactive Internet LCD display</H2>

<p align="left">Under the supervision of <a href="http://www.eecg.toronto.edu/%7Emann/">Prof.
Steve Mann</a></p>

<div align="center">
<script language="Javascript">

document.write('<p><img width=320 height=240 src="webcam/Webcam.jpg?'
+ new Date().getTime() + '" border=1 alt="The Webcam"></p>');

</script>
<br>
Enter your name and the text for the LCD Display: </div>
<form method="post" action="/DisplayLCD">
<div align="center">Your Name:
<input name="yourname" type="text" value="" size="20" maxlength"40">
<br>
Line 1:
<input name="line1" type="text" value="" size="16" maxlength="16">
<br>
Line 2:
<input name="line2" type="text" value="" size="16" maxlength="16">
<br>
<input name="sendText" type="submit" value="Change The LCD">
</div>
</form>

<p align="center"><img align="center" alt="" height="247" width="278" src="jhe061.gif">
<IMG HEIGHT="32" WIDTH="259" SRC="apache_pb.gif" ALT="Apache"></P>

</BODY>
</HTML>

The Results Page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!-- displayresult.htm
Author: Dan Burke
Place in the root directory of the user that will be running jakarta -->
<HTML>
<HEAD>
<TITLE>Dan Burke's CSC 494 Project - An Interactive Internet LCD display</TITLE>
<meta http-equiv="pragma" content="no-cache">
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EF" VLINK="#55188A" ALINK="#FF0000">

<H2>Dan Burke's CSC 494 Project - An Interactive Internet LCD display</H2>

<p align="left">Under the supervision of <a href="http://www.eecg.toronto.edu/%7Emann/">Prof.
Steve Mann</a></p>

<div align="center">
<script language="Javascript">

document.write('<p><img width=320 height=240 src="webcam/Webcam.jpg?'
+ new Date().getTime() + '" border=1 alt="The Webcam"></p>');
</script>
<br><center>
<a href="./maininterface.htm">Change The LCD Again</a> </div>
<p align="center"><img align="center" alt="" height="247" width="278" src="jhe061.gif">
<IMG HEIGHT="32" WIDTH="259" SRC="apache_pb.gif" ALT="Apache"></P>
</BODY>
</HTML>

Back to the index