| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <HTML> |
| <HEAD> |
| <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| <META http-equiv="Content-Style-Type" content="text/css"> |
| <META name="GENERATOR" content="IBM WebSphere Studio"> |
| <TITLE>Page Hit Counter Introduction</TITLE> |
| <LINK rel="STYLESHEET" href="../theme/Master.css" type="text/css"> |
| </HEAD> |
| <BODY> |
| <CENTER> |
| <FORM name="myForm" method="post" |
| action="../Controllers/SampleController"> |
| <TABLE border="0" cellpadding="0" cellspacing="0" width="500"> |
| <TBODY> |
| <TR> |
| <TD colspan="2"><IMG src="../images/clearPixel.gif" width="1" |
| height="25" alt=""> |
| </TD> |
| </TR> |
| <TR> |
| <TD rowspan="2" align="LEFT" width="220" height="300"><IMG |
| src="../images/hitCounter01.gif" width="200" height="300" alt=""> |
| </TD> |
| <TD align="LEFT" width="380"> |
| <P> |
| <FONT size="+1"><B>Page Hit Counter Sample</B> |
| </FONT> |
| </P></TD> |
| </TR> |
| <TR> |
| <TD align="LEFT" valign="TOP"> |
| <P> |
| <FONT size="-1">This sample shows you how to use a Java |
| servlet to count how many times a page was visited.</FONT> |
| </P> |
| <P> |
| <FONT size="-1">This sample requires a database to store |
| the counter. If you have not already installed and configured |
| your database for the WebSphere samples, refer to <A |
| href="../Configuration/DBConfig.html">Database |
| Configuration</A> for instructions. </FONT> |
| </P> |
| <P> |
| <FONT size="-1"><A |
| href="javascript:document.myForm.submit()" target="_self"> |
| <B>Run this sample</B> |
| </A> </FONT> |
| </P> <INPUT name="command" type="hidden" value="HitCounterView" /> <INPUT |
| name="db_region" type="hidden" value="true" /> |
| </TD> |
| </TR> |
| </TABLE> |
| </FORM> |
| <BR> |
| <TABLE border="0" cellpadding="0" cellspacing="0" width="500"> |
| <TBODY> |
| <TR> |
| <TD align="CENTER"> |
| <P> |
| <B><FONT size="-1">How this sample works:</FONT> |
| </TD> |
| </TR> |
| <TR> |
| <TD> |
| <TABLE border="0" width="100%"> |
| <TBODY> |
| <TR> |
| <TD> |
| <!-- ############ horizontal spacer ############ --> <IMG |
| src="../images/clearPixel.gif" width="15" height="1" alt=""> |
| <!-- ########################################### --> |
| </TD> |
| <TD> |
| <P> |
| <FONT size="-1">This sample has:</FONT> |
| </P> |
| <UL> |
| <LI><FONT size="-1">A Java servlet that |
| increments a counter every time it is invoked </FONT> |
| <UL> |
| <LI><FONT size="-1">A Java Server Page (JSP) |
| that invokes the servlet and displays the counter </FONT> |
| <LI><FONT size="-1">A .servlet file that |
| provides information about the servlet to the WebSphere |
| Application Server </FONT> |
| </UL> |
| </UL> |
| <P> |
| <FONT size="-1">The Application Server processes .jsp |
| files with its JSP 1.0 processor servlet. It handles the |
| <jsp:include ... /> tag as a server-side include, |
| replacing the tag with the variable data generated by the |
| servlet.</FONT> |
| </P></TD> |
| <TD> |
| <!-- ############ horizontal spacer ############ --> <IMG |
| src="../images/clearPixel.gif" width="15" height="1" alt=""> |
| <!-- ########################################### --> |
| </TD> |
| </TBODY> |
| </TABLE></TD> |
| </TR> |
| </TBODY> |
| </TABLE> |
| <BR> |
| <TABLE border="0" cellpadding="0" cellspacing="0" width="500" |
| border="0" cellpadding="0" cellspacing="0" width="500" border="0" |
| cellpadding="0" cellspacing="0" width="500" border="0" |
| cellpadding="0" cellspacing="0" width="500"> |
| <TBODY> |
| <TR> |
| <TD align="CENTER"> |
| <P> |
| <B><FONT size="-1"> How to use this sample on your web |
| page:</FONT> |
| </B> |
| </P></TD> |
| </TR> |
| <TR> |
| <TD> |
| <TABLE border="0" width="100%"> |
| <TBODY> |
| <TR> |
| <TD> |
| <!-- ############ horizontal spacer ############ --> <IMG |
| src="../images/clearPixel.gif" width="15" height="1" alt=""> |
| <!-- ########################################### --> |
| </TD> |
| <TD> |
| <P> |
| <FONT size="-1">You can add this exact tag to any HTML |
| page you have on your site. Rename the HTML file with a .jsp |
| file extension, put the Java .class and .servlet files in |
| the classes folder, publish.... and you're ready to go.</FONT> |
| </P></TD> |
| <TD> |
| <!-- ############ horizontal spacer ############ --> <IMG |
| src="../images/clearPixel.gif" width="15" height="1" alt=""> |
| <!-- ########################################### --> |
| </TD> |
| </TR> |
| </TBODY> |
| </TABLE></TD> |
| </TR> |
| </TBODY> |
| </TABLE> |
| </HTML> |