Retaining resulset object for later use

i have 2 jsp pages.. testpaper.jsp and solutions.jsp.
In testpaper.jsp, i fetch random rows of a table and build a form dynamically and
display it(it contains questions ,4 options and correct answer made hidden.)
when user submits this form, it is forwarded to solutions.jsp, here i want to display
solutions to questions he attempted, so i want to retain my resultset object,
How to do this...??

Map it to a collection and store it in session.
I hope that you realize that you should always, always, close the connection, statement and resultset immediately after processing them? You should also know that it is an utter bad practice to have JDBC logic in JSP files, let alone raw Java code. It belongs in Java classes. Look up the DAO pattern and apply it.

Similar Messages

  • How do I make groups for texting multiple people at a time and retain that group for future use?

    How do I make goups, in Contacts, for texting multiple people at a time and retain that group for future use?

    How do I make goups, in Contacts, for texting multiple people at a time and retain that group for future use?

  • Best method for timestamping? (for later use with perl script)

    What is the best method that I can use to timestamp events in Linux for later use with perl script?
    I am performing some energy measurements.. where I am running several tasks separated by 20 secs in between. Before I start any execution of tasks, I always place initial delay for me to start the script and start the measurement device.
    My problem is that I don't know how long is that first delay exactly. So to solve this, I thought I could use date commands to time stamp all tasks.. or at least to timestamp first dela.
    Here is example of what I am doing:
    1st delay
    task 1
    20s
    task 2
    20s
    task 3..... etc
    What would be the best to use?

    logger.
    It posts messages straight to the system log.  You can see the message, in all its glory using tools like journalctl.  You will see the message, the date, time, host name, user name, and the PID of logger when it ran.

  • Where are mobile Illustrator draw files stored for later use in Desktop Illustrator?

    Hello,
    who can tell me, where Mobile Illustrator draw vector files are stored for later use in Desktop Illustrator? In the cloud there are only .png and .jpg files. The Files are sent immediately to the desktop software, but when I want to use them later, I cannot find them anymore.

    What exactly are your steps?
    Create new file in Draw
    Draw something
    Send to Illustrator
    ... and then? Does Illustrator open on the desktop? What do you do with the Draw file?

  • Is it possible to save a Photoshop project with multiple tabs (inducing images) for later use. Now, when I close Photoshop, it ask to save each tab separately and they are not staying in the project for later usage. Thanks in advance for you help.

    Is it possible to save a Photoshop project with multiple tabs (inducing images) for later use. Now, when I close Photoshop, it ask to save each tab separately and they are not staying in the project for later usage. Thanks in advance for you help.

    You should ask in Photoshop General Discussion
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • XML parsing (KXml) - how to save parser's position for later use?

    Hello.
    I am parsing an xml file using KXmlParser and i want to keep the position of the parser for later use so i can continue from that same position.
    int eventType = parser.getEventType();
            if (coupletForm!=null) {
                coupletForm.deleteAll();
            while (eventType != KXmlParser.END_DOCUMENT) {
                if (eventType == KXmlParser.START_TAG ){
                    String element_name = parser.getName();
                    if (element_name.equals("couplet")) {
                        coupletForm = new Form("Couplet 1");
                    else if (element_name.equals("lead_one")) {
                        while (eventType != KXmlParser.TEXT || (eventType == KXmlParser.TEXT && parser.isWhitespace()) ){
                            eventType = parser.next();
                        //Now reached <description> element
                        coupletOptions = null;
                        coupletOptions = new ChoiceGroup("Choose lead:", Choice.EXCLUSIVE);
                        coupletOptions.append(parser.getText(), null);
                        parser_stack.push(parser);
                    else if (element_name.equals("lead_two")) {
                        while (eventType != KXmlParser.TEXT || (eventType == KXmlParser.TEXT && parser.isWhitespace()) ){
                            eventType = parser.next();
                       //Now reached <description> element
                        coupletOptions.append(parser.getText(), null);                  
                        coupletForm.append(coupletOptions);                  
                        parser_stack.push(parser);
                        coupletForm.addCommand(CMD_NEXT);
                        coupletForm.setCommandListener(this);
                        display.setCurrent(coupletForm);
                        break;
                eventType = parser.next();
        }What i am doing here is parsing the xml file. When the parser finds an element with name <lead_one> it continues parsing until it finds the next element (<description>) and then creates a ChoiceGroup with the first option as the text found in the next element. I want to keep this position of the parser. The parser then continues until it finds element <lead_two> and does the same thing as <lead_one>. I want to save the positions of the parser when it stops at the <description> element. I am trying to do this using a stack, but this doesn't work.

    If you want to select nodes based on changing criteria, you should use XPath.
    If you have relatively fixed criteria, iterate over the nodes and pick out the ones that you want. For example:
      public static List<Element> getChildren(Element parent, String tagname) {
        List<Element> result = new ArrayList<Element>();
        NodeList children = parent.getChildNodes();
        for (int ii = 0 ; ii < children.getLength() ; ii++) {
          Node child = children.item(ii);
          if ((child.getNodeType() == Node.ELEMENT_NODE) && tagname.equals(child.getNodeName()) {
            result.add((Element)child);
        return result;
      }

  • How to continuous​ly do AOAI and buffer the data for later use?

    Is there a way to do simultaneous AI and AO and keep the data in the buffer until I am finished with reading, then read the buffer and save the data to disc. I want to acquire 1000 scans on up to 10 chanels at 10 000 Scans/s, while generating one output signal.
    I have seen plenty of continuous AIAO examples, but all they do is show the data. I don't mind not viewing the data, all I want is to hold it for later analysis, while avoiding writing to disc as I fear this will slow the process too much. Or would a different approach than simultaneous AIAO be more appropriate?
    I am using LabView 6.1 with 6024E DAQ card on a P-IV 1.5GHz.

    Use this vi MainProg.vi in the llb
    i use a same engine to acquire at 2 MS/s and generate at 3 MS/s
    "Fil" a ?crit dans le message de news:
    506500000008000000C8620000-1031838699000@exchange.​ni.com...
    > Is there a way to do simultaneous AI and AO and keep the data in the
    > buffer until I am finished with reading, then read the buffer and save
    > the data to disc. I want to acquire 1000 scans on up to 10 chanels at
    > 10 000 Scans/s, while generating one output signal.
    > I have seen plenty of continuous AIAO examples, but all they do is
    > show the data. I don't mind not viewing the data, all I want is to
    > hold it for later analysis, while avoiding writing to disc as I fear
    > this will slow the process too much. Or would a different appro
    ach
    > than simultaneous AIAO be more appropriate?
    > I am using LabView 6.1 with 6024E DAQ card on a P-IV 1.5GHz.
    [Attachment 4x10KSps to Disk& generate AO.llb, see below]
    Attachments:
    4x10KSps_to_Disk&_generate_AO.llb ‏128 KB

  • Archiving to DVD, but want it for later use

    Hi,
    I have read a number of posts about archiving footage, but either I am daft or my specific concerns haven't quite been answered.
    I have a number of short clips (20-25 minutes) that have filled up my hard drive. They are all above DVD storage limitations, but I need to take them off. However, I am not totally done with them. I may want to re-edit some of them later.
    The other posts seem to suggest my only options are re-exporting them to tape or getting an external hard drive.
    Is there no other way?

    What other way are you looking for???
    Back up methods:
    1) Back up tape drives. Most reliable, extremely cost ineffective for individual use.
    2) Back up video to miniDV tape. Best option to archive video material. Cost effective but time consuming.
    3) Use hard drives. Depending on the frequency of needing hard drives, purchasing a hot swappable case can be beneficial. Hard drives are inexpensive per GB, the fastest of all options, and fairly reliable.
    4) Optical Media. The least reliable of the back up options. Time consuming sorting and burning media. Cost per GB is comparable to hard drives but seems less expensive as you can by a spindle of 20 discs for less than a hard drive.
    If there is another back up option, I don't know of it!
    Mike

  • How can I save a named filter and sorting for later use?

    I regularly do several different complex filtering and sorting on large tables. I did not find a way to save them for later one-click reuse. So I always have to do it again, which is time-consuming and error-prone. Hoped to get a solution by AppleScript, but filter and sort is not accessible by scripting.
    Is there a way or does Apple have it on it´s agenda for future versions of Numbers? 

    Hi Jan,
    filter and sort is not accessible by scripting.
    There is some support for sort (and less for filter) in Numbers 3.
    Table has a filtered property.
    And you can sort.
    A sort example can be found at https://iworkautomation.com/numbers/table-sort.html.
    Not sure if this will be sufficient to handle your needs, but just wanted to point out there is some scripting support.
    SG

  • Retain place in document for later use

    Hi Everyone,
    Is it possible to keep your spot in Adobe Reader 9.0? Every time I close the program after reading a document. I have to search the document to find my place. Microsoft Reader already has this function. If this is also in Adobe. Could someone please tell how to enable it.
    Thank you for your attention to my question.

    Hi(Bonjour)!
    Why using iTune? Save as suggested by Tom and store the file in a dedicated folder in your document folder. The file will be playable by quicktime player.
    Michel Boissonneault

  • How can I save a clip for later use?

    When I am editing a project and going through my footage I often find a short clip that I'd like to use maybe later in the timeline or possibly to use in a different project. How can I do that?
    This may be obvious but I want to rename and save that clip somewhere (I'm assuming the event library) so do I have to create a new clip from the original and save it or what?
    Again, sorry of this is basic but its these litle things that seem to be the hardest to find out but make the biggest difference to the workflow and editing speed.
    Cheers

    If this is a one-off thing, mark the clip as a Favorite.
    http://help.apple.com/finalcutpro/mac/10.0.6/#ver30ccd91f
    If you have a volume clips that you notice would be good for a particular purpose later, mark them with a keyword.
    http://help.apple.com/finalcutpro/mac/10.0.6/#ver68416335
    Then create a Smart Collection that contains clips with your keyword.
    http://help.apple.com/finalcutpro/mac/10.0.6/#ver7a77eb6c

  • Want to read a Query list of results into a defined variable "as Collection" for later use (ie create reports)

    The following code works great (Functions Main and OpenThisFile ) to select files from a folder and read into defined variable "FileToProcess As Collection" (I guess then renamed fil) and use that list of files to run through
    an import process defined in a function "StartMe". 
    What I want to do is read the results of a query into a similar collection variable and then use in a function like "StartMe" to run a series of reports.  The functions to do that below (PrintCKListTables and ReadQueryOfSDGs) currently
    don't work erring out "For Each s In .selectedQuery".  I would appreciate any help guiding me how to fix function
          ReadQueryOfSDGs() As Collection
    Thank you very much in advance for your help!
    Public Function Main()
    Dim FilesToProcess As Collection, fil
    Dim initialFilePath As String
    initialFilePath = CreateObject("WScript.Shell").specialfolders("C:\temp")
    Set FilesToProcess = OpenThisFile(initialFilePath)
    For Each fil In FilesToProcess
    StartMe fil
    Next fil
    End Function
    Public Function OpenThisFile(initialFilePath As String) As Collection
    'Requires reference to Microsoft Office 12.0 Object Library.
    Dim fDialog As Office.FileDialog
    Dim varFile As Variant
    'Clear listbox contents.
    'Me.FileList.RowSource = ""
    'Set up the File Dialog.
    Set fDialog = Application.FileDialog(msoFileDialogFilePicker)
    With fDialog
    'Allow user to make multiple selections in dialog box.
    .AllowMultiSelect = True
    .InitialFileName = initialFilePath
    'Set the title of the dialog box.
    .Title = "Please select one or more files"
    'Clear out the current filters, and add our own.
    .Filters.Clear
    .Filters.Add "XML Files", "*.XML"
    'Show the dialog box. If the .Show method returns True, the
    'user picked at least one file. If the .Show method returns
    'False, the user clicked Cancel.
    If .Show = True Then
    'Loop through each file selected and add it to the list box.
    Dim s
    Set OpenThisFile = New Collection
    For Each s In .SelectedItems
    OpenThisFile.Add s
    Next s
    Else
    MsgBox "You clicked Cancel in the file dialog box."
    NotContinue = True
    End If
    End With
    End Function
    Public Function PrintCkListTables()
        Dim FilesToProcess As Collection, fil
        Dim ListSDGs As String
        Set FilesToProcess = ReadQueryOfSDGs(ListSDGs)
        For Each fil In FilesToProcess
            fNameExportpdfReport (fil)
        Next fil
    End FunctionPublic Function ReadQueryOfSDGs() As Collection       DoCmd.OpenQuery "y_qs_DataIn_All_SDGList"
           Dim s
           Set ReadQueryOfSDGs = New Collection
           For Each s In .selectedQuery
           ReadQueryOfSDGs.Add s
           Next s
    End Function

    There are a few problems here. In function PrintCkListTables() you define a string variable ListSDGs and then use that as an argument to the function ReadQueryOfSDGs(), but ReadQueryOfSDGs() as written does not accept any arguments.  It's also not clear
    what ListSDGs represents...a list of files, names of queries? Also, the line
    For Each s In .selectedQuery in
    ReadQueryOfSDGs()
    references something called .selectedQuery which is undefined. 
    Is it that you want ReadQueryOfSDGs() to loop through the records returned by a query and add a field from each record to a collection?  If so, something like the following might better serve you:
    Public Function ReadQueryOfSDGs() As Collection
        Dim C As New Collection
        Dim rst As DAO.Recordset
        Set rst = DBEngine(0)(0).OpenRecordset("y_qs_DataIn_All_SDGList", dbOpenForwardOnly, dbReadOnly)
        Do Until rst.EOF
            C.Add rst!MyField ' where MyField is the field in y_qs_DataIn_All_SDGList you want to add to your collection
            rst.MoveNext
        Loop
        rst.Close
        Set rst = Nothing
        Set ReadQueryOfSDGs = C
    End Function

  • How can i cut down the video's i've shot to only have the best parts in them for later use

    first thing I was wondering was. I upgraded to the premiere user to where I have 20mb of storage but I take a lot of spearfishing video's and photo's and the 20mb is just about full. I see I can buy more memory but should I just get a external hard drive to keep all my photo's and video's and if I do that is it easy to get the materials that I need for me to create my new projects in premiere elements or should I just buy more memory. the second thing I was wondering is that I take a lot of spearfishing videos and each dive can be 15min long but only have about 4min of action footage that I actually use. so my question is after I download the video's from my camera can I go through them and extract the good footage and save it like that for me to use at a later date in my projects. it would save a lot of time and a lot of memory to be able to do it this way and if I can how do I go about doing it. thank you for all your help Cory

    "I download the video's from my camera can I go through them and extract the good footage and save it like that for me to use at a later date in my projects."
    This is the very definition of video editing, Cory! That's what the program is designed to do!
    If you need some help with the basics of this program, I've created a free 8-part Basic Training series of tutorials for Premiere Elements support site Muvipix.com. That may be the best place to start.
    http://forums.adobe.com/thread/537685
    The most important step in any project is setting up the project settings to match your source video as precisely as possible. I cover this in part 1, so watch it carefully. I go into greater detail on setting up a project and capturing, editing and outputting video in my books, if you're interested.
    As for Photoshop.com, I'm not sure it's worth buying more than 20 gig of backup space online at this point. You'd be better off investing in a good, large second hard drive for your media and project files. Save the online backup for your finished pieces.

  • How do I store a compound clip for later use or another project?

    I created a compound clip, then lifted it from story line and disabled it, its darkened (invisible doesnt play in the viewer),
    however its space runs as black empty frames when I play over it.
    I want to do 2 things:
    I wanted the footage proceeding it to shift in left to fill that black void and play, as the compound clip is "hidden". Is this possible?
    I also wanted to save that compound clip for use later in this project and possibly in another project, can I save it out as a separate clip set?

    I think I got it, lift the compound clip from storyline by right clicking and choosing "lift from storyline",
    drag the compound clip left or right out of its original position, select the grey slate where it used to be in the time line,  and hit delete. the clips to the right now shift left to fill its void.
    and the compound clip is automatically available in the event library folder its grouped clips originated from but now shown as a compound clip once you create that compound clip..

  • Packaging Business Domain Objects for Shared Use?

    Hi:
    I am trying to figure out how best to package a number of ADF Entity Objects so that they are shared by multiple developers and applications. Reading the JDev documentation it looks like the appropriate method is to create a System Library and place these objects into JAR files in the library. Is this the right approach?
    If so, other questions follow. It looks like 10.1.3 has replaced "system libraries" with "extension libraries". True? Regardless, when I go into Tool -> Manage Libraries and choose <New>, the only type of library that is available to create is a "User" one.
    Any guidance appreciated.
    Johnny Lee

    Thanks, Shay. That was the perfect answer to the second part of my question. Michael's post really is awesome. One of the things we are most looking forward to with the production 10.1.3 release is the completion of the documentation. For future reference, I think it would be useful to separate the release schedule of the help text from the application. The value of clear information is much greater than minor bug fixes or feature enhancements, IMHO.
    But to the first question, it would still be helpful to hear from folks how they are organizing their ADF components. The small version of this question is whether or not packaging entity objects into jar files in external libraries makes sense. Yes/no?
    The larger question (and I admit to showing my inexperience here) has to do with organizing the hierarchical structure of a moderate sized ADF application (Faces & Business Components). We are using CVS as our repository and so far the two developers have been working on separate parts of the application, creating their pieces within JDev and then uploading them into CVS. So CVS has all of these modules that reflect individual JDev projects, but no overall structure of how the different pieces relate to one another. Now we're starting to look at sharing components and it's becoming clear that we need to get a little more organized.
    So, some specific questions (for anyone who would like to respond):
    1) How do you lay out your ADF application source hierarchies?
    2) Do you reflect your package structure within your directory structure?
    3) Where do you maintain your hierarchy? If you use version control, are your repository and working copies the only places you keep your source, or do you maintain an external central directory structure?
    4) Are there things about structuring an ADF Faces/BC application that are different from standard J2EE applications?
    5) Have you found particular posts, articles or examples helpful?
    Thanks.
    Johnny Lee

Maybe you are looking for

  • TIPS/Help--Vocal Mixes

    I am having a horrible time trying to tame my vocals. I am using Shure SM7 with Apogee Duet into iMac 24". I have all my levels crazy low, I'm recording at like -18db to -12 db. In that range, I'm leaving tons of headroom. I usually apply compression

  • New JAVA application with data from SAP CRM and R/3

    Hi All, We have a requirement to create a new application which will have CRM BP Master data and D&B Data from R/3 and based on authorization different roles be able to edit some of the fields and workflows to confirm the new data .Once users edit th

  • Refurbished iBook...no install disks???

    My husband just bought a refurbished 12-inch iBook. Of course, it has all of the standard software loaded on it, but he tells me that he no CDs or any materials with the iBook. Should he have? I'm thinking, so what happens when he has a huge meltdown

  • Entry in table V_156B

    Hello, We want to add an entry in the table V_156B. I tried doing it by SM30 --> it didnt allow me I have checked OMJJ settings, but not sure which is the right one to make this movement type appear in the table. I have searched the configuration for

  • Mail cashing immediatly when logged in as second user.

    I try to create a first time user account in mail for my sister. This is on my brother in law's (BIL) Macbook dualcore. So BIL has his account and sister also Both have admin. rights (?) and BIL uses mail already. When I log in on my sister's desktop