Passing parameters to XSL using JSTL?

I'm trying to pass a couple parameters back to XSL using the JSTL tag library, but the values are not getting passed.  My code is attached.  

The page loads, but the two values are not being passed.  All I get is a page without any content that would have been filled in the for-each loop.

///// JSP code ////
<%@ taglib prefix="c" uri="" %>
<%@ taglib prefix="x" uri="" %>
	String pageStart = "1";
	String pageLimit = "10";
	if (request.getParameter("s") != null)
		pageStart = (String)request.getParameter("s");
	if (request.getParameter("l") != null)
		pageLimit = (String)request.getParameter("l");
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <c:import url="test2.xml" var="xmldoc" />
    <c:import url="test2.xsl" var="xslt" />
    <x:transform xml="${xmldoc}" xslt="${xslt}">
    	<x:param name="pageLimit" value="1"/>
         <x:param name="pageStart" value="10"/>
////// XSL: /////////
<?xml version="1.0"?> 
<xsl:stylesheet version="1.0" xmlns:xsl="">
<xsl:output method="html" omit-xml-declaration="yes"/>
<xsl:strip-space elements="*"/>
	<xsl:template match="/">
      <xsl:param name="pageStart" />
      <xsl:param name="pageLimit" />
      <xsl:variable name="end" select="$pageStart + $pageLimit - 1"/>
  	  <xsl:variable name="docsort" select="Table/Row[position() &gt;= $pageStart and position() &lt;= $end]"/>
                <xsl:if test="$pageStart - $pageLimit &gt;= 1">
                    <a href="?s={$pageStart - $pageLimit}&amp;l={$pageLimit}">prev</a>
              <td align="right">
                <a href="?s={$pageStart + 1}&amp;l={$pageLimit}">next</a>
            <tr bgcolor="#CCCCCC">
              <th>Element 1</th>
              <th>Element 2</th>
            <xsl:for-each select="$docsort">
                    	<xsl:for-each select="Table/Row/Cell">
                      		<td><xsl:value-of select="element1"/></td>
//// XML FILE ////
<?xml version="1.0"?>

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Geert BormansInformation ArchitectCommented:
The parameters are local to the template for match="/"
and should be global

 <?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="">
<xsl:output method="html" omit-xml-declaration="yes"/>
<xsl:strip-space elements="*"/>
      <xsl:param name="pageStart" />
      <xsl:param name="pageLimit" />
      <xsl:template match="/">

should work

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cacklebunnyAuthor Commented:
Sure did, thanks!
Geert BormansInformation ArchitectCommented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.