Here is my code:
Code:
String pageNumStr = request.getParameter("pageNum");
out.println("pageNumStr: " + pageNumStr);
int pageNum = 1;
int weekNum;
if(pageNumStr != null && pageNumStr.length() > 0) {
pageNum = Integer.parseInt(pageNumStr);
pageNum++;
}
weekNum = (pageNum-1) * -7;
date.add(Calendar.DAY_OF_WEEK, weekNum);
out.println("pageNum before: " + pageNum);
out.println("date: " + date.getTime());
%>
<%--header--%>
<jsp:include page="../header.jsp">
<jsp:param name="cd" value="."/>
<jsp:param name="sectionId" value="<%=sectionId%>"/>
</jsp:include>
<%--header--%>
<table cellSpacing="0" cellPadding="0" width="960" border="0" id="table3">
<tr>
<td vAlign="top" width="120">
<jsp:include page="../leftNavMenu.jsp">
<jsp:param name="sectionId" value="<%=sectionId%>"/>
<jsp:param name="cd" value=".."/>
</jsp:include>
<cache:cache key="<%=key%>" scope="application" time="<%=siftweb.getCacheTimeout()%>" >
</td>
<td width="4"><img height="1" src="<%=staticDirectories.getStaticLink()%>/section/t.gif" width="4"></td>
<td vAlign="top" width="2" bgColor="#000000">
<img height="1" src="<%=staticDirectories.getStaticLink()%>/section/b.gif" width="2"></td>
<td width="4"><img height="1" src="<%=staticDirectories.getStaticLink()%>/section/t.gif" width="4"></td>
<td vAlign="top" width="930"><!-- Start of StatCounter Code -->
<SCRIPT language=javascript type=text/javascript>
<!--
var sc_project = 1257901;
var sc_invisible = 1;
var sc_partition = 11;
var sc_security = "48a14f8b";
//-->
</SCRIPT>
<SCRIPT language=javascript src="http://www.statcounter.com/counter/counter.js"
type=text/javascript></SCRIPT>
<noscript><a href="http://www.statcounter.com/" target="_blank"><img
src="http://c12.statcounter.com/counter.php?sc_project=1257901&java=0&security=48a14f8b&invisible=1"
alt="hit counter code" border="0"></a>
</noscript>
<!-- End of StatCounter Code -->
<table cellSpacing="0" cellPadding="0" width="820" border="0" id="table5">
<tr>
<td vAlign="top" width="500"><font class="Small">
<table border="0" cellpadding="0" cellspacing="2" class="photos">
<tr>
<td align="center" valign="top"><font face="arial,helvetica">
<a class="DefaultLink" href="../Video/weeklyVideos.jsp?pageNum=<%=pageNum%>">Previous Week</a></font>
</td>
</tr>
<%
out.println("pageNum after: " + pageNum);
The print outs:
"pageNum before: 2"
"pageNum after: 1"
I can't figure out why these numbers are different. What am I missing? Thanks in advance!
--------------------
Newbie~don't breed or buy pets~Adopt,RECYCLE, RENEW, REUSE~