Solved

jsp and pager tag library

Posted on 2006-11-30
2
598 Views
Last Modified: 2010-05-18
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
0
Comment
Question by:ram_os
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:ram_os
ID: 18044240
got it,

for anyone whos interested:

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

I think its because the tag library is based on an older jsp implementation.
0
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 18049907
Closed, 200 points refunded.
PashaMod
Community Support Moderator
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
doubleChar java challenge 7 130
spring example errors 33 554
login form jsp example 2 69
ArrayList Adding/settign data 3 36
Determining the an SCCM package name from the Package ID
By reading this blog, MSPs will gain insight into how to improve communications with their clients as well as establish a more profitable business.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question