How can I keep the name of the user around for each JSP without asking user

I have a number of JSP pages that I give the user access to once they login successfully. I want to be able to keep the name of the user present on every page without having to ask them for it each time.
How can I do this? Currently I have a user object that is access through use of a request bean in my JSP's.
Any suggestions???

Thanks for the help. A few questions though...
Can you just clarify how the 2 different SessionTest2.jsp's differ. I am right in thinking that the second one will instantiate a new bean object which if I do every time I go to the page, I will be getting the same name but in a different session each time. In the first SessionTest.jsp, I get the same name but from the same session object each time??
Please clarify???
SessionTest1.jsp
<%@ page language="java" import="test.*" %>
<jsp:useBean id="testBean" scope="session"
class="test.TestBean" />
<jsp:setProperty name="testBean" property="name"
value="ZZZZZ" />
<jsp:setProperty name="testBean" property="status"
value="Married" />
<%
     response.sendRedirect("SessionTest2.jsp");
     return;
%>
SessionTest2.jsp
<%@ page import="test.*" %>
<jsp:useBean id="testBean" scope="session"
class="test.TestBean" />
<%
out.println("User Name is : "+testBean.getName());
%>or SessionTest2.jsp
<%@ page import="test.*" %>
<jsp:useBean id="testBean" scope="session"
class="test.TestBean" />
<%
TestBean testBean =
(TestBean)session.getAttribute("testBean");
     out.println("Name is : "+testBean.getName());
%>Hope this helps.
Sudha

Similar Messages

  • How can I delete a name in the address of a text message?

    How can I delete a name in the address of a texas message?  The letter W appears as an addressee in error.  The text message was not sent.  The other addressess in the message was correct.

    if there are going to be a lot of dash characters you could read the string character by character, compare the value of the character with the range of values for a letter in ascii, and not copy it to a new string if it doesn't match. If the odd character out is only going to be a dash, you can search the string for the character, split the string at this point, append it to a string buffer and keep doing this till you're done. Just suggestions :)

  • My 5 year old iMac's hard drive is at the point of failing.  I'm trying to save al files on it, but it wont allow backup via Time Machine to an external hard drive.  How can I keep from losing all the files and programs if the hard drive fails?

    I'm concerned that my iMac, purchased 5 years ago, is about the crash and I can't back up my files and programs to an external hard drive via Time Machine because the computer freezes after only a couple hundred MB and gets nowhere near the required amount.
    How can I save these files and programs if the computer hard drive fails or has to be replaced without the backup being able to be done? I need to do something quickly, but I'm not sure what I can or should be doing.

    Get an external hard drive, some good ones that I like are the OWC, http://www.macsales.com Mercury Elite Pro drives...they are very good and reasonably priced.
    Get the drive, connect via USB or FireWire, then use Disk Utility to format the new drive as Mac OS X Extended (Journaled), and then use Disk Utility to Restore the current drive to the new drive.  Restore actually clones the drive so you will have a bootable backup on the external drive.
    After you have formatted and named the external drive, click Restore in the main Disk Utility window, drag the name of the old hard drive to the Source box, and drag the name of the new external drive to the Destination box.  DU will make an exact clone of the internal drive on the external drive.
    That clone will be a complete backup of the operating system and all of your data.
    You can test it by restarting the iMac and hold the Option key.  That will give you a grey screen showing all bootable drives.  Just click the external drive, then click the upward pointing arrow under it and the iMac will boot from that drive.

  • How can I keep my signature on the left side when using rtl on mail application

    I'm writing in Hebrew & English on apple Mail application on OS X /mountain Lion.
    When I'm starting to write a mail in HEBREW it's automatically move the signature to the right side which I don't like it because my signature is in English (My Hebrew is a why better from my English ; )
    How can I keep the signature on the left side as default?
    Hope to get your support in this issue.
    Thanks in advance,
    Joni.

    Joni11 wrote:
    How could i do this?
    Sorry, I don't know.  But have you already tried selecting your sig and using the usual alignment tools?  It seems to work for me when used in the new message pane.

  • How can i get my name on the finder bar?

    How do i get my name on the top right corner next to the search bar? I have OS X Mountain Lion 10.8.5

    System Preferences > Users & Groups
    Click the lock to unlock it, if you have to.
    Click "Login Options".
    Enable " Show fast user switching menu as" and select "Full Name".
    Best.

  • How can I change my name on the upper right?

    That was the name into account in the past but I changed itand it stayed with him where he slept here ..??

    And my name my account is not it but it is duly impressedme that.
    you can see that the name in the
    Account is not as it appears in icloud

  • How can I keep an intact image (w/ social media, for example) while I scroll the text to read the whole article of the magazine?

    Hey, people.
    I am using InDesign to build a magazine's App for iPad. See more info here: http://www.creativebloq.com/creative-cloud/how-adobe-dps-makes-digital-publishing-easy-101 34998
    When I open an article, I scroll the text to keep reading it. Unfortunately, the social media stuff, which was in the left side of the screen, isn't seen anymore. I want this social media stuff to go along with text. An example is the New Yorker's App, whose image is below. Please, let me know how I can manage this using only InDesign. Thank you.

    Moved to DPS forum.
    You'll need to group that info with the rest of the text if you want it to move along with it.

  • AO 1.4 patch 7  how can I hide technical names in the analysis panel

    I just install analysis for office 1.4 patch 7.  
    We love the speed in which it opens and connects to the BI platform.
    The problem is that now in the Analysis panel the technical names are displayed in front of the description.
    How can I turn of the technical names?
    It is very confusing to our users.
    Patty

    Patty:
    Under Analysis > Settings > Support Settings Tab
    Click off Display Technical Names

  • How can I keep my iMac on the wireless network when it goes to sleep?

    I have a new iMac (from Santa) and when it goes to sleep, so does its wifi connection.  I use it for work and need to keep my instant messaging app open and running at all times, even when it's asleep. I also like to have all of my email waiting in the inbox when I come back to the desk.
    Is there any setting (or workaround) I can do to keep it connected even when it goes to sleep? I have a MacBook Pro that keeps its connection when it goes to sleep so can't figure out what's happening. Thanks in advance!

    going to sleep means disabling the network connection to save power
    so what you're asking is not really possible
    unless you can change what going to sleep mean on your computer
    in the power saving settings you may be able to set going to sleep to just turn off your monitor
    because thats pretty much the only thing that can go to sleep if you still wish to use it over wifi

  • How can i keep multiple tabs in the tab strip without them compressing into one tab?

    when i open more than 6 windows , they all compress into one tab from where i have to access pages with a drop down menu. i want all the tabs to open up and the individual tabs to appear separately on the tab strip which can be scrolled up or down. thank you

    hi
    the problem is in the firefox tab strip at the bottom of the page. i have attached two screenshots . when i open more than 6 tabs, they all get compressed into 1 tab. i want all tabs to stay open individually, and the tab strip should therefore have a page scroller icon forming when many tabs open. i have had this in the earlier computer i had, but recently got a new one. now i cant figure how to set firefox to do what i need.
    thanks

  • How can I keep my cursor on the screen ?

    my cursor on my imac goes off the screen.  How can I control it?

    Thanks for your reply, but I am talking about tasks not events. I can see my events, I cannot see any tasks below that. I used to be able to, but they have disappeared. I can plan a new task, but it never shows anywhere on my screen after i have planned it.
    Cheers,
    Russ Kent

  • How can I keep Firefox from changing the language for the spelling checker?

    I'm using Firefox 20.0 on Fedora 17 (Xfce) fully updated. At random intervals Firefox will either set the language to some random version of English (Zambia, much of the time) until I notice and set it back or it will simply uncheck US English without selecting anything else. It also turns the spelling checker off once in a while. It's hard to say just what, if anything, triggers this because I only close Firefox for updates, and only reboot for kernel updates. Most of the time, my computer runs 24/7 and Firefox stays open sometimes, for over a month without any other issues. I found two old, closed threads on this, but neither of them had anything applicable.

    There's an issue with this because Firefox looks at the page you're visiting and decides on the dictionary based on the language code. At least according to this [https://bugzilla.mozilla.org/show_bug.cgi?id=682564 bug].
    I'm still looking to see if there's anything that can be done to stand on the programs neck until it cries uncle and uses EN-GB regardless. But I'm not holding my breath.

  • How can I get ITUNES to display manually added artwork for each song regardless of the album name?

    I have been manually adding artwork to my songs. When I click the Show Artwork check box, it doesn't show the cover art. For example some greatest hits albums have different cover art per track. ITUNES picks one of the cover art and shows it for the entire album grouping.
    Anyway around this? I want the added cover art to display per song.

    The artwork of each individual track does display during playback, in the small thumbnail at the top of the iTunes window, or at the left of the MiniPlayer control (opens by clicking the thumbnail), or the larger artwork panel that is shown if you click on the Show Large Artwork control in the MiniPlayer. It should also display on any iPod or iOS Now Playing view.
    The Up Next list uses the album art (usually cover of the first track) for everything from the same album, which is perhaps a shame, although in general one artwork per album makes sense.
    tt2

  • How can I backup my mac on a Time Capsule (connected with ethernet), without any user logged on the mac?

    Time Machine by default does not run when no user is logged in, there's some way to let backups run without any user logged on the mac?
    I need to backup 3 iMac connected through ethernet network to a Time Capsule.
    Some hint?

    If you use eithernet for your main connection then just plug the TC bridged into the network.
    If you use wireless for your internet connection then you can use the TC isolated from the network by ethernet.. but this is really only convenient on a desktop Mac.
    The instructions I put in this thread with screenshots.. see near the bottom.
    https://discussions.apple.com/thread/4817218?tstart=30
    It is a bit tricky so if you have questions ask back here.
    Just to say a USB for firewire external drive is faster and more reliable than a TC.. cheaper to buy as well.. although since you already have the TC that is not a concern.. but you can ebay the TC and buy a bigger and better external drive with the proceeds.

  • How can i create a multilingual website with a menu for each one?

    I have all the pages in spanish and the same pages in english ej. Contacto and Contact ...should be sister or child pages? I need two diferent menus (one for spanish pages master, another menu for the english pages master) but the menu feature mixes everything. Is there a solution to this?
    Thank you

    Hi Carme,
    It might be easier for you to set up your menus manually, so you can control what is the the Español and English menus, rather than fuss with child and sister pages.
    Click and drag out that menu widget that you want to work with > click > click on blue arrow > window opens > under "Menu Type" choose "Manual". Then you can manually enter the titles for and English Language menu. Get that working exactly as you want it to ( colours, roll-over etc ) When you're happy with that one, copy and paste a duplicate of that English menu. You can then go in and change all the English to Spanish. When these are done, then go through both menus and link the buttons to the appropriate language pages.
    This way, you don't have to worry about page higharchy, sisters, siblings or anything else. You have better control. It might also prove helpful in the fact that there have been issues in the past with pages navigating once uploaded to the web, who's page names consist of special character language markers like: ñöäãũ
    You may want to consider when naming your actual pages that the search engines will be using, ( i.e samplepagespanishpage.com* ) to omit these special characters. Sometimes they cause problems and the site won't work properly. However, if you manually do your menu names, these special characters can be used and it shouldn't cause an issue.
    * - If you check into the "Page Properties" under "Metadata" - "Page Name" is where you may want to consider omitting the special characters. "Page Title" I believe you can keep the special characters. This is the information that people would see in Google.
    I hope this helps.

Maybe you are looking for