How can I use the same object in the different jsp files?

I am doing a project. I have finished my jave source files and compiled them successfully. And I also wrote a main method to test my classes, they also worked well. Now I am trying to use my jave code in the jsp files. But I meet a problem, in my method of java source file, I can generate a object of a class, and use it in the whole main method. But in the different jsp files, how can I do same thing?
For example, in the .java file,
Vector vl = new Vector();
While ...{
vl.add(...)
In each of my .jsp file I want to do one loop of the above, meanwhile I want to do that in the same object.
I hope you can understand what I mean. Really need your help!

put your object into a session and you can the use it in all the jsps as long as the session is valid. Or you could create a static variable in the class that only creates one instance off an object and then create a static method to return this object.

Similar Messages

  • Hi, we have two iphones with two accounts.  The apple tv automatically syncs with one account to play music from the iphone to apple tv.  How can I use my iphone to do the same?

    Hi, we have two iphones with two accounts.  The apple tv automatically syncs with one account to play music from the iphone to apple tv.  How can I use my iphone to do the same?

    Our experience is a little different, we have different iTunes accounts for different family members, each family member has their own iTunes library on their own mac, each mac uses my Apple ID for homesharing and we are able to play purchased content from each library on the Apple TV.

  • How can i use offline & online database in the same time?

    how can i use offline & online database in the same time?
    my database in another server when the connection true it connect
    but if not does not work
    i wanna make offline database if the server not connected it connect offline then the server is on it alter all data from the offline to the server.

    User, please tell us your Jdev version!
    There is no such functionality build into the framework. The offline data base is only for designing the db, not to have a backup db.
    If you can't connect to the db the application will not work.
    Timo

  • [HELP],875P LSR ,HOW Can I USE 3 Optical Drives in the MoBO?

    I have 1 SATA HDD Drive (Seagate 160G) installed and Have 3  Optical Drives ,Pioneer DVD and Liton CDRW in IDE2 , Plextor CDRW in IDE3 ,but MOBO can't recgnize the PLextor CDRW,WHY???
    NEED HELP!!!!!HOW can I USE these 3  Optical Drives the same time?THANK's LOT!

    Thanks Everybody!
    I changed another IDE Cable and set IDE mode in BIOS : Native , SATA only ,Keep PATA, both channels
    then,
    Everything is OK!
    How silly I am ! I used a bad 80 pin IDE CABLE!

  • How can i use my apple ID with the itune store over my windows laptop

    how can i use my apple ID with the itune store over my windows laptop

    If you don't have iTunes installed on your laptop then you can download and install it from here : http://www.apple.com/itunes/download/
    You can then log into your account on it via the Store > Sign In menu option (on iTunes 11 on a PC you can get the menus to show via control-B) :
    And you can then select the Store on the left-hand sidebar (you can enable the sidebar via control-S), and then browse items in the store and buy them by clickin on their price.

  • How can I use apple gift card in the Philippines . It says it's only applicable in US storefront

    How can I use my gift card in the Philippines  when it says for US Storefront only

    You cannot use that card. iTunes gift cards are only valid in the country of original purchase.

  • TS4148 I have an apple 4 given to me by my cousin from japan but the phone is lock by japan sotfbank, how can i use this phone here in the Philippines network provider? thanks

    I have an apple 4 given to me by my cousin from japan but the phone is lock by japan sotfbank, how can i use this phone here in the Philippines network provider? thanks

    Only the carrier an iPhone was sold as carrier locked with can officially unlock the iPhone. It is my understanding that Softbank in Japan does not unlock iPhones.

  • How can I use SQL to check if the receipt is accounted?

    Dear all:
    How can I use SQL to check if the AR receipt is accounted ? Because there is so many receipts to check, I cannot open it to see the detail one by one.
    My environment is :11.5.9
    database : Oracle 9.2.0.8

    Duplicate post.
    How can I use SQL to check if the receipt is accounted?
    Re: How can I use SQL to check if the receipt is accounted?

  • How can we assign sproxy generated objects to a different package?

    Hello Expert,
    We need to change the package assigment of sproxy generated DDIC objects. How can we assign sproxy generated objects to a different package?
    Regards,
    Thulasi

    Any idea?

  • How can we  use java variable in javascript code on JSP page?

    How can we use java variable in javascript code on JSP page?
    Pls help

    Think about it:
    JSP/Java is executed on the Server and produces HTML+JavaScript.
    Then that HTML+JavaScript is transfered to the client. The client now interpretes the HTML+JavaScript.
    Obviously there's no way to access a Java variable directly from JavaScript.
    What you can do, however, is write out some JavaScript that creates a JavaScript variable containing the value of your Java variable.

  • How can I use "write to spreadsheet" during the data is taking but not the end of all the loops

    Hi,
    I have to run an experiment on Labview 6 or 5. I don't have Labview 7 on that computer for some reason. My experiment is talking about 1000 hours, and I have a probelm on storing the data. Right now I am using "Write to spread sheet" and I set the "append" to false. And the data is installed at the end of the experiment, that means after 1000 hours. In the mean time if somthing oges wrong like power cut or what, I will lose all the data. So what I want to do is to save the data evertime when the data is took. I tired to set the "append" to true, but it does not let me to choose the "file path"--- when I choose this and select write on new or excisting file, it said" you may not be able to save on a exciting file" and it does not let me create a new file either. If anyone have the lidea like how can I use the "wrtie to spreadsheet" function and at the same time can install the data everytime inside the look, please let me know. Thanks alot.
    KL

    KL,
    It sounds like you want to periodically save your data so it is in smaller files. (great idea) For this operation you will not want to append the data...if something happens to your system while the file is open it could become corrupt and ruin all the data. You need to write the new block of data to a new file every time. Now...this depends on how big your data is...if you only have like 500k of data to write in a block you should probably write several blocks before starting a new file. I don't know enough about how much data you are acquiring. In either case...the write to spreadsheet file.vi will need a different name each time it is called and you will not want to append. Append = false.
    -Brett

  • How can I use excel and word on the IPAD2

    How can I use excel and word documents on my Ipad 2

    There are apps such as Documents To Go which support reading/editting/creating those sorts of documents :
    standard version  -  http://itunes.apple.com/us/app/documents-to-go-office-suite/id317117961?mt=8
    premium version  -  http://itunes.apple.com/us/app/documents-to-go-premium-office/id317107309?mt=8

  • How can I use a wireless printer and the internet at the same time?

    Hi there, I just installed a wireless printer but to use it I have to click on the Airport icon and select the printer in the 'devices' list. This deselects my connection to my wireless modem. Is there any way I can print and look at the internet at the same time? This does not seem right to me, I print a lot of info from the net and don't want to spend time selecting and waiting for connection back and forth all the time.
    Bo

    I have a Linksys WAG54G2 wireless G router. This router has a Wireless Protected Setup button which I understood would initiate a search for wireless devices and aid setup but it seems to do nothing. I made the mistake of tryig to use the linksys installation disk to access a setup wizard and that just reset my entire network back to factory settings and it took me 4 hours to reconfig my system. Won't be touching that again. It all seems odd, the printer is compatible with the router as far as I can see but I don't know how to get the router to recognise the printer.
    bo

  • How can i use a component twice in the same movie clip

    Excuse me am a beginner in this as2
    below is the script used:
    PeelIt is a component.
    /////////////////////////////////////////////////1st frame contains the below:
    PeelIt._visible = false;
    PeelIt.init();
    PeelIt.Peel();
    ///////////////////////////////////////////////// then on 2 different buttons:
    on (release){
        this._parent.PeelIt._visible = true;
        this._parent.PeelIt.Stick();
    and
    on (release){
        this._parent.PeelIt.Peel();
    1st problem: i need this component to work when the swf loads instead of (on release),
    2nd problem: i need to introduce several frames with different movieclips using the component, how can i do so.
    thank you

    use:
    PeelIt.init();
    PeelIt.Peel();PeelIt._visible = true;
    PeelIt.Stick();
    PeelIt.Peel();
    and just add the component to each movieclip.

  • How can i use two iPads to play a different AU-Instrument for each Pad at the same time via WLAN?

    We have two iPads connected to the MacBook with two different Midi-Sessions. Now we want to connect the every Session to a single AU-Instrument to record live but don´t get it right. In Cubase we just had to choose the Sessions as Midi-Input.
    (Sorry for bad englisch )
    cheers

    Your second post differs form your first, in the first post you said "single AU instrument", in this last post you said "separate synths".  I'll address the second post.
    It's a bit more difficult in Logic than Cubase which has an updated more modern MIDI system.
    The iPad MIDI software will need to transmit on separate MIDI channels for each iPad.
    example:
    iPad #1 MIDI channel 1
    iPad #2 MIDI channel 2 ...etc, doesn't matter which channels as long as they're separate.
    Boot Logic:
    Go to Settings/Recording and select  "Auto Demix by Channel if Multitrack Recording"
    Now setup your AU tracks, select separate channels in the inspector, the channels must match the transmit channels on the iPod.
    You used to have to record enable the tracks, I don't believe that is necessary now.

Maybe you are looking for

  • Reading attachments in the calendar

    Hi, I have a question; I am working as an executive assistant and one of my duties is to organize a very busy calendar for the CEO. I always put the attachments in his calendar for him to pick up to pre read etc, althoug they never show up in the iPh

  • Outlook 2013 cached mode "mail to keep offline" - does this setting affect archive mailbox or Office 365 hosted archive mailbox?

    I have an Exchange 2013 Hybrid environment with Exchange 2007 in coexistance mode as well as Office 365. We are hosting the majority of our Exchange accounts on-premise (migrating them from 2007), and most (soon to be ALL) Archive mailboxes in Office

  • Quick time not up to date

    can not download or even open itunes show error that quicktime is not up to date when i try to up date quicktime it says not update is needed HELP HELP !!!!! bizzynme

  • F.81 Error

    Hi Guys, When I am doing the Accrual Reversal in F.81 I am getting the following error " VL 476: Item 'Official Doc. Number' is not copied from the reference document ". I have maintained the number ranges also. I am not able to understand why the sy

  • Count() function taking ages

    I have a table with 6 million records. Whenever I run select count(row_id) from S_EVT_ACT, it takes 7 mintues to execute!! I have a colleague whose table with 5.5 million records returns in 30 secs. he claims that he hasnt done anytihng to optimize t