DISPLAYING HELLO "USERNAME"

Hey guys,
Here's the problem :
I've created a login page which accepts username and password.
When i click on submit button, the next page displayed should greet the user by his/her username i.e Hello "username".
Sounds simpe.
Here's where it gets tricky:
The page which is displayed on clicking the submit button is a servlet consisting of frames. The servlet is as follows :
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
public class Dashboard extends HttpServlet
     public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
          res.setContentType("text/html");
          PrintWriter out=res.getWriter();
          out.println("<HTML>");
          out.println("<HEAD><TITLE>FIRST MEDIA DASHBOARD</TITLE></HEAD>");
          out.println("<FRAMESET ROWS=\"20%,80%\">");
          out.println("<FRAME SRC=\"c:/dashboard/Intro.html\">");
          out.println("<FRAMESET COLS=\"20%,80%\">");
          out.println("<FRAME SRC=\"c:/dashboard/MainNetwork.html\" NAME=\"mainframe\">");
          out.println("<FRAME SRC=\"c:/dashboard/DisplayArea2.html\" NAME=\"displayframe\" SCROLLING=\"NO\">");
          out.println("</FRAMESET>");
          out.println("</FRAMESET>");
          out.println("</HTML>");
As you can see i want to display the name of the user(hello username) in the intro.html frame.
Is there a way in which i can do this?

Ok. Consider i've saved the file as intro.jsp which contains all the necessary code to dynamically generate username.
But then how do i load this jsp page, since the action attribute of the login page points to the servlet and not the jsp residing in one of the frames.

Similar Messages

  • How to Display Windows Username in a PDF File?

    I have a PDF form, it has a Name and a Date field, I setup the Date to display todays Date automatically using JavaScript. Now since my users have unique Windows login names. I want to automatically display there username or Windows name in the Name field. Can I do this using JavaScript? or is there a different way? Any help would be greatly appreciated.

    Here's a barebones script that you can call from a script in your form to retrieve the login name of the user:
    // Folder-level JavaScript function
    var getLoginName = app.trustedFunction(
        function () {
            // Get and return the user's login name
            app.beginPriv();
            return identity.loginName;
            app.EndPriv();
    This needs to be included in a JavaScript file that's installed in the correct location. It's just a text file, so you can create/edit it with a text editor, but make sure the extension is ".js". For more information about how to determine where to place the file, see: http://acrobatusers.com/tutorials/2006/folder_level_scripts
    More information on all of this is in the Acrobat JavaScript reference: http://www.adobe.com/devnet/acrobat/javascript.html
    To populate a text field with the login name, do something like:
    // Populate field with loginName
    getField("text1").value = getLoginName();
    Change "text1" with the actual name of the field in your form. You can place this code in a document-level JavaScript so it executes when the form is opened.
    Note that all of this code is the bare minimum, and you may want to expand it to check for errors, etc.

  • 15 Seconds to Display "Hello World"?

    I've just installed Flex Developer 3 on OS X 10.5.7 (2.4 GHz and 4 GB RAM). When I run the "Hello World" application from "A Beginner's Guide" by Davis and Phillips, it takes about 15 seconds to display "Hello World".
    The result is the same when I'm using Firefox 3.5.1 or Safari 4.0.2.
    When I export the project and run the html filebin-debug, I get a delay of about 11 seconds.
    When I export the project and run the html file in bin-release, I get "Hello World" in about 1 second.
    I also noticed a similar delay when opening database driven applications. The browser reads "Loading", I get the PWOD, and then the form appears.O Once the page loads and Flash displays, the application loads data very quickly (amazingly quickly!)
    In contrast, when I FF 3.5.1 on XP SP3 under Fusion 2.0.5 and open the html files in debug and release, they load in 1 second.
    Is there a patch to apply or something I need to set to get rid of the long delay on OS X?
    Thanks in advance,
    Douglas von Roeder

    The solution was to right click on the application in the browser and stop it from connecting to a remote debugger.
    I've been working on a few different applications which were data-driven apps, some of which were running on a remote machine. Hence the need to connect to a debugger on the hosted box.
    Once I changed the debugger settings, the situation was solved.

  • How to display the username and current date in OAF  page Footer region

    Hi,
    I need to display the username and Current-Date in footer region.If anybody knows the procedure then please share with me.
    Thanks
    Divya Agarwal

    Hi,
    Read this Thread:--
    You have to capture the UserName and Date in the Process Request Method of page Controller and invoke a method which will subsequently get and set the value in some attribute.
    String userName = pageContext.getUserName();
    How to populate Current Date and Time in OAF page through CO
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to add Hello userName in message part of javamail

    How to add Hello <userName> in message part of javamail

    Use StringBuffer to construct a string with the content you want, then set that as the message content.
    What part of that is confusing you?

  • Displaying the username in the title bar of jframe

    hi
    how to display the username entered by the user in the title bar of jframe

    I'm not sure what you mean by 'entered' but does the following help?
    import javax.swing.*;
    public class DisplayUserNameInTitleOfJFrame extends JFrame
        public DisplayUserNameInTitleOfJFrame()
            setTitle(System.getProperty("user.name"));
            setSize(640, 480);
        public static void main(String[] args)
            new DisplayUserNameInTitleOfJFrame().setVisible(true);
    }

  • Form - How do I display a username on open, save or print?

    I am hoping that there is a simple way to display a Windows username on a form automatically? I have hit some forums that discuss using java and such, but I am hopeful it is not the only solution? I just need the Windows username to display in a field or in the footer when the form is opened, saved or printed I really don't care. This has to work when I email the form to user with just Adobe Reader too. If someone can please provide me with the intructions I would be eternally greatful :-)
    Garrett

    Okay so I do see the Identity section under preferences. If it is easier to display this information (Login Name) in a form field I could live with it. It is the same as my Windows username, so this is acceptable. What is the process? Can anyone provide me with the instructions and code that I need?
    I would prefer to be able to add a field that enables this functionality per form. When the form is opened in reader this field is automatically populated with the username and it can't be deleted or changed. I would even like to be sure this field is populated with the username even if the user just right clicks on the file in Windows and sends it to a printer. I can live without the last requirement :-)
    Thanks for any help you can provide...

  • Display current username in a text field

    Hi I have done an application where a particular user can log an issue. I want to display the user bane in a text field so that when i click save the issue is saved along with my other details.
    My question is how do i display my user name in my form?

    yes i have already tried that but it doesnt work. The thing is i have a text field and i'm trying to display it in the text field. Is that the right way to do it? and where do i insert that code

  • How do I reverse my decision to have firefox remember and display my username and password for a particular website?

    When I go to a website that requires user-name & password I enter them and then Firefox pops up "do you want firefox to remember your user-name & password for this site".
    I made the mistake of clicking "yes" and now when I go there the site comes us with both. I have several user names & passwords for some sites and now I don't want firefox to remember them. So, how do I reverse my decision to have firefox remember and display my user name and password for a particular website?

    Remove a saved password here: Tools > Options > Security: Passwords: "Saved Passwords" > "Show Passwords"
    * http://kb.mozillazine.org/Deleting_autocomplete_entries
    * [[Remembering passwords]]

  • Flash display LMS Username

    Hi.
    I have created a course in Flash MX/ Flash 8.0 and publish it
    with SCORMwith 1.2 tracking. In the flash file, i have created a
    text(dynamic) that would display the user's name. The course will
    be launched using LMS.
    Problem is:
    I do not have any idea how to pass or request the user's name
    to the swf on the browser. I have seen the function
    SCOGetValue("cmi.core.student_name") which i hope this will return
    the students name as a string. But i dont have any idea how to
    retrieve that from flash/browser and sent to swf file to display
    the name of the users when they start the course and take the quiz.
    I hope i made my points clear. I would appreciate any help.
    Thank you.
    Clyde

    If that function from your LMS returns the name as a string,
    you can pass it into your SWF either using the Flashvars param or
    as a URL variable attached to you SWF file path.
    Check out the LiveDocs here:
    http://livedocs.macromedia.com/flash/8/main/00001206.html
    Hope that helps!

  • Data view web part to display the most frequently accessed pages based on the user that is logged in

    I am working on a project in which I would like to display the top 5 most accessed pieces of content as links, based on the user that is logged in. Our MOSS 2007 implementation has subsites for all regions that we do business in, as an example North, South, East, and West. When a user visits the North region homepage, I would like a web part to display:
    Hello, <username>, here is a listing of your most accessed content:
    Link to One
    Link to Two
    Link to Three
    Link to Four
    Link to Five
    So each user would get a customized list based on their content access. We are not using my sites, but these would not work as we want the list to display on the home page of the region site.
    I am thinking that a data view may work here, but I am not sure. Any help is greatly appreciated.

    If you are running MOSS you may want to take a look at the Relevant Documents web part too.
    http://office.microsoft.com/en-us/sharepointserver/HA102410251033.aspx
    The Relevant Documents Web Part helps you create a personalized view of the documents that you create, check out, and change. In a large Document Center, the Web Part can save you time and effort by making files easier to find and use. The following figure shows the Web Part:

  • Skype notifications do not display username on And...

    Skype notifications display with username in white text, making it impossible to know which user is sending a message.  This happens only on Android 5.  I have a Nexus 4.

    Same here. I use Skype for instant messaging and I now longer get notifications. I'm on Android 5.0 samsung g 5. I've even tried pop up notification apps and I still can't get notifications.

  • Username/password displayed in Titile bar

    Hi:
    I have successfully managened to encrypt the username and password in the "address bar" of the Internet Explorer while report is displayed when destype=HTMLCss. But when destype=PDF, the username and passowrd is displayed in the "TITLE BAR" of the Internet explorer browser, though it is encrypted in the "address bar".
    If I choose destype=HTMLCss instead of PDF, such probelm does not arise. But I want my reports to be displayed in PDF!
    Can anyone suggest me how do I hide username and password entirely ?
    Thanks,
    Ashish

    Hi Ashish,
    The best way to avoid displaying the username/password in the browser is to use the cgicmd.dat file.
    More information in "Publishing Reports to the Web"
    http://download.oracle.com/docs/html/A92102_01/pbr_run.htm#1006007
    Navneet.

  • Getting Username to pass into LOV select statement

    Hello!
    I'm wondering if its possible to get the username of the current user logged in and pass it as a variable into a select statement used in a dynamic LOV in Oracle AS Portal?
    What I'm attempting to do is pull all the values from a table that equal the current user's username to user on a portal report
    so (as a rough example)
    select color from mytable where username = 'whatever the user name is would be here'
    And then the current user would get a list of values from which to select based off of the values entered in this table.
    The issue I'm having is determing how to fill the 'whatever the user name is would be here' portion with the actual logged in user's username (or even if its possible). I know on the actual portal one can do #USER.FULLNAME# to display their username, is there a similar "variable" one may use to get the username for a LOV sql call?
    I can get it to work if I statically fix the username to a particular value (ex: where username = 'Joe.Hacker') but I'm unsure if theres a variable or bind value (for lack of a better term) to grab the username on the fly.. dynamically.

    portal.wwctx_api.get_user can be used in the SQL query of your portal report to get the user_name of the currently logged-in portal user. For more info on wwctx_api, see the 10.1.2 or 10.1.4 portal API docs at http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc1012/index.html or http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc1014/index.html

  • Login window not displaying list of users

    Hello, i work in a networked office environment, where we regularly sync our networked users to mobile accounts, using homesync.
    On most of our computers, the login window displays the admin account, guest account, other (for network login) and any users synced. However on some computers, it just displays the username/password dialogue. I've checked the login preferences - and "display login window as: list of users" is selected. Also this information is grayed out as though it can't be changed. Is there a rogue system preference file that's causing this to not work correctly? If so where is it, can i delete it, or modify it to fix this situation? thanks!

    I tried the commands you've listed. Upon checking the com.apple.loginwindow.plist files, I noticed that the changes ARE being made to the file, but loginwindow.app is flat-out ignoring the settings. As for the stuff I tried earlier:
    Boot into Single-User Mode
    /sbin/fsck -fy
    /sbin/mount -uw /
    cd /Library/Preferences
    rm com.apple.loginwindow.plist
    rm com.apple.windowserver.plist
    cd /Library/Caches
    rm -r *
    cd /System/Library
    rm Extensions.kextcache
    cd /System/Library/Caches
    rm -r *
    reboot
    ...and after this had no effect, I deleted the loginwindow plists listed above several times from the Finder to force loginwindow.app to regenerate them.
    It seems like my problem has evolved slightly since my first post. At first, changes made in the Accounts preference pane would have no effect on the contents of /Library/Preferences/com.apple.loginwindow.plist. Now, the changes ARE made in the file, but loginwindow.app does not heed them. Any ideas?

Maybe you are looking for