Can anyone help regarding the Admin Login page and Normal User Page.

Hi Friends,
I have worked on normal login page it has been worked well. But now i have to create the Admin login page. That means, I have written the code in the following way.
public String userLogin_action() {
        // TODO: Process the button click action. Return value is a navigation
        // case name where null will return to the same page.
        com.sun.sql.rowset.CachedRowSetXImpl crs = new com.sun.sql.rowset.CachedRowSetXImpl();
        String Name =  getUserName().getText().toString();
        String password =  getUserPwd().getText().toString();
         try {
            crs.setDataSourceName("java:comp/env/jdbc/Employee");
            crs.setCommand("SELECT * FROM srni.UserTable");
            crs.setTableName("UserTable");
            crs.execute();
            crs.beforeFirst();
            while(crs.next()){
            info("Cursor is been moving");   
            boolean ok = crs.getBoolean("Admin");
            info("Value of ok:" + ok);
            String Username = (String) crs.getObject("UserName");
            info("Usernames are:" + Username + Name);         
            if(Username.equals(Name)&&(ok)){
            info("Login Successfull");
            java.util.Date Date = new java.util.Date();
            info(" Admin Logged on :" + Date);
            return "toUserPage";
            info("Login Failed or Admin doesn't exist");
        catch (Exception e) {
            error("Login Failed : " + e.getMessage());
        } finally {
            crs.close();
        return null;
    }You can see there that i have used the boolean type of value for verifying wheter the user is admin or not. If the admin type of column in database is true then it must allow the admin to certain page. Otherwise it must not redirect. So i have used this logic. When i am checking it is showing everything true,but it is not redirecting and it is saying that login failed. Please try the above code with a sample database table and verify it. You can see the output like this.
Cursor is been moving
Value of ok:true
Usernames are: srinu srinu //here it must not go to next cursor,because srinu has been identified, but it is not behaving like that.
Cursor is been moving
Value of ok:false
Usernames are: Chandu srinu
Cursor is been moving
Value of ok:false
Usernames are: kirank srinu
Login Failed or Admin doesn't exist The above output describes that it is moving the cursor from first row to the last row and checking all the usernames i n each row with the given username, and it is also checking wheter it is admin or not. Currently i have three rows so it is moving three times. It is retreiving every value correctly but in comparing it is not comparing. What to do.
Please help me out from this problem.
Thanking You in Advance.

The buttons are all created using the same library object (but MC), except for the code you have in the revised file does not call on that for the con button.
You have it calling on something with a linkage name of "con", which a quick check tells me doesn't exist--so it is undefined in the code when you try to use it.  I found this by using trace(newConBut._x); after its _x value was assigned, as I mentioned you should try.   So the first thing you want to do is change the following line from...
var newConBut = _root.attachMovie("con", "conbut", _root.getNextHighestDepth());
To
var newConBut = _root.attachMovie("but", "conbut", _root.getNextHighestDepth());
so that it uses the but MC that serves that purpose in the library.  Then you want to correct the _x assignment of the buttons to what I think you had earlier...
newConBut._x = 650-newConBut._width;
newRecBut._x = newConBut._x-newRecBut._width;
Here is a picture of what those changes do (note, without the XML file I had to finagle things just to work, so the biutton labels aren't what they will be)...

Similar Messages

  • Please can anyone help with the continuing password rejection problem with email.Ipad and other systems work fine but despite reloading my password on imac it bounces back.Apple store has been visited and I have tried everything they suggest.

    Please can anyone help with the continuing password rejection problem with email on my imac.My Ipad and other systems work fine but despite reloading my password on imac it bounces back.Apple store has been visited and I have tried everything they suggest.

    I use free Yahoo mail webMail access because folders I created in webmail access doesn't get set up in Apple Mail. While I was searching for post about password and keychain issues, I stumbled on several threads that complain about Mail folder issues, so I'm holding off on Apple Mail.
    On the password and keychain issue that your post is all about.  I've been using login keychain to save and automatical fill my login screens for a year or so successfully, with Safari and Chrome. Automatic form fill also works for Facebook login. Unfortunately, about 4 to 6 months ago, automatic password form fill stopped working with Yahoo webmail, while still worked for GMail (Safari and Chrome). I tried deleting the password entry for my two Yahoo email accounts to start fresh, but neither Safari not Chrome will even ask me if I want to save the password. I was so frustrated that I eventually installed the keypassX 0.43 (password manager) that is quite primitive sompare to OS X's keychain (when it works). Probably no surprise to you yet.
    The surprise, to me at least, is that, for whatever reason, password auto form-fill from keychain started working again for Yahoo webmail login on Safari about 5-7 days ago. Still doesn't work on Chrome!
    Two tips I can share, at least with webmail access:
    1. Password is save only for one of my yahoo mail accounts. When I login in with my other yahoo account, I get no prompt to save the password, and form fill doesn't work when I try to log in a second time with my other Yahoo mail account.
    2. On inspection of my login keychain, I see a webform password item saved for my Yahoo account that works with keychain. The name of the password is: login.yahoo.com(MyAccountName1#). When I open the password item and look in the Access Control tab, I see Safari and Chome are listed as allowed to access this password item..
         I also an "Internet password" item with a name of just login.yahoo.com. When I open the the password item, it looks just like the password item created for MyAccountName#1, but the MyAccountName#2 is listed in the Account field. Inside the Access Control tab, no apps are listed in access permission. I added Safari and Chrome to the lists of allowed app, saved the password item.
    Now when I bring up the Yahoo login page(by bookmark) on Safari, form fill fills in MyAccountname#1 for name and the proper password and I can login in. When I change the name to MyAccountName#2, the correct password is retrieved and I can log in! Alas, it still doesn't work on Chrome.
    BTW, I changed the password item type from "Internet password" to "Web Form password" and saw no difference! I also edited the name to be "login.yahoo.com (MyAccountName#2)" to look like the web form password item that works, but it has no effect either.
    From my experimentation, here's my observation:
    1. A Web Form password item is created for the first account name(MyAccountName#1) for login.yahoo.com and typed as Web Form password. When I log in using MyAccountName#2, an Internet Password is created, but no applications are listed as allowed to access the password item, even when the password item was created after just logged in and logged out to yahoo with the account name and password for MyAccountName#2.
    2. Manually adding Safari as an app that is allowed to use the password item works. Doesn't work with Chrome!
    The version of Safari I'm using is Version 5.1.7 (6534.57.2). My installed version of Chrome is Version 21.0.1180.79 beta.

  • Hi, can anyone help with the problem I am having with pro book 4440s? I can't boot into windows 7.

    Hi, can anyone help with the problem I am having with pro book 4440s?  I can't boot into windows 7, nor can I enter the bios cause i fogot the password. the error I am getting says "windows failed to start. a recenr hardware or software change might be the cause.   it then gives me options to boot from a disc but I can't do that cause I am unable to get into the bios to change it to boot from a disc.
    The error message goes on :
    File: \Boot\BCD
    Status: oxcoooooof
    info: An error occurred while attempting to read the boot configuration.
    the only two options on the screen are enter=continue and ECS=exit
    I just can't get pass this screen.
    Please help.
    Thanks

    Hi,
    If you don't already have one, use another PC to create a Windows 7 Rescue CD.  Download the relevant ISO from the links below.
    Windows 7 32bit
    Windows 7 64bit
    You should use an application such as ImgBurn to burn the ISO to a CD - a guide on using ImgBurn to write an ISO to a disc is Here.  Once created, or if you already have this, tap away at the esc key as you start the notebook to enter the Start-up Menu.  Insert the Rescue CD.  Select Boot options ( usually f9 ), use the arrow keys to select the CD/DVD drive and hit enter.  You may also get a prompt to 'Press any key to continue' - do this if asked.
    When loaded, select Repair Your Computer and choose the Command Prompt.  When this loads, enter the following commands and hit enter after each one - include spaces as shown.
    Bootrec.exe
    bcdedit /export C:\BCD_Backup
    c:
    cd boot
    attrib bcd -s -h -r
    ren c:\boot\bcd bcd.old
    bootrec /RebuildBcd
    bootrec /fixmbr
    bootrec /fixboot
    Remove the Rescue CD and try rebooting the notebook.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • HT5361 MacMail has stopped noting when I have read an email.  For example, I had 17 unread messages, so I read them.  Despite me having read them AND deleted them, the inbox still has 17 new messages displayed.  Can anyone help resolve the incorrect displ

    MacMail has stopped noting when I have read an email.  For example, I had 17 unread messages, so I read them.  Despite me having read them AND deleted them, the inbox still has 17 new messages displayed.  Can anyone help resolve the incorrect display?

    Lord K.  Thank you. Yes I am within the 90 time period, however I travel Intertionally and I can not receive not make a call to Apple. I was just at the Genius Bar in Chicago and they said, don't worry about it.  It just floats out there, however, I can not recover my messages on a flash drive. I need to go back to my old computer which I don't have with me.  My messages were in folders for a lawsuit.  It is going to take an incredible amount of work for me to, you have no Idea.  We are talking thousands of pages!  I the defendent will have them during discovery so I am not so worried.  However, I can not bring them to him on a Flashdrive when I meet with him without an extraordinary amount of presssure on my part.  THis is not just some little email issue. This is suing EXPEDIA and Tripadviosr.com

  • My I phone 4 won't restored  saying there is a problem with the iphone. Appointment made but 5 days away. can anyone help in the meantime

    My I phone 4 won't restored  saying there is a problem with the iphone. Appointment made but 5 days away. can anyone help in the meantime

    You need to do as provided. If no change after restoring as a new iPhone or not from the backup, the iPhone has a hardware problem.

  • TS3276 can anyone help on the following please. When I have been away from the office for a few days and check for emails it only supplies the most recent 100 emails and the ones before that are never received. thanks

    can anyone help on the following please. When I have been away from the office for a few days and check for emails it only supplies the most recent 100 emails and the ones before that are never received. thanks

    Does your server have a limit?

  • Can anyone help with the installation of adobe creative suite 4 on windows 7

    can anyone help with the installation of adobe creative suite 4 on windows 7

    You're not going to get any help without providing FULL DETAILS about the problem and your system.
    Bob

  • Can anyone help me I downloaded drake ablum and it said it comes with digital booklet but I don't see it and I downloaded the iBook and still don't see it I need help

    Can anyone help me I downloaded drake ablum and it said it comes with digital booklet but I don't see it and I downloaded the iBook and still don't see it I need help

    Your iTunes Digital Booklet should appear on the PDF shelf in iBooks.

  • Can anyone help with issue whereby Music, Podcasts and Audiable Book Apps keep stopping when listing via Headphones following IOS 7.01 Updates on Iphone 4?

    Can anyone help with issue whereby Music, Podcasts and Audiable Book Apps keep stopping when listing via Headphones following IOS 7.06 Updates on Iphone 4?
    I have tried the following all ready:
    Resetting Phone
    Resetting Settings on phone
    Change Headsets to speakers
    Reinstalled Phone
    Updated to IOS 7.1
    No of the above has resolved the issue does anyone have any ideas?

    Can anyone help with issue whereby Music, Podcasts and Audiable Book Apps keep stopping when listing via Headphones following IOS 7.06 Updates on Iphone 4?
    I have tried the following all ready:
    Resetting Phone
    Resetting Settings on phone
    Change Headsets to speakers
    Reinstalled Phone
    Updated to IOS 7.1
    No of the above has resolved the issue does anyone have any ideas?

  • I have a state space model of a complex system. can anyone help me for implementi​ng MPC and e-MPC control for the same?????

    Hi everyone. I am new to the forums, so let me be as mprecise as possible. i know the basic functionalities of Labview with MPC block etc. However, i dont know how to go ahead with implementing MPC control for a system whose state space model i possess. can anyone help me out?? the problem is that i dont even know the approach or the starting point..

    This happens if you remove a program manually, but still have the registry keys to load files from this program.<br />
    You can use the MSConfig program or the Autoruns utility to see which software and services are getting started.
    *http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx
    You can use registry editor and do a search (Ctrl+D) for imesh to see if you can locate the registry key(s) that launches this program on a reboot.
    Try to ask advice at a Windows oriented forum if you can't fix this.
    * http://www.bleepingcomputer.com/forums/ - BleepingComputer.com - Computer Help Forums
    * http://windowssecrets.com/forums/ Windows Secrets Lounge

  • Can anyone help with the installation of Premiere Elements 10 from disk onto a Mac?

    I have tried to install to a Mac from DVD. The installation fails at 51% on Disc 3 (the first disc for Mac) and returns Error 7. I have tried to download a trial version, but it is no longer available for PE 10. I've also tried to run the Premiere Elements 10 Installation Fix, but it won't run, returning an error that says the Certificate has been revoked. Can anyone help?

    Adobe - Lightroom : For Macintosh
    Hal

  • I can't connect to bbc website in firefox. Each time I get the same message: "the connection was reset". Can anyone help? (Already tried clearing cache and cookies).

    I can't connect to bbc website in firefox. Each time I get the same message: "the connection was reset". Can anyone help?

    I can connect http://www.bbc.co.uk/ & you may be interested in http://www.bbc.co.uk/iplayer/diagnostics
    Is your problem with streaming audio broadcasts to and are you outside the UK ?
    If so you may have fallen prey to the BBC's Content Distribution Network which often seems to produce problems they keep re-issuing advice such as:
    *''Why am I having problems listening to BBC radio outside the UK, such as experiencing poor sound quality or the station is not working?25 May 2011 20:28'' [http://iplayerhelp.external.bbc.co.uk/help/outside_the_uk/radio_problems_international/ <-- this ]

  • I am completely new to Logic pro x. Can anyone help me on what to do and how to start making basic beats?

    I just purchased a mac and bought Logic Pro X. I have used fruity loops a little bit but this is completely different. Can anyone help me on getting started to make basic beats or anything?

    Just a suggestion. You can pick up Apple Pro Training Series Logic Pro 9 & Logic Express 9 (iBooks or Amazon). It will be a good start as the versions are somewhat similar. It may be a while till something more current and specific will be out for learning Logic Pro X from the ground up.
    There are few Youtube sources are available as well.

  • Can anyone help with the scripting on this file?

    Hi, I hope someone with a bigger brain can help me out here.
    I've got an existing Flash CS3 file that makes up the result at http://www.infusion-set.com/flash/Elearning/Inset30/inset30_eguide.html.
    The client has asked if I could add an extra tab at the top after 'Reconnecting' called 'Contact Us' with link to an extra page. All the design has been done in ActionScript 2 with references to XML files for the dynamic content because it's been done in other languages as well.
    I've amended the existing XML file with the correct references for a new page and an accompanying .swf file to play in the animation area.
    I've attempted a .fla version where I duplicated one of the existing tabs script, changed the XML references and changed the variables where necessary to 'con or 'Con' (representing Contact Us). Unfortunately it made the tab menu go completely off the page and was obviously wrong in some way.
    Can anyone give me a clue as to what to change here on the original file as I'm a bit of a novice with ActionScripts, hence me asking.
    For reference I've attached HTML files with the original file scripts and my incorrect version. The  timeline is 103 frames with the scripts placed at frame 1 and 102
    Thanks.
    Garry

    The buttons are all created using the same library object (but MC), except for the code you have in the revised file does not call on that for the con button.
    You have it calling on something with a linkage name of "con", which a quick check tells me doesn't exist--so it is undefined in the code when you try to use it.  I found this by using trace(newConBut._x); after its _x value was assigned, as I mentioned you should try.   So the first thing you want to do is change the following line from...
    var newConBut = _root.attachMovie("con", "conbut", _root.getNextHighestDepth());
    To
    var newConBut = _root.attachMovie("but", "conbut", _root.getNextHighestDepth());
    so that it uses the but MC that serves that purpose in the library.  Then you want to correct the _x assignment of the buttons to what I think you had earlier...
    newConBut._x = 650-newConBut._width;
    newRecBut._x = newConBut._x-newRecBut._width;
    Here is a picture of what those changes do (note, without the XML file I had to finagle things just to work, so the biutton labels aren't what they will be)...

  • Can anyone help with the problem of connection was reset while loading?

    For three days I have been trying to load several different web sites that I usually go to. My primary problem is with one particular web site. I cannot load it from IE9 or from Mozilla. Some other pages load, but show a blank page. I have cleared the browser history,cookies, anc cache. Have also reset my dsl modem and nothing has helped.

    Hi,
    If you don't already have one, use another PC to create a Windows 7 Rescue CD.  Download the relevant ISO from the links below.
    Windows 7 32bit
    Windows 7 64bit
    You should use an application such as ImgBurn to burn the ISO to a CD - a guide on using ImgBurn to write an ISO to a disc is Here.  Once created, or if you already have this, tap away at the esc key as you start the notebook to enter the Start-up Menu.  Insert the Rescue CD.  Select Boot options ( usually f9 ), use the arrow keys to select the CD/DVD drive and hit enter.  You may also get a prompt to 'Press any key to continue' - do this if asked.
    When loaded, select Repair Your Computer and choose the Command Prompt.  When this loads, enter the following commands and hit enter after each one - include spaces as shown.
    Bootrec.exe
    bcdedit /export C:\BCD_Backup
    c:
    cd boot
    attrib bcd -s -h -r
    ren c:\boot\bcd bcd.old
    bootrec /RebuildBcd
    bootrec /fixmbr
    bootrec /fixboot
    Remove the Rescue CD and try rebooting the notebook.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

Maybe you are looking for

  • Rectangular marquee tool problem

    i used 'rectangular marquee tool to select an area . then i right clicked and select "stroke"  . but i am not satisfied with the result , because its corner was slightly jagged ( when i zoom it ) . feather was set to 0 . can anyone help me plz how to

  • Copying file without passing bytes

    Hi, I need to be able to copy binary files from a web location to a directory on my local machine. The app needs to do nothing except copy the files. Is there a way of handling this outside the javaVM, ie set up a channel from the weblocation to the

  • I am installing this player but did not installed how can i installed please help me

    whenever i installed this player installation is failed.kindly help me.

  • OWB 10g R2 - Workflow vs Unix scripts.

    hi, i've created one mapping in OWB. which one i've to use either workflow or Unix scripts to run that mapping? Which is better? If anyone have good docs or links plz reply ASAP.

  • How to revert domain KPEIN

    Hi, We needed to increase the length of the domain KPEIN from 5 to 8. We took the access key and made the changes. But while activating the domain ,we got activation errors and domain was partially active. Now, we realized that we should have created