JSP-can i reuse the instance of a bean in another .jsp file

am having a bean like clsStudent and i have used the usebean tag and setproperty to set all the values of the same bean. then i want to access the contents in the instane of clsStudent in another .JSP file.

That doesn't sound like you're doing it right. Beans, like any java class, are actually defined in Java, and class files placed in the WEB-INF directory (By the way class names should be capitalised).
JSPs shouldn't be populating beans, they should be generating HTML based on them. If you're loading form data into a bean use a servlet.
That said there's no problem referencing beans in multiple JSPs, but you have to pay attention to how the actual reference gets into the JSP. This is done through "scope" on useBean. Generally a Servlet builds a bean and places it into the request attributes, then forwards to a JSP to format the HTML.

Similar Messages

  • Can not access the Instance Data of a Singleton class from MBean

    I am working against the deadline and i am sweating now. From past few days i have been working on a problem and now its the time to shout out.
    I have an application (let's call it "APP") and i have a "PerformanceStatistics" MBean written for APP. I also have a Singleton Data class (let's call it "SDATA") which provides some data for the MBean to access and calculate some application runtime stuff. Thus during the application startup and then in the application lifecysle, i will be adding data to the SDATA instance.So, this SDATA instance always has the data.
    Now, the problem is that i am not able to access any of the data or data structures from the PerformanceStatistics MBean. if i check the data structures when i am adding the data, all the structures contains data. But when i call this singleton instance from the MBean, am kind of having the empty data.
    Can anyone explain or have hints on what's happening ? Any help will be appreciated.
    I tried all sorts of DATA class being final and all methods being synchronized, static, ect.,, just to make sure. But no luck till now.
    Another unfortunate thing is that, i some times get different "ServicePerformanceData " instances (i.e. when i print the ServicePerformanceData.getInstance() they are different at different times). Not sure whats happening. I am running this application in WebLogic server and using the JConsole.
    Please see the detailed problem at @ http://stackoverflow.com/questions/1151117/can-not-access-the-instance-data-of-a-singleton-class-from-mbean
    I see related problems but no real solutions. Appreciate if anyone can throw in ideas.
    http://www.velocityreviews.com/forums/t135852-rmi-singletons-and-multiple-classloaders-in-weblogic.html
    http://www.theserverside.com/discussions/thread.tss?thread_id=12194
    http://www.jguru.com/faq/view.jsp?EID=1051835
    Thanks,
    Krishna

    I am working against the deadline and i am sweating now. From past few days i have been working on a problem and now its the time to shout out.
    I have an application (let's call it "APP") and i have a "PerformanceStatistics" MBean written for APP. I also have a Singleton Data class (let's call it "SDATA") which provides some data for the MBean to access and calculate some application runtime stuff. Thus during the application startup and then in the application lifecysle, i will be adding data to the SDATA instance.So, this SDATA instance always has the data.
    Now, the problem is that i am not able to access any of the data or data structures from the PerformanceStatistics MBean. if i check the data structures when i am adding the data, all the structures contains data. But when i call this singleton instance from the MBean, am kind of having the empty data.
    Can anyone explain or have hints on what's happening ? Any help will be appreciated.
    I tried all sorts of DATA class being final and all methods being synchronized, static, ect.,, just to make sure. But no luck till now.
    Another unfortunate thing is that, i some times get different "ServicePerformanceData " instances (i.e. when i print the ServicePerformanceData.getInstance() they are different at different times). Not sure whats happening. I am running this application in WebLogic server and using the JConsole.
    Please see the detailed problem at @ http://stackoverflow.com/questions/1151117/can-not-access-the-instance-data-of-a-singleton-class-from-mbean
    I see related problems but no real solutions. Appreciate if anyone can throw in ideas.
    http://www.velocityreviews.com/forums/t135852-rmi-singletons-and-multiple-classloaders-in-weblogic.html
    http://www.theserverside.com/discussions/thread.tss?thread_id=12194
    http://www.jguru.com/faq/view.jsp?EID=1051835
    Thanks,
    Krishna

  • How can I reuse the BC4J database connection?

    How can I reuse the BC4J database connection?
    I want to use the application module connection without opening another in a custom code. At this level I can’t access de ADF code, that’s why I can’t get the DBConnection from the application module.
    Now, I have a “data-sources.xml” in my project and the application module is configured to access the database from this xml file.

    I found the solution in other Forum. I worked ok.
    Here the code:
    If the Connections-Navigator connection is DBConnection1, the corresponding datasource is jdbc/DBConnection1DS.
    1. Create a JSP page.
    2. In the web.xml of the JSP add
    <resource-ref>
    <res-ref-name>jdbc/DBConnection1DS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    3. In the JSP page obtain a connection with the datasource.
    InitialContext initialContext = new InitialContext();
    javax.sql.DataSource ds = (javax.sql.DataSource)initialContext.lookup("java:comp/env/jdbc/DBConnection1DS");
    java.sql.Connection conn = ds.getConnection();

  • I can not install the newest version of iTunes because of a file that can not be found. This is what I am seeing:(The feature you are trying to use is on a network resource that is unavailable. C:\......\Application Data\Apple\Apple Software Update\

    I can not install the newest version of iTunes because of a file that can not be found. This is what I am seeing:(The feature you are trying to use is on a network resource that is unavailable. C:\Documents and Settings\Aubrie\Local Settings\Application Data\Apple\Apple Software Update\)

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page).
    http://majorgeeks.com/download.php?det=4459
    Here's a screenshot showing the particular links on the page that you should be clicking:
    After clicking one of the circled links, you should be taken to another page, and after a few seconds you should see a download dialog appear for the msicuu2.exe file. Here's a screenshot of what it looks like for me in Firefox:
    Choose to Save the file. If the dialog box does not appear for you, click the link on the page that says "CLICK HERE IF IT DOES NOT". Here's a screenshot of the page with the relevant link circled:
    When the dialog appears, choose to save the file.
    (2) Go to the Downloads area for your Web browser. Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • How can you move the objects from one server to another?

    how can you move the objects from one server to another?

    Hi,
    Collecting objects for Transporting
    1. rsa1->transport connection
    2. left panel choose 'object type', middle panel choose 'infocube' and 'select objects'
    3. then choose your infocube and 'transfer'
    4. will go to right panel, choose collection mode 'manual' and grouping only 'necessary objects'
    5. after objects collection finished, create request
    6. If they are $TMP, then change the package.
    7. When you click the Save on the change package, it will prompt for transport. Here you can provide an existing open transport request number, or if you like here itself you can create a new one.
    8. You can check the request in SE09 to confirm.
    Releasing Transport Request  
    Lets say you are transporting from BWD to BWQ
    Step 1: In BWD go to TCode SE10
    Step 2: Find the request and release it (Truck Icon or option can be found by right click on request #)
    Note: First release the child request and then the parent request
    Steps below are to import transport (generally done by basis )
    Step 1: In BWQ go to Tcode STMS
    Step 2: Click on Import queue button
    Step 3: Double Click on the line which says BWQ (or the system into which transport has to be imported)
    Step 4: Click on refresh button
    Step 5: High light the trasnport request and import it (using the truck icon)
    Transport
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b5/1d733b73a8f706e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/0b/5ee7377a98c17fe10000009b38f842/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/224381ad-0701-0010-dcb5-d74236082bff
    Hope this helps.
    thanks,
    JituK

  • How can I pass the photos from one iphone to another?

    how can I pass the photos from one iphone to another?

    Use the Beaming feature. See the info at the ? In iPhoto for iOS.

  • HT4436 Why is my daughter receiving my text messages on her itouch when I send them from my iphone? We are both on icloud so how can I separate the two? Do I need another icould or apple account??

    Why is my daughter receiving my text messages on her itouch when I send them from my iphone? We are both on icloud so how can I separate the two? Do I need another icould or apple account??

    It's happening because you are using the same Apple ID for iMessage.  You don't need to do anything with your iCloud account to fix this.  You should create a separate Apple ID for her device to use with iMessage and FaceTime.  (You can continue to share the same ID for purchasing from the iTunes and App stores if you wish; it doesn't need to be the same as the ID you use for other services.)  Once you've done this, on her device go to Settings>Messages>Send & Receive, tap the ID, sign out, then sign back in with the new ID.  Do the same thing in Settings>FaceTime.
    Another caution is that if you share and iCloud account with her, any data you both sync with the account such as contacts, will be merged and the merged data will appear on both devices.  If you don't want to end up with each other's contacts, calendars, etc. on your devices, you should have separate iCloud accounts to.  If you want to make this change, go to Settings>iCloud on her device and tap Delete Account.  (This only deletes the account from the device, not from iCloud.)  When prompted about what to do with the iCloud data be sure to choose Keep On My iPod.  Then set up a new iCloud account with her new ID, turn on iCloud data syncing again, and when prompted choose Merge.

  • When I have video clips on my timeline, they do not play in the monitor screen. I hear the sound track but can not see the image. To test if my new files are somehow the problem, I went back and used video files that I used successfully a year ago, and th

    When I have video clips on my timeline, they do not play in the monitor screen. I hear the sound track but can not see the image. To test if my new files are somehow the problem, I went back and used video files that I used successfully a year ago, and they no longer play in the monitor window. I hear the sound track, but do not see any video. Have I changed some setting that controls video playback in the monitor window?

    Randy Ruttger
    Thanks for the follow up.
    Missing in this equation were the version of Premiere Elements that you were using and the computer operating system on which it was running. But...
    The deed is done. But.....Until now and after you went ahead and moved to version 12, we now learn what version of Premiere Elements you were using. We still do not know the computer operating system involved.
    You just said Premiere Elements 10. Premiere Elements 10 is hit by a serious known display issue if the computer uses a NVIDIA GeForce video card/graphics card. In this issue, the only remedy is to roll back the driver version to about May 2013. The description of the problem and how to do the roll back are described in one of the Announcements at the top of this forum. What video card/graphics card does your computer use?
    On another front, Adobe will be releasing a new version of Premiere Elements any day now. No one but Adobe knows the feature set for the new version. That type of information is announced at the moment of release of the new version.
    So the remedy to the problem that you presented in this thread could have been...
    1. Rolling back the NVIDIA GeForce driver version to about May 2013 if possible (Windows 8 or 8.1 64 bit, may not be possible)
    2. Move to another version of Premiere Elements (which you did)
    I offer the above for consideration so that you can review your decisions. We are pleased to learn that Premiere Elements 12/12.1 works for you.
    Please do not hesitate to ask questions and ask for clarifications, but remember that the answers are in the details.
    Best wishes,
    ATR

  • How can I put the report generated by a program into a File?

    Hi all,
       How can I put the report generated by a program into a File?It can be in TXT format or excel format which ever is possible.
    I need to export this file to memory,How can I do that??
    Regards,
    Shashank.

    Hello Shashank,
    Please ignore my previous answer... Ofcourse it works...
    There are several ways to do this...
    two of them are
    1. List -> Save -> File and press enter..
        it will ask for the format, then path where to save it. Just give the path.
    2. Using function module 'GUI_DOWNLOAD'.
    I'm giving the example bellow which explains the usage of both GUI_UPLOAD and GUI_DOWNLOAD.
    To do this... you need to have folder with name 'TEST' and a .txt file in it with name 'test'. And contents of it are :
    TEST1             ,BOT 
    TEST2             ,BOT 
    TEST3             ,BUT 
    with spaces.
    REPORT zssr_bdc .
    DATA: BEGIN OF g_t_itab OCCURS 0,
            matnr LIKE mara-matnr,
            maktx LIKE makt-maktx,
          END OF g_t_itab.
    DATA: g_t_bdcdata TYPE TABLE OF bdcdata.
    DATA: path TYPE string,
          path1 type string.
    path = 'C:\Documents and Settings\ssr3kor\Desktop\TEST\test.txt'.
    path1 = 'C:\Documents and Settings\ssr3kor\Desktop\TEST\test1.txt'.
    *contents of test.txt    *
    *TEST1             ,BOT  *
    *TEST2             ,BOT  *
    *TEST3             ,BUT  *
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename = path
      TABLES
        data_tab                      = g_t_itab.
    LOOP AT g_t_itab.
      WRITE:/1(18) g_t_itab-matnr, 20(40) g_t_itab-maktx.
    ENDLOOP.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
       filename = path1
       filetype                      = 'ASC'
      TABLES
        data_tab                      = g_t_itab.
    Now you will get one .txt file with name 'TEST1.TXT' in the TEST folder.
    <b>REWARD POINTS IF IT IS HELPFUL</b>
    Regards
    Sasidhar Reddy Matli

  • After getting an update from 10.6.8 many of my programs were no longer able to open. How can I undo the update or solve this problem another way?

    After getting an update from 10.6.8 many of my programs were no longer able to open. How can I undo the update or solve this problem another way?

    Do you have a bootable clone from prior to the update? If so, roll back with that.
    Are your apps that won't open PPC and do they need Rosetta? Do you need to activate Rosetta?
    Have you considered reinstalling 10.6 from your install disc and then coming forward with the 10.6.8 Combo Updater, then doing software update and not including whatever it was you installed that caused this propblem?
    By the way - what update was it that caused this problem?

  • I want to cut out a head from a photo and insert it into another photo again. In the head hair flying in the wind and the blue sky can be seen between the hairs. This blue sky I want to remove, so I can only use the head with hair flying in another photo.

    I want to cut out a head from a photo and insert it into another photo again. In the head hair flying in the wind and the blue sky can be seen between the hairs. This blue sky I want to remove, so I can only use the head with hair flying in another photo. Is it possible to simply delete this blue color of the sky?

    Make your selection and then use Refine Edge.
    See this video tutorial from Bob Gager.
    https://www.youtube.com/watch?v=xrl3Qwg6zSc

  • How can I log the data transmission of my switch in a file to analyze the quality of my communication channel?

    How can I log the data transmission of my switch in a file to analyze the quality of my communication channels?

    A lot depends on what type of switch you have and what kind of communication channels you're asking about.
    There are several Cisco tools (e.g., "ip sla", SNMP-queried values, show commands etc.) that can give useful information.
    If you give us some more information we can help more specifically.

  • Can i get the time capsule to automatically back up my file from my Mac Book Air but have certain files which are only stored on the time capsule and not the computer? Then can i access these files only on the time capsule without connecting it?

    Can i get the time capsule to automatically back up my file from my Mac Book Air but have certain files which are only stored on the time capsule and not the computer? Then can i access these files only on the time capsule without connecting it?

    igonneau wrote:
    Can i get the time capsule to automatically back up my file from my Mac Book Air but have certain files which are only stored on the time capsule and not the computer?
    You can, but how are you going to back up those other files?  When (not if) your Time Capsule fails, you risk losing them.  See #Q3 in Using Time Machine with a Time Capsule for details.
    Then can i access these files only on the time capsule without connecting it?
    Not sure what you mean.  You have to connect a computer, either via Ethernet cable or wirelessly, to read or write to the disk. 

  • When using the Save Layer Comps to PDF Script, can you change the PDF settings. I need both Smallest File Size and Press Quality?

    When using the Save Layer Comps to PDF Script, can you change the PDF settings. I need both Smallest File Size and Press Quality? Thanks in advance to the group for assisting with this matter.
    — John

    No, there isn't. The way you're using the file is not recommended. You
    should use a review tracker to avoid getting in the way of one another.

  • I can't find the itunes that i downloaded in my program files

    i can't find the itunes that i downloaded in my program files...please help...tnx

    This link will show me the app exists, but it is not accesible from the Canadian Itunes store.

Maybe you are looking for

  • Get date from Calendar Promt

    Hi Experts, Is it possible to get date from Calendar Prompt when operator is "greater then or equal to". In this setting I can not set presentation variable for prompt, why? There is other way to get selected date? Thanks in advance for any suggestio

  • WBS element in Material Document List Report

    Hi Guru,      I have a problem about WBS element which is not show up any data in Material Document List (MB51) movement type 281 and 281 Q event I add WBS in the document.  Anyone know how can i config or do anything to let the system show up, pleas

  • Install problem of 8.1.6 on RH6.1 at libclntsh.so.8.0

    The OUI stops as files are starting to be copied. I had 8.1.5 installed, but un-installed and removed the 8.1.5 directories and the /etc/ora* files Other noted items: rpm -q libc glibc libc-5.3.12-31 glibc-2.1.2-11 Linux version 2.2.12-32smp ([email 

  • Flash Player not showing up in Safari Plug-ins/Firefox Add-ons

    OS: Mac OSX 10.4.11 Safari version: 4.1.3 Firefox version: 3.0.19 I am trying to do an online training course, but the site tells me I need to install the Flash Player plug-in to be able to view the site. I downloaded the newest version, and thought

  • The audio dosnt show up on the audio visual thing.

    the little audio bar that shows what the sound looks like dosnt show anything anymore. it just loads and loads. i have erased the app and reinstalled it and that didnt work. what is making it not show up? please email me at [email protected] or where