Managing a query result through several web pages

Hi,
I wonder what's the best way to manage a query result through several web
pages in the following context.
The query result is large and needs to be available through several web
pages. The user can scroll forward and backward through the pages.
One can :
- rerun the query at each web request and use random access
- run the query once for the first request, keep the pm and the query
somewhere (in a singleton class for example with a key in the HTTP
session) and use random access for handling the other requests (the
problems I see are to keep a connection for each user in this use case and
to decide when to close the previously mentioned objects)
- rerun the query at each web request, including in the filter a test on a
field and an ordering to start the results from the last one displayed
(being able to specify the maximum number of rows desired would be nice).
Thanks for any advice or suggestion.
Regards.

I think Frank's suggestion is probably the best tradeoff between memory
consumption (which would be high if you were to store the enire query
result in the session) and performance (which might be hurt if you
re-issue the query every time).
Note that Kodo 3.0 will provide a getObjectsById(Object[] ids) method
that should help in quickly instantiating a page of query results.
Query result limiting is currently under discussion for inclusion in the
JDO specification. We may have something for this in an upcoming Kodo
release (although not for 3.0).
In article <[email protected]>, Frank Riley wrote:
[email protected] (Patrice) wrote in
news:[email protected]:
Hi,
I wonder what's the best way to manage a query result through several
web pages in the following context.
The query result is large and needs to be available through several
web pages. The user can scroll forward and backward through the pages.
One can :
- rerun the query at each web request and use random access
- run the query once for the first request, keep the pm and the query
somewhere (in a singleton class for example with a key in the HTTP
session) and use random access for handling the other requests (the
problems I see are to keep a connection for each user in this use case
and to decide when to close the previously mentioned objects)
- rerun the query at each web request, including in the filter a test
on a field and an ordering to start the results from the last one
displayed (being able to specify the maximum number of rows desired
would be nice).For our paging code, we convert the query result to a list of object ids
(using pm.getObjectId()). We store this list on the session and only
instantiate the objects we need for a particular page (using
pm.getObjectById()). When a user does something that could possibly
change the query result, we rerun the query and replace the list on the
sesssion.--
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com

Similar Messages

  • How to display the query results in several pages?.

    Hi,
    i want to display the query results in several pages. for example my query result found 50 matches, now i want to print 20 per pages next 20 will be in next pages. iam using only jsp & mysql.
    Regards
    Chinna

    Hi, what you are trying accomplish is known as pagination.
    You could use JSTL tags with Custom Tags to perform pagination in your JSP pages.
    evnafets showed me DisplayTags , you could use those as well http://displaytag.sourceforge.net/11/tut_externalSortAndPage.html
    Here is one article on paging:
    http://www.javaworld.com/javaworld/jw-07-2004/jw-0726-pagination.html

  • I cant use my navaigation arrows to scroll smoothly through a web page, it just goes to the bottom. Work OK in IE

    Until recently all I needed to do to scroll through a web page was to use my navigation arrows. Now when I hit the down arrow I go to the bottom of the web page.

    You may be in Caret Browsing Mode. The F7 key toggles Caret Browsing on and off with each tap of that key.
    <br />
    <br />
    '''You need to update the following.''' The Plugin version(s) shown below was/were submitted with your question and is/are out of date. You should update to avoid known security issues with the version(s) you have installed. Click on "More system info..." to the right of your question to see what was included with your question.
    *Shockwave Flash 10.2 r159
    #'''''Check your plugin versions''''' on either of the following links':
    #*http://www.mozilla.com/en-US/plugincheck/
    #*https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    #*'''Note: plugin check page does not have information on all plugin versions'''
    #*There are plugin specific testing links available from this page:
    #**http://kb.mozillazine.org/Testing_plugins
    #'''Update the [[Managing the Flash plugin|Flash]] plugin''' to the latest version.
    #*Download and SAVE to your Desktop so you can find the installer later
    #*If you do not have the current version, click on the "Player Download Center" link on the "'''Download and information'''" or "'''Download Manual installers'''" below
    #*After download is complete, exit Firefox
    #*Click on the installer you just downloaded and install
    #**Windows 7 and Vista: may need to right-click the installer and choose "Run as Administrator"
    #*Start Firefox and check your version again or test the installation by going back to the download link below
    #*'''Download and information''': http://www.adobe.com/software/flash/about/
    #**Use Firefox to go to the above site to update the Firefox plugin (will also install plugin for most other browsers; except IE)
    #**Use IE to go to the above site to update the IE ActiveX
    #*'''Download Manual installers'''.
    #**http://kb2.adobe.com/cps/191/tn_19166.html#main_ManualInstaller
    #**Note separate links for:
    #***Plugin for Firefox and most other browsers
    #***ActiveX for IE

  • How to send quiz results to a web page?

    Okay, this should have taken 2 minutes, not 2 hours. Very frustrating. Here is the situation:
    * Downloaded Captivate 5 Trial Version
    * Created based quiz (which took forever to figure out how to set the correct answers -- HORRIBLE user interface for setup, but that is another issue)
    * I want the results sent to a web page. I will code the web page & database calls, etc. to handle the information (I am a web developer). Just need the information sent somewhere!
    Several big issues here:
    1. When setting up a URL for the "Pass or Fail", nothing happens. User not taken anywhere. No "Post Results" button shown. The Captivate file just ends and that's it. ??
    2. Finally figured out that I needed the "Internal Server" option chosen to have a Post Results button shown. Okay.
    So when I click Post Results (after answering the 5 questions correctly), I am shown a login box. Why? What is this for? This is not needed. I am going to an INTERNAL SERVER. It is none of Adobe's business what this person's name/email is. What gives? Okay... anyways, I enter my own Adobe login information. It then says "Connecting..." then I get a Status Message that says "Unknown Error". Keep in mind this will be used by a general audience, of which approximately 99.9% will not have an Adobe ID, nor should they need one.
    How I can easily have the Captivate file redirect the user to pages like this: Confirm.aspx?pass=yes or Confirm.aspx?pass=no.
    I don't need anything fancy. But I do need something that works. This is terribly frustrating and I'm about to say it just doesn't work. Please tell me I am wrong.
    Thank for your time and for reading this.
    -Randy

    The Quiz Results slide's Continue button actions are set under Quiz Preferences > Pass or Fail > If Passing Grade etc. By default, the Continue button is set to just continue on to the next slide after the Quiz Results.
    After the user clicks the Continue button on the Quiz Results slide any Pass/Fail actions you've set up there will be evaluated and executed.
    So if the user achieved a passing score, and you set up an action such as Go to URL in Current Window for that case, then the user should find themselves redirected to that URL.  If there was a different action for Failure, and the user failed, then that should happen.  But either of these will only happen after the Continue button is clicked.
    I tested this by setting www.google.com as the go to URL and it worked.  To see if the URL is the issue, try using another URL that you know everyone can get to.  If that works, try to find out why the URL you want to use is not working.  If no URL works, something else is interfering with the action.

  • Since upgrading to FF6 and now through FF7 web pages need repeated refreshing to load this does not happen with other browsers. I have tried many solutions. None have worked. Any ideas?

    Problem began after a Firefox 6 update (i do not remember which one) and has continued through current use of Firefox 7.0.1. Almost all '''web pages load only through repeated refreshing'''. If I do not refresh the web page it will just continue to try to load (as seen by the green rotating ring continually revolving) in a new window with a new tab (as I have set it to do). Nothing stops, nothing crashes. Once the web page completes and opens (after the refreshings) I can close the window click on the bookmark icon or originating link and the web page will load and open quickly (as it should). I have searched for solutions on the Mozilla site and have done many of the possible solutions (deleting history and caches, etc.) Problem seems to be communication in origin (my FF browser talking to web page server). I do not use a proxy. My set up to the internet is: laptop thru Verizon USB modem to internet. Operates as a wireless dial-up with speeds averaging 55 kbs (fast enough for me). I have used this set up for years with no previous trouble. Anyone have similar trouble, ideas or solutions?

    Thanks for your reply cor-el. I had never heard of nor seen the pref network.http.max-connections until I read about it in some of the replies in this support forum. People were saying 256 was the old setting and a new setting of 48 would correct my problem. When I followed the instructions to get to - see - and change the setting I discovered that my network.http.max-connections was already set to 48. I never did this. The only way I can think of that this setting was changed is that it happened by an automatic update to my Firefox browser. So, the problem I have was probably happening while this setting was at 48 all along. It is still set at 48 and I am still having the same problem. I will try as you suggest and set it to 30 and see what happens. I'll let you know the results. That's again for your response.

  • Query AD user's "Web page" attribute?

    On the General tab of a user account, there is a field labeled "Web page."
    Can we export a list of all users with specific text in that field?
    If so, how can we add users to a security group based on matching text in their web page field?  For instance, if their web page field has contains "xyz" text, add the user to "xyz" security group.

    If so, how can we add users to a security group based on matching text in their web page field?  For instance, if their web page field has contains "xyz" text, add the user to "xyz" security group.
    Use this in PowerShell:
    import-module activedirectory
    Get-ADUser -Filter {wWWHomePage -like "*boo*"} | % {Add-ADGroupMember Boo $_.samaccountname}
    Mahdi Tehrani   |  
      |  
    www.mahditehrani.ir
    Please click on Propose As Answer or to mark this post as
    and helpful for other people.
    This posting is provided AS-IS with no warranties, and confers no rights.
    How to query members of 'Local Administrators' group in all computers?

  • Accessing WiFi through public web page

    I have bought the HP Envy 4500 to use in a hotel room, where WiFi access to the Internet requires posting an email address on a web page, as a part of the access process. How do I get that web page on the display of my printer in order to find the box on the web page where I put in the email address ?

    Hi,
    You need to connect your printer to the internet to be able to send an email to its email address. In this case, the hotel won't let the printer to connect to its network (you can't fill out a form to be able to gain access). Please check the following manual (page #19) to setup an ad hoc network:
       http://h10032.www1.hp.com/ctg/Manual/c00389927.pdf
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Accessing the Oracle messenger through the web page

    I don't know this is the right forum to ask about the doubt on Oracle Messenger .
    I want to invoke a messenger chat window by clicking on a link in the web page .
    In AOL it is possible using the link
    Suneesh
    Clicking on the link the chat window to suneesh will open .
    Similarly can I invoke the Oracle messenger chat window ??
    Thanks,
    Suneesh

    The link is href=aim:goim?screenname=suneesh
    Thanks
    Suneesh

  • Firefox suddenly not loading several web pages properly

    I've had Firefox 4 since the release date, but today it's been acting up - it's not loading certain webpages properly, removing all the formatting and just putting all the text/links/etc in a list along the left hand side of the window. It's also not showing some pictures at all any more, although they're all hosted on Photobucket. This is literally ther first time there's been a problem with it since updating, and I've not changed any settings on it at all, so I have no clue why it's suddenly broken. Is anyone else getting this?

    Same issue for me suddenly began this morning (yesterday all was fine) - it's not that images aren't loading, it's quirky code errors. In some cases, CTRL-F5 fixes it... but, in others, it does not (e.g. Facebook only loads the most recent couple dozen status updates - clicking the link for more does nothing; I also did a daily check of fares on SW Airlines website - code for the reservation window won't load, and when I try manually typing it the info isn't accepted).
    My short-term solution is to go back to IE8 - not happy about it, but at least all of the web pages I visit are properly working.

  • To retrieve a query result in to OAF page

    I am newbee...........
    i have an urgent requirement
    *"+TO GET THE RESULT OF QUERY+"* FROM MY DATABASE IN TO MSG TEXT INPUT
    item in my page
    any sort of help is appreciated
    thanx in advance......
    DEV
    Edited by: Dev586 on Jan 9, 2013 12:29 PM

    Hi,
    try {
    String result = null;
    ResultSet resultset = null;
    PreparedStatement stmt = null;
    Connection conn = am.getOADBTransaction().getJdbcConnection();
    String qry = "select count(employees) INDIANS from employee where empcountry='INDIA'";
    stmt = conn.prepareStatement(qry);
    resultset = stmt.executeQuery();
    if (resultset != null) {
    while (resultset.next()) {
    if (resultset.getString(1) != null) {
    result = resultset.getString(1);
    } catch (Exception e) {
    e.printStackTrace();
    This will give you the output in variable 'result'.
    Now you can set its value to the text input field.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • ASA CX - allows traffic through but web page cannot be loaded

    Hello there,
    I am having this strange issue with the HTTP traffic passing through the firewall. There is no any policies configured on the CX module for web or application filtering however when I reload the CX module or simply put in in "monitor-only" , the traffic is being allowed through the firewall. Also reading the CX events it looks like the traffic is passing through fine. Attaching the screenshot.
    The ASA5512-X is runing 9.1.3 software and I am running the tests with the IPSec VPN client as I am not on client's site (all the traffic goes through the FW, no split-tunnel). Once on VPN and accesing a website which initially runs on HTTPS and opens fine, then there are some URLs inside this website and look like they redirect to HTTP and come back to HTTPS (strangly designed portal but needed for production), on the PC I get a security warning of the information not being encrypted. When trying to open one of those URLs and after accpeting the security warning the website looks like keeps loading and loading but nothing happens, and when I disconnect from the VPN this URL opens instaltnly.
    On the Wireshark I find this starnge error: [Reassembly error, protocol TCP: New fragment overlaps old data (retransmission?)] and this is sent from my PC IP address, not the server. Attached the conversation betwwen my PC and the web server from Wireshark.
    What do you think it maybe happening? I need some guidance on analysis of the packet capture and figure out what config on the FW could be blocking those HTTP requests. I desperate to fix this issues and already having few days trying to resolve it.
    Thanks very much in advance.
    Remi

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • "." and "," interchanged in a Query  result displayed on Web

    Hi,
    I am facing a peculiar problem. The amount column in the Analyzer shows the values for example <b><u>$ 33,572.00</u></b> (Ten Thousand). But when I launch the query in web, it is displaying the same as <b><u>$ 33.572,00</u></b>.
    How do I resolve this? Please help.
    Regards,
    Sam

    Thank you so much Pradhibha. Resolved and points given too!!!

  • Paged query results in a JSP page

    Hi All,
    I have a requirement to display only a small number of records (say 50) in a JSP page at a time from a database query that returns more than 10,000 records. For accessing all the other records I have to provide links from the same page. I should be able to go to the first, last, next & previous sets of records at any time. Database is Oracle and the table I am using to query doesn't have a serial number column. Any easy way? Thanks Raj

    Hi Raj,
    There are two ways to handle it.
    One is to fetch the entire set of record from the Database and store the details in a Container which has session level context. But if the fetched size is higher then Session cannot hold that much amount of data.
    Alternatively you can go about fetching fixed chunks of data from the
    Database(preferably of size 50 to 100). This can be achieved using SQL queries. I have done this and seems to work pefectly in situations where large data available in Database has to be displayed pagewise to the users. (U will find the query in AskTom site of Oracle Corporation).
    Please revert back if any further help is needed in this regard.
    Ilamparithi

  • Printing a web page results in several pages when it should only be one page. How to adjust?

    When I try to print a web page, the result is several partial pages. I've tried to adjust the scaling, but nothing seems to work. Where do I go to make this type of adjustment?

    Three possible causes. <br />
    1. The page is made with Frames and each Frame is printing separately. If you right click the page you would see a menu item for '''This Frame ''', if that page has Frames. You'll see that on this test page. <br />http://www.draac.com/framestest.html
    2. A wide page margin setting. You might be able to see that in Page Setup > Margins/Header&Footer, but some printers manage to get weird settings that don't show up there. When you look in about:config these prefs are way off <br />print.printer_''printer-name''_Printer.print_margin_left <br />and<br /> print.printer_''printer-name''_Printer.print_margin_right
    3. A non-standard '''Paper Size''' is set in Properties for that printer as viewed through Firefox. Might set to Custom or to a Photo size.
    See this section of support article hyperlinked by SafeBrowser. <br />
    http://kb.mozillazine.org/Problems_printing_web_pages#Prints_to_a_small_portion_of_the_page
    For #2 and 3, doing a reset should solve it. Do the ''''reset''''' as described here: <br />
    http://kb.mozillazine.org/Problems_printing_web_pages#Reset_printer <br />
    Make sure you reset all the prefs for that particular printer.

  • How do I break up a result set over various pages?

    I would like some example code of how to breakup a result set that I am using in a form.
    There are too many results for the form to currently work properly on one page so I have to do it over several web pages, using a next page link etc...
    I am currently using servlets.
    If anyone has an idea of how to do this differently have at it and let me know what to do. I prefer code examples.

    I would change the select query so that it doesn't return the whole resultset. Check your database manual to see if your database supports something like limit. E.g. this query will only return the 20 first records if you are using mysql.
    select *
    from tablename
    limit 0,20
    Kaj

Maybe you are looking for

  • New iPod Touch 5th Gen- iOS 7.0.6 major battery drain.

    iPod Touch 5th Gen, 32GB Have all the major known drainers off: such as Reduce Motion, Location Services, Notifications, Bluetooth, etc. Was at 100% this a.m. Usage: 2 hours, 9 minutes Standby Mode: 11 hours, 45 minutes. It was at 65% 4 minutes ago.

  • Unsubscribe from My Nokia

    I want to unsubscribe from My Nokia. Each time I click on unsubscribing, a message pops up "Unsubscribe from My Nokia mobile communications?". I click on Accept, message comes "Unfortunately your unsubscribe message could not be sent. See My Nokia in

  • An interview on security for Web services

    In a recent interview with SDN, Sun technical product manager Sidharth Mishra answers these questions: What are web services and why are the data they transmit highly insecure? How do you protect the data interactions? What role does OpenSSO play? Se

  • What needs to be on the boot drive?

    My dual 2 GHz G5 has two Maxtor 160 GB internal drives (model 6B160M0 to be exact). As my boot drive gets fuller (it's now 60% full), everything appears to slow down. I'm thinking about paring down what's on the boot drive, and moving everything else

  • What printer/fax/scanner is best from HP?

    mainly to be used as a color scanner and to print coupons.