How do I convert a Vector to be passed into the session

Hi I have a vector in a JSP that I need to pass on to a second JSP. I use the following command to do that just as I pass normal other strings:
session.setAttribute("MyVector",vecData);
But the follwoing error is been thrown by Tomcat.
Incompatible type for method. Can't convert void to java.lang.Object.
out.print(session.setAttribute("ResultsSet",set));
^
I guess I have to convert it explicitly into an object and then how do I do that? could someone please help me fast on this?
if this doesn't work is there some other way to send this vector to my other page? I am currently sending enough strings using the above method, but for Vectors it doesn't seem to work though I am told that a session object can carry any object unlike the request object that carries only strings. Please help!!!!

Hi Calin thank you so much for taking ur time to help me with my problem.
well let me explain my requirement fully in detail. JSP1 has a form on it for the user to fill in. its in the form of a table with multiple rows. say as in entering product details one after the other in an invoice.
I want each of these rows taken in and passed into JSP2.
What I do is pack each row of the table into a hashtable using a 'for' loop.
Then I add each record (within the 'for' loop) to a Vector. After the 'for' loop, outside of it, I set this Vector to the session as :
session.setAttribute("RecordSet",vecRecordSet);
Well let me copy paste and extract of the coding from my source which shows what I have done.
Vector set=new Vector();
for (int i=0;i<Integer.parseInt(request.getParameter("NoOfRecords"));i++)
Hashtable Record=new Hashtable();
               Record.put("ReminderStatus",ReminderStatus);
               Record.put("CustomerNo",CustomerNo);
               Record.put("CustomerName",CustomerName);
               Record.put("Address",address);
               Record.put("ContractNo",ContractNo);
               Record.put("MachineID",MachineID);
               Record.put("ModelNo",ModelNo);
               Record.put("Description",description);
               Record.put("SerialNo",SerialNo);
               Record.put("ContractValue",ContractValue);
               Record.put("NoOfServices",NoOfServices);
               Record.put("ContractStartDate",ContractStartDate);
               Record.put("ContractEndDate",ContractEndDate);               set.add(Record);
     session.setAttribute("ResultsSet",set);//SHERVEEN
well don't worry about the for loop condition up there cos it works for the main functionality that exists within the for loop. but what seems to go wrong is when I add records to the hashtable and when I pack it to the Vector "set"
I hope I have not done something wrong as a principle over here.
And btw the error that I showed u before, is pointed at a row which exists in the file that is generated when compiled. the out.println part is generated in that file during compilation and I don't know why.
I hope I have given u information for u to make some sense of my requirement and thank u a million once again for ur effort to help me out. I am grateful to all of u.

Similar Messages

  • How can I convert my Open Source document files into Word document files? I cannot download Pages since my Macbook Air does not have the most recent software.

    How can I convert my Open Source document files into Word document files? I cannot download Pages since my Macbook Air does not have the most recent software. I downloaded open office to my mac to try and save money. It worked well for a while. Now I get this pop-up message that asks me to "Reopen" and when I select the option, nothing happens. I cannot save my documents anymore and I cannot convert them to word. Help!

    dwb wrote:
    Does OpenOffice output Word documents by default or do you have to select it manually?
    You have 17 options to save as in Open Office, one of which is .doc  files,  yes it needs to be saved manually.
    You may be able to default to DOC, but have not tried same.
    Since Open Office is 99% same as Word, I use it, or Word, either one.  Open Office is a bit less buggy than Word 11'

  • How can i convert a window media player file into a format playable on ipod

    hey guys can you tell me how can i convert an widdow media player file into a format that can be played on my ipod, i used videora ipod converter but it can't convert the window media player file

    the program you show change wma to mp3, but the mp3 file can't be understanded by the iPod, how can i change a wma file to a format understanded by the Ipod?

  • How do I convert a vcard or Contact group into a textfile?

    how do I convert a vcard or Contact group into a textfile?

    Start to learn about PDF Forms here:
    Acrobat User Community Tutorials

  • How do I convert a very long text message into a multimedia message

    How do I convert a very long text message into a multimedia message

    Well, you didn't mention Mac, but to my knowledge, TouchCopy works on both platforms. And, my understanding of the OP was to send each one individually, whereas WiseJD was referring to selecting them all so you could copy them all and send, rather than emailing each individual piece.
    It wasn't that I thought it was rude, but that it was a complaint about something that someone said a year ago. You did not come here to ask a question, or indicate at all that you were looking for a solution to a similar question. It was just that you came on, slammed a response and left it at that. Those of us that take the time to answer people's questions as volunteers and users just like you. If you spend a great deal of time here, you will see a lot of different types of questions/comments that can get on your nerves. Here is a link for TouchCopy and it does work on both platforms. http://www.wideanglesoftware.com/touchcopy/

  • How can I use a vector image to stretch with the backgrounds in Muse master pages?

    How can I use a vector image to stretch with the backgrounds in Muse master pages?

    Maybe there's a bug.  I think it's only showing it when it wants to because look:

  • How do I convert a Pages file (a form) into another programme like Word or InDesign? I do not have Pages

    how do I convert a Pages file (a form) into another programme like Word or InDesign? I do not have Pages

    In OS X Pages '09 v4.3, do not be tempted to File > Save... copy as Word document. Instead, you want to export (or Share as Mail), both the PDF and the Word Documents.
    If you choose Share > Send as Mail > PDF (and/or Word), make sure that in Apple Mail, that your composition window has Send Windows-Friendly Attachments selected. You can enable this from the paper-clip icon on the Mail composition window toolbar.

  • How do I get iTunes to accept FLAC files into the library?

    If I want to use iTunes to catalog FLAC files (but NOT play them...as I use my logitech Squeezebox fior that) how do I get iTunes to accept FLAC files into the library?

    As polydorus notes, iTunes has the huge shortcoming of not handling FLAC. 
    There are plugins that allow iTunes to play FLAC, but everything I've seen says they are problematic. 
    A much better approach is to get a 3rd party conversion program such as Switch and convert the FLAC files to an iTunes-compatible format such as  AAC or AIFF.
    Put the converted files in your iTunes library, and keep the original FLACs on hand for when you are using a more capable player.

  • How do I go about embedding a jquery plugin into the building process of Adobe Muse?

    How do I go about embedding a jquery plugin into the building process of Adobe Muse?

    Many of the "Edge" fonts offered in Muse for web font use are available as open source fonts from Google or other sites like Font Squirrel. For example, a company may want to use the Exo typeface in their logo. You can use Exo as a web font within a web site created in Muse. For general graphics work, like creating a logo and other branding work, the same typeface can be installed as a system font from the sources I mentioned.
    The newest version of Muse will now allow you to use SVG graphics -a vector-based graphics format for the web. SVG objects can be scaled to any size without showing pixel jaggies. You can create vector-based type objects using any system font in Adobe Illustrator or other similar applications capable of saving SVG. Within Illustrator you can creatively manipulate those type objects, or do subtle things like adjusting letter spacing, then output it as an SVG image. I don't particularly care for the default letter spacing of many web fonts, so SVG is a fairly decent alternative.
    Most new web browsers support SVG properly. Old versions of Internet Explorer (8 and earlier) and some older mobile web browsers don't support SVG without user-installed plug-ins. Those web browsers are disappearing quickly.

  • How can i import tables from a different schema into the existing relational model... to add these tables in the existing model? plss help

    how can i import tables from a different schema into the existing relational model... to add these tables in the existing relational/logical model? plss help
    note; I already have the relational/logical model ready from one schema... and I need to add few more tables to this relational/logical model
    can I import the same way as I did previously??
    but even if I do the same how can I add it in the model?? as the logical model has already been engineered..
    please help ...
    thanks

    Hi,
    Before you start, you should probably take a backup copy of your design (the .dmd file and associated folder), in case the update does not work out as you had hoped.
    You need to use Import > Data Dictionary again, to start the Data Dictionary Import Wizard.
    In step 1 use a suitable database connection that can access the relevant table definitions.
    In step 2 select the schema (or schemas) to import.  The "Import to" field in the lower left part of the main panel allows you to select which existing Relational Model to import into (or to specify that a new Relational Model is to be created).
    In step 3 select the tables to import.  (Note that if there are an Foreign Key constraints between the new tables and any tables you had previously imported, you should also include the previous tables, otherwise the Foreign Key constraints will not be imported.)
    After the import itself has completed, the "Compare Models" dialog is displayed.  This shows the differences between the model being imported and the previous state of the model, and allows you to select which changes are to be applied.
    Just selecting the Merge button should apply all the additions and changes in the new import.
    Having updated your Relational Model, you can then update your Logical Model.  To do this you repeat the "Engineer to Logical Model".  This displays the "Engineer to Logical Model" dialog, which shows the changes which will be applied to the Logical Model, and allows you to select which changes are to be applied.
    Just selecting the Engineer button should apply all the additions and changes.
    I hope this helps you achieve what you want.
    David

  • How do I print pictures from a disc inserted into the Apple Superdrive connected to the 2011 MacBook Air?

    How do i print pictures from a disc inserted into the Apple Superdrive connected to the 2011 MacBook Air by USB port?  Thanks

    How do i import them?  The only place i can find them is on "Finder" and I don't know how to get them to a place where I can print them.

  • If I have a movie on my mac on iTunes how do i get it off my computer and into the iCloud?

    f I have a movie on my mac on iTunes how do i get it off my computer and into the iCloud?

    You don't need to manually put iTunes Store purchases in the cloud. If that purchase can be stored there in your country, it's done so upon purchase. If not, it isn't possible.
    (84039)

  • HT1727 How do i get itunes to recognize music imported into the file structure?

    How do I get iTunes to recognize music imported into the file structure?

    Press Alt or Ctrl+B to reveal the menu bar if needed.
    Use File > Add Folder to Library if you just want to import it.
    If you're trying to relink broken entries in a library with the corresponding media then some more details would help.
    tt2

  • How to store forms fields into the session ?

    Hi All,
    I have to store forms fields into the session.
    I have four forms (htm forms) in four jsps and there are total 25 fields.
    I am inserting all the fields into the database at once while user submit the last form.
    I want to use session to store forms fields.
    So please anybody tell me how to do that.
    Is the following code correct to store the forms fields into
    the sesstion........
    // creating a session
    HttpSession session=request.getSession(true);
    // retrieving form fields
    String name=request.getParameter("customer_name");
    String business=request.getParameter("business");
    String address=request.getParameter("address");
    and so on....
    // store form fields into the session
    session.setAttribute("name",name);
    session.setAttribute("business",business);
    session.setAttribute("address",address);
    and so on....
    and later on get the value as:
    session.getAttribute("name");
    session.getAttribute("business");
    session.getAttribute("address");
    and so on....
    OR
    is there another way to store form fields into the session.
    Please guide and reply with coding.....
    Please answer and help.
    Thanks
    Amitindia

    I don't mean to be an *** but I have no desire to help someone so unwilling to think >>and do. Go through some of these tutorial, do the examples in each and you will be far >>better equipped to ask questions:
    http://www.google.co.za/search?hl=en&q=%2Bjsp+%2Bjavabean+%2Btutorial&b >>tnG=Google+Search&meta=
    I was just asking that if I use the following
    <jsp:useBean id="cart" scope="session" class="session.Carts" />
    <jsp:setProperty name="cart" property="address" value="myaddress" />
    </jsp:useBean>then will I be able to acheive my aim as I have to store form fields into the session and later retreive while user submit the last form.
    Please read my question that I have posted.
    Am I using the right way................or which is the best way to store form fields into the session and later retrieve them.
    please reply
    Thanks
    Amitindia

  • How I can upgrade from Version 10.7.4 into the last version ?

    How I can upgrade from Version 10.7.4 into the last version ?

    If your computer meets the requirements then open App Store, sign in with your Apple ID. Locate Mountain Lion, purchase and download.
    Apple - OS X Mountain Lion - Read the technical specifications.
    Macs that can be upgraded to OS X Mountain Lion
    iMac (Mid 2007 or newer)
    MacBook (Late 2008 Aluminum, or Early 2009 or newer)
    MacBook Pro (Mid/Late 2007 or newer)
    MacBook Air (Late 2008 or newer)
    Mac mini (Early 2009 or newer)
    Mac Pro (Early 2008 or newer)
    Xserve (Early 2009)

Maybe you are looking for