Link to home
Start Free TrialLog in
Avatar of ram_os
ram_os

asked on

jsp and pager tag library

Hi,

Im trying to set a value (maxPageItems) in pager tag library by using a session variable but I am getting the error Attribute amountOfPages has no value even though the attribute does have a value.

This is the line that causes the error:
maxPageItems="<%=session.getAttribute("amountOfPages")%>"

But this works:
maxPageItems="<%=5%>"

Here a snippet from the jsp file:
<pg:pager index="center"
              maxPageItems="<%=session.getAttribute("amountOfPages")%>"
              maxIndexPages="5"
              export="currentPageNumber=pageNumber"
              url=""
              scope="request">
      \="style"/>
      <pg:param name="position"/>
      <pg:param name="index"/>
      <pg:param name="maxPageItems"/>

Thanks
Avatar of ram_os
ram_os

ASKER

got it,

for anyone whos interested:

maxPageItems="<%=session.getAttribute(\"amountOfPages\")%>"

I think its because the tag library is based on an older jsp implementation.
ASKER CERTIFIED SOLUTION
Avatar of PashaMod
PashaMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial