How can i set the number of results that can be displayed on the page

hello im just wondering how i can set the numebr of results that can be dispaleyd on the jsp, when the there are more than 5 results i want the suer to press more
how is this odne could anyone send me a example code?
and also how can i get results from the query displayed as select list options, so that when they press one of teh results it goes to correspnding page
Thank you

Hi,
I assume that you have the connection to the DB.
You can try this code.
Statement stmt = con.createStatement();
String sql = "<some sql code for selecting>";
ResultSet rs = stmt.executeQuery(sql);
rs.last();
int count = rs.getRow(); // this is the number that shows how many numbers you have after select query
rs.first(); //we moved cursor again to the begining of the results.
if (count > 5) {
for (int i=0;i<5;i++) {
  //as an example
  rs.getString(0);
  rs.getString(1);
  rs.getString(2);
out.print("<a href='morePage.jsp'>More</a>");
else {
for (int i=0;i<count;i++){
  //as an example
  rs.getString(0);
  rs.getString(1);
  rs.getString(2);
rs.close();
stmt.close();I hope this would help you.
If you have problems let me know..
Ismail TURK

Similar Messages

  • HT201774 How do I delete excess email messages from my iPhone.  There are 300 messages listed, and every time I delete some, more are added from old messages.  How do I limit the number of messages that can appear on my phone?  How can I delete messages i

    How do I delete excess email messages from my iPhone.  There are 300 messages listed, and every time I delete some, more are added from old messages.  How do I limit the number of messages that can appear on my phone?  How can I delete messages in bulk,

    You can't.
    All photos transferred from your computer are stored in the Photo Library. The photos in the album or albums below are not duplicates - they include a pointer to the original photos stored in the Photo Library. This way you can view the photos in a particular album only by selecting the album, or you can view all photos available in all albums by selecting Photo Library.
    Just as with an iTunes playlist. A song cannot be in an iTunes playlist unless the song is in the main iTunes library. Placing a song in a playlist does not duplicate the song. Remove the main iTunes library or the songs from the main iTunes library that are in a playlist and the songs will no longer be in the playlist either. This way you can listen to the songs in the playlist only by selecting the playlist, or all songs in your entire iTunes library by selecting Music under Library in the iTunes source list.
    The same with iPhoto on a Mac. A photo cannot be in an in iPhoto Event or Album unless the photo is in the main iPhoto library. Placing a photo in an Event or Album does not duplicate the photo. This way you can view the photos in an iPhoto Event or Album only by selecting the Event or Album, or all photos in all Events or Albums.

  • Can Flex Limit the Number of Prints that can be made?

    Is there a way to create a Flex app to limit the number of
    prints that can be made from it? I need to limit a coupon that
    prints out, and I'm new to Flex. Is this possible to be created? Is
    anyone interested in possibly contracting this job? This is a
    serious inquiry. Email me if you have an idea, and a quote.
    [email protected]

    No. Printing is either permitted or not, but there is no way any document can control the print quantity.

  • Is there a limit to the number of apps that can be Hidden from view in Family Sharing?

    I've just set up a Family Share and have issued invitations to a couple of family members.
    I'm trying to take full advantage of the "Hide" feature that's available in the Purchased list in the App Store app, mostly to hide really old apps that I haven't used since the beginning of time.  These apps have been long gone from any of my iOS devices, and it has always bugged me that they still appeared in my Purchased list. It's pretty cool that Family Sharing allows people to hide some of their app purchases from others in the group, as this also allows folks to hide apps that they also don't want to see in our own lists.
    The first couple of dozen apps that I decided to hide stayed hidden. However: now, no matter what I try, I can't hide any more apps.  I swipe on an app to reveal the Hide button; tap the button; the app disappears from the list; I go to another screen in the app; I return to my Purchased list: and the most recent Hidden apps are still listed.
    This is driving me nuts. I'm wondering if Apple has imposed a limit on the number of apps that anyone can hide; or if there's something I can do to force a hidden app to stay hidden.
    Advice will be gratefully accepted.

    Hi, Gail
    > I would suggest that you wait until tomorrow and check those devices again. Remember,
    > this information is being pushed to your device from the iTunes store based on the changes
    > you were making.
    Not a bad suggestion, but it does not explain why an app refuses to REMAIN hidden on my iPhone -- as I explained in my first post:
    > I swipe on an app to reveal the Hide button; tap the button; the app disappears from the list;
    > I go to another screen in the app; I return to my Purchased list: and the most recent Hidden
    > apps are still listed.
    Given the clunkiness and general unreliability of iCloud - which rarely "just works" - it doesn't surprise me that hiding an app on one device doesn't mean the same app will be hidden immediately on other devices logged into the same account. I've learned to be patient and wait hours for changes to anything synced via iCloud to be reflected on other devices in the sync loop.  But again, this in now way explains why apps were not staying hidden on the device that was used to hide them. 
    I've finally managed to hide all the apps I wanted hidden, after many hours of waiting and multiple attempts at hiding.  I am in no way confident that these apps are going to REMAIN hidden permanently, or until I choose to unhide some of them; only time will tell if iCloud decides to behave and accept my series of "Hide this app" commands to be honoured permanently!

  • Is there a limit to the number of groups that can be created in BusinessObjects?

    Hi all,
    We are planning to implement a group structure where there a quite a lot of groups that has to be created. that's why i'm wondering if there is a limit to the number of groups we can create in CMC.
    Thanks in advance for your answers..

    Damien,
         I have NOT come across any limits but you need to be very careful on how many nested layers you create and if you are also going to use 3rd party security like AD &/or LDAP.   Then you will see some performance issues.
    How many groups are looking to create 2,000 / 4,000 / 6,000 ?
    Regards,
    Ajay

  • How do I set ScrollRow on a Sheet that is not displayed without selecting/activating it?

    Without displaying and selecting a named Sheet, how do I set ScrollRow for a Sheet which is not displayed and, therefor, not in a Window?  Is there some other Property of a Sheet I can use to position a specific cell in the upper-left corner of that
    sheet?
    Thanks for any help.
    Charlie

    Thanks Andreas.  Your answer above confirms my fear/conclusion.  Looks like I'll have to change my macro design to handle events.  Probably the right thing to do anyway.
    To those above who ask me to clarify, here's my situation: I have one macro workbook open and running a macro which requires many minutes to complete.  That macro operates on multiple sheets within its own workbook.  As part of those operations,
    my intent was to pre-position/scroll various sheets to display potentially different data based on the results of ongoing calculations so that, when the sheet is actually selected, the desired data is already positioned for best visibility.  However,
    as noted, the macro takes a long time to run.  So I often have multiple workbooks open.  While the macro runs, I minimize the running workbook, and select another workbook that I work in while I wait for the macro to complete. 
    As a result, the running macro workbook is neither displayed nor is it the ActiveWorkbook.  Thus, I cannot allow the macro code to use Properties such as ActiveWindow, since the ActiveWindow is NOT the window I want to adjust.  Nor do I want to
    take focus away from whatever the ActiveWindow is to make my adjustments to the various sheets in question. 
    As noted above, perhaps I'll need to redesign my workbooks to add event handlers to the various sheets so that my desired adjustments can be made when those sheets are selected, at which point I can be certain that they are the ActiveSheet in the ActiveWindow.
    Thanks all for your help.
    cw

  • Calculate the size(in bytes) that will be displayed to the console by command Write-Output

    Is there some way to check the size(in bytes) of the output that will be displayed to the console using Write-Output command. I want the console to display only the first 1024 bytes of the objects output.

    Hi Sachin,
    in that case let me add an example on how to read content from a file that may be or may not be a text file:
    $string = [System.Text.Encoding]::UTF8.GetString([System.IO.File]::ReadAllBytes("D:\example.txt"))
    Theoretically, the "Get-Content" cmdlet ought to do the same, however I have occasionally experienced different results.
    You can choose to not convert it to string and just print the bytes too (or choose another encoding of your preference). Remember, a single letter usually uses 2 bytes, thus reading the first 1024 bytes from a file you converted to text would mean printing
    the first 512 letters.
    Cheers,
    Fred
    There's no place like 127.0.0.1

  • Setting port exceptions for Windows Firewall via GPO. Is there a limit on the number of exceptions that can be set?

    We would like to utilize GPOs to manage our Windows Firewall rule set. We have servers that have different requirements (HL7 connections, other programs) and our doctrine is to only open ports that are going to be used.
    We need to be able to audit and enforce these standards, so GPOs seem to make the most sense to me.
    The problem I am running into is when I attempt to define multiple Windows Firewall Inbound Port Exceptions. (More than 10) After "Applying and Okaying" I will go to verify the firewall rule-set but I find that quite a few of them are missing. It
    seems like I am limited to 8-9 port exceptions per GPO.
    I am unable to locate any documentation about this, but we can work around this by creating multiple GPOs. 
    Has anyone run into this issue before?
    Domain Function level: Windows Server 2008
    Tho H. Le

    > Has anyone run into this issue before?
    No, unfortunately. Our main server FW exception GPO contains 44 rules
    with port or program exceptions, and it works flawlessly...
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • Can I set up a form so that there is text in the fields when the user opens the file?

    My client is interested in supplying schedules of activities in a PDF, and would like it so that a person can use what's in the document, or replace their own information in place of what's supplied.
    I've set up forms for filling in blanks, but I've not seen if some text can be left in the fields to start with. For example, leaving a "your name" text line in a field where the user clicks on that phrase and it disappears (like you see in a number of forms on web pages).
    Is this possible with Acrobat? If not, we'll probably have to go to a Word based solution, but I'd get better design if I do it in InDesign and add this functionality to a PDF.

    George,
    Thanks for keeping track of the discussion. I appreciate that you've taken the time to help me. My clients love the fact they can create these curriculum schedules with editable blocks that will allow the original info to return if the block is emptied. Now they'd like book titles italicized.
    I downloaded the Javascript reference PDF and found the "richValue" information, but I'm not grasping the concept of how to add it to my page. I'm not Javascript-literate, so I'm more inclined to add HTML tags or something like
    and to make something italic.
    Here is the example they gave:
    Example
    Turn all bold text into red underlined text.
    // Custom format event for a rich text field.
    var spans = event.richValue;
    for ( var i = 0; i < spans.length; i++ )
    if( spans[i].fontWeight >= 700 )
    spans[i].textColor = color.red;
    spans[i].fontWeight = 400; // change to default weight
    spans[i].underline = true;
    event.richValue = spans;
    I think I understand the 400 and 700 numbers as font weights, and that "underline" could be replaced with "italic". So I'm trying to figure out what I would need to write in order to make specific words italic in a block of text in the example you provided:
    // If field is blank, display this text
    if (!event.value) event.value = "Your name here";
    Can a span be ID'd by placing a sort of tag around the words? Like... (pardon my fake Javascript)
    // If field is blank, display this text
    if (words.are) 'i' then italics = true
    if (!event.richValue) event.richValue = "Your 'i'name'i' here";
    (You're probably laughing at my attempt here, but I hope my point is made :-) ).
    David

  • Does iMovie have a limit on the number of photos that can be downloaded to iDVD?

    I have created an iMovie with 426 photos and is 39 minutes long, but when I try to download the movie to iDVD the download quites unexpectedly.  I've tried downloading the movie twice with the same result.  I am using iMovie 9.  Is this problem fixable?  Or is the movie too large to download to iDVD??  Please help!!  Need answer ASAP!

    There is no limit I know of. 39 minutes should be no problem.
    Have you tried SHARE/MEDIA BROWSER in Large size?
    Then add to iDVD through the Media Browser. It's at the bottom right of the iDVD window.

  • Can i [b]access[/b] all the [b]data[/b] that is [i]displayed on the [b]scr?

    Hi Friends !
    i want to know that can i acess or get or use the data displayed on the mobile screen ? for example like mobile phones display the connection type and the location of the mobile .
    if yes plz tell me how .
    Thank you in advance.

    Not with standard api's

  • Are there any who know what is the number of frames that can be accommodated by the adobe flash cs 5

    My job is to make interactive CDs using adobe flash cs 5. In the Interactive CD, there is a video with a duration of about 2 to 2.5 hours with flv format which should be included.
    Does anyone know the frame in adobe flash cs 5 supports the duration of the video?

    Yes. The difference in some earlier versions is that they allow greater than 16K frames in a document, however Flash Player doesn't (so your SWF just gets cut off). Also, the Timeline starts behaving very strange as soon as you go beyond 16K. I imagine that has always been that way, or has been for a very very long time for both the Player and Timeline behavior.
    I think two versions of the authoring tool introduced two different dialogs at certain editing points to notify you about this, but earlier versions just don't have the notifications but did have the limitation behind the scenes.

  • Is there a limit to the number of files one can store in a folder?

    Does anyone know if there is a limit to the number of files that can be stored in a folder? Or, is there a best-practice recommendation about this?

    I wonder how one would find a group of files within that folder of 2.1 billion < very slowly <

  • Limit the amount of copies that can be printed

    Is there a way to limit the number of copies that can be printed of a pdf from inside the form in LiveCycle? I would like clients to only be able to print  only two copies of a form with Adobe Reader. How can I do this?

    This should be doable, but not very pretty...
    First, put a text-field on the form, and make it hidden with a defaullt value of 0;
    in pre-print, check if the value of the hidden field is >= the limit, if so set
    xfa.event.cancelAction = 1
    that will prevent the print dialog from even showing.
    if the value of the hidden field is < the limit, add one to the value of the field.
    That should do it. If you need a hand with the actual code, just let me know.
    - Scott
    (limitations: if the user doesn't save the changes, the hidden field will remain at 0... as such, you may have to script the docClose event to trigger a save. The issue with this is that the user will be stuck with any changes made, regardless of whether they want to keep changes.. Like I said, it's not pretty. You could go one step further and save the state of all fields on open/save, then restore those values on close, except for the hidden field before triggering a save... As you can see, this can get complicated fast....)

  • Number of partners that can be linked in a Customer Hierarchy

    Hi!
    We have requirement to map multiple partners to a customer hierarchy account. Would be glad to have some insights on:
    1. Any limitation on the number of partners that can be linked to any hierarchy node (even the highest)?
    2. If yes, how many?
    S.Kannan

    Hello,
    This is a community forum for technical questions & issues.
    For question regarding pricing / licensing please contact a Microsoft sales partner or licensing expert.
    Call (1-800-426-9400), Monday through Friday, 6:00 AM to 6:00 PM PST to speak directly to Microsoft licensing specialist.
    http://www.microsoft.com/en-us/server-cloud/products/sql-server/buy.aspx
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

Maybe you are looking for

  • SOAP Sender adapter in PI 7.1

    Hi I have created the SOAP to File scenario, and I am in the process of publishing it in the service regestry, I am receiving the following error when I click Publish in SR, Could not establish connection to Services Registry; configure connection to

  • Error message on step 1....wizard cannot modify this MSI package

    Using the Adobe Customization Wizard, when I choose File > Copy Package, and enter in the appropriate fields, I am getting this error at the end: And although it looks like it copies the package to the location I specify, I cannot open it (I get the

  • Can't even find adobe premier pro cs6

    I now can't even find the adobe premier pro in Adobe website.How could I find it?

  • Is accessing a servlet through a java client possible.

    Is it possible to call a servlets method (say doPost) from a standalone java application? How can we do this? I think for connecting to a servlet I would need to create an HTTP Request object and pass it to a specific URL. This is what the browser do

  • Trying to placing clear cut tiffs over cropped tiffs in Freehand - please help!

    Hi there, I'd be extemely grateful if anyone out there can help me!  I'm having a little trouble with my freehand product catalogue. I've managed to figure out how to import tiffs into freehand as clear cut images (which are my products) without the