Hi, thank you everybody in this mailing list, I appreciate your sympaty and
your helps, I want to thank everybody without exception.
And I am still struggling with the same jsp file, I don't know why the
variable called "category" is not the same in :
System.out.println("First output of category here :" + category);
AND HERE
<% System.out.println("Second output of category here ?? = " + category); %>
Please correct me.
Here is my code :
<%@ page session="false" %>
<%@ taglib uri= "/WEB-INF/tlds/pager-taglib.tld" prefix="pg" %>
<%@ taglib uri="http://jakarta.apache.org/taglibs/jdbc" prefix="sql" %>
<sql:connection id="conn1">
<sql:url>jdbc:mysql://localhost/test</sql:url>
<sql:driver>org.gjt.mm.mysql.Driver</sql:driver>
</sql:connection>
<html>
<head>
<title>Pager Tag Library Demo</title>
<style type="text/css">
A.nodec { text-decoration: none; }
</style>
</head>
<body bgcolor="#ffffff">
<table bgcolor="#ffcc00" width="100%" border="0"
cellspacing="0" cellpadding="2">
<tr>
<td><table bgcolor="#3366cc" width="100%" border="0"
cellspacing="0" cellpadding="4">
<tr>
<td width="379"><a href="http://jsptags.com/"><img src="image.gif"
alt="<ssb.com> logo" width="379" height="65" border="0"></a></td>
<td width="100%" align="center"><a href=" " class="nodec"><font
color="#ffffff" size="+2"><b>
Hot Sites</b></font></a></td>
</tr>
</table></td>
</tr>
</table>
<%
String category = (String)request.getParameter("category");
System.out.println("First output of category here :" + category);
%>
<%
if (category !=null)
{
category = (String)request.getParameter("category");
}
else //If category wasn't in the query string, set it to a default value.
{
category = "All"; //Fill in the default value here. I just used an empty
string.
}
%>
<center>
<script language="JavaScript">
function gotoFunction() {
var parameter =
productGoto.productList.options[productGoto.productList.selectedIndex].value;
self.location = "pager-jdbc.jsp?category=" + parameter;
}
</script>
<table width="90%" cellpadding="4">
<tr >
<td bgcolor="#eeeeff">
<FORM NAME="productGoto">
<FONT FACE="Arial,Helvetica" SIZE="-2">
Select By Category:
<SELECT NAME="productList" onChange="gotoFunction()" onBlur="return
options[0].selected = true">
<OPTION VALUE="All">All Categories </OPTION>
<OPTION VALUE="Computing ">Computing</OPTION>
<OPTION VALUE="Competition ">Competition</OPTION>
<OPTION VALUE="Commerce">Commerce</OPTION>
<OPTION VALUE="AuditFirms">Audit Firms</OPTION>
<OPTION VALUE="Government ">Government</OPTION>
<OPTION VALUE="Health ">Health</OPTION>
<OPTION VALUE="Industry ">Industry</OPTION>
<OPTION VALUE="InvestmentAdvisors ">Investment Advisors</OPTION>
<OPTION VALUE="LawFirms ">Law Firms</OPTION>
<OPTION VALUE="MutalFundPages ">Mutual Fund Pages</OPTION>
<OPTION VALUE="NewsViews ">News/Views</OPTION>
<OPTION VALUE="Reference ">Reference</OPTION>
<OPTION VALUE="Transportation ">Transportation</OPTION>
<OPTION VALUE="Travel ">Travel</OPTION>
<OPTION VALUE="WebResearch ">Web Research </OPTION>
<OPTION VALUE="WebPagePage ">WebPage Technology</OPTION>
</SELECT>
</FORM>
</td>
<td width="100%">
</td>
</tr>
</table>
<% System.out.println("Second output of category here ?? = " + category); %>
.......more code
Thanks
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets