Solution for all your login problems !

Hi everyone,
Due to the problem of designing a Login solution experienced in this forum...i have a solution that takes care of this problem i will like us all share this and pls give me a feed back as to how it works for you or its efficiency.
This solution has three parts.
(a) The Bean
(b) The HTML Page
(c) The JSP Page
XXXXXXXXXXXXXXXXXXX The Bean XXXXXXXXXXXXXXXXXXXXX
// dsn name is test_register
// table name is registrationDetails
// package bsoft;
import java.sql.*;
public class LoginExample {
private String username = "";
private String password = "";
public LoginExample() {
public void setUsername(String username) {
this.username = username;
public void setPassword(String password) {
this.password = password;
public boolean authenticate(String username2, String password2) {
     String query="select * from RegistrationDetails";
     String DbsUserName="";
     String DbsPassword="";
     String finalUser="";
     try {       
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
               Connection con=DriverManager.getConnection("jdbc:odbc:test_register", "dataDB_uname", "dataDB_pass");
               Statement stat=con.createStatement();
               ResultSet rst=stat.executeQuery(query);
               while(rst.next())
                    DbsUserName=rst.getString("UserName");
                    DbsPassword=rst.getString("password");
                    if (username2.equals(DbUserName) && password2.equals(DbPassword)) {
                    break;               
               return true;
          }catch(Exception e){
               e.printStackTrace();
               return false;
XXXXXXXXXXXXXXXXXXX The HTML LOGIN PAGE XXXXXXXXXXXXXXXXXXX
<html>
<head>
     <title> Olumide Bolusoft </title>
</head>
<body>
<br>
<p> <h3><center>Please enter your user name and password to login to Bolusoft Inc </center></h3></p>
<br>
<br>
<form action="processLogin.jsp " method = "post� >
<center>username</center>
<center><input type = "text" name= "username"></center>
<center>password</center>
<center><input type = "password" name = "password"></center>
<center><input type="submit" name="Submit" value="Login"></center>
</form>
</body>
</html>
XXXXXXXXXXXXXXXXXX The JSP PAGE XXXXXXXXXXXXXXXXXX
<%@ page import="java.util.*" %>
<jsp:useBean id="bsoftLogin" class="bsoft.LoginExample"/>
<%
String username = request.getParameter("username");
String password = request.getParameter("password");
if(bsoftLogin.authenticate(username, password) ) {
%>
<jsp:forward page="success.jsp"/>
     <%
} else {
%>
<jsp:forward page="errorRetry.jsp"/>
<%
%>
N.B name this file as processLogin.jsp
XXXXXXXXXXXXXXX The End XXXXXXXXXXXXXXXXXXXXXXXXX
I hope this helps majority of us who are having problems with implementing a login solution.
Also note that u can connect to any db of ur choice..the query syntax and connection parameters now depends on that supported by your DB.
Thanks All
Olumide B

Hello
I think u have used Model 1 Architecture.
It would be great if u follow the MVC Architecture.
What about this??
Login.html -> User login Page.
Login Servlet -> Handles Request from Login.html
LoginBean -> Uses to validate the user.
Success.jsp/Retry.jsp -> The Final page that will be displayed.
Am also new to Java Server Side programming.
Suggestions are always welcome.
Sathish

Similar Messages

  • What is the best Cloud solution for all your photos?

    You can't put all your iPhoto library in iCLoud, correct?  So how can I put all my photos in a cloud?  I'm a little hesitant to put all my photos in Dropbox or Google Drive as then my other computers will fill up with the same photos AND I don't trust non Apple products for my photos.  Can anyone tell me how they are doing it please?  At the moment I feel ok with my external backups (I've got 3 of them) as well as backing up in Time Machine but just wanted to know how others do it.
    Thanks

    You can't put all your iPhoto library in iCLoud, correct?
    Correct.
    So how can I put all my photos in a cloud?
    I use Flickr and have more than 50k photos there. You can decide what photos - if any - you want public and which you want to have available only to those whom you invite to see them.

  • Finally a solution to all your firewall problems

    I finally have answer to all of you who are seeking this
    question.
    When the Flash Player encounters the connect() method, it
    attempts to connect to your FCS following a very specific pattern.
    It first attmpts to connect over port 1935, then port 433, then
    port 80 and then it automatically attempts to tunnel through by
    sending rtmp data over http also called RTMPT it turns out the
    automatic sequence of attempts is fine for many situations however
    you may find some users can't make a connection (well , the
    NetConnection can't) because their firewall blocks data from
    traveling through port 1935. If those users can connect to any
    website surely they can use port 80 .And even if their setup blocks
    rtmp surely they can use RTMPT over port 80 because its really just
    plain http ...you might think the final attempt by flash player
    RTMPT on port 80 to be failsafe however the problem is that if you
    are running your webserver on the same machine as FMS then they
    can't both use port 80 at the same time....a perfectly legitimate
    solution is to use to computers one for the webserver and one for
    FMS ......two computers probably means you need to specify the
    domain in your rtmp (rtmp://mydomain.com/video).
    To force the flash player to try to connect through a
    specific port other than the defaults as specified above.....write
    rtmp as ....my_nc.connect("rtmp::8500/mydomain.com/video);
    FlashMX2004 by Phillip Kerman

    changing my post back to orginal ...........open port 433 and
    1935 if that doesn't work try one of the other solutions.
    I finally have answer to all of you who are seeking this
    question.
    When the Flash Player encounters the connect() method, it
    attempts to connect to your FCS following a very specific pattern.
    It first attmpts to connect over port 1935, then port 433, then
    port 80 and then it automatically attempts to tunnel through by
    sending rtmp data over http also called RTMPT it turns out the
    automatic sequence of attempts is fine for many situations however
    you may find some users can't make a connection (well , the
    NetConnection can't) because their firewall blocks data from
    traveling through port 1935. If those users can connect to any
    website surely they can use port 80 .And even if their setup blocks
    rtmp surely they can use RTMPT over port 80 because its really just
    plain http ...you might think the final attempt by flash player
    RTMPT on port 80 to be failsafe however the problem is that if you
    are running your webserver on the same machine as FMS then they
    can't both use port 80 at the same time....a perfectly legitimate
    solution is to use to computers one for the webserver and one for
    FMS ......two computers probably means you need to specify the
    domain in your rtmp (rtmp://mydomain.com/video).
    To force the flash player to try to connect through a
    specific port other than the defaults as specified above.....write
    rtmp as ....my_nc.connect("rtmp::8500/mydomain.com/video);
    FlashMX2004 by Phillip Kerman

  • Found a solution for all issues!

    Hi all, I just wanted to post my solution for all my problems with my nokia e63 (maling issues, crash issues, browsing issues, etc), yes, there is a simple way to solve them all and I took it, I just got a Blackberry and now everything runs smooth!! YES!, there is light at the end of the tunel, jajajajajaja I'm so happy to finally get over this nightmare, hope you all find your way out of Nokia's blackhole! Good luck

    I was able to locate an example that somewhat applies to your application:
    https://decibel.ni.com/content/docs/DOC-11632
    I simply modified the code to allow for CI and CO tasks, similar to your VI, and it worked fine.  I've attatched the modified code below.  However, I was unable to run your code without receiving the error you were seeing.  Even after I made the VIs identical (leading up to the Start Task VI), I saw different bahavior.  The VI that you are working on may have been corrupt.  This modified example should be a good starting point.
    Applications Engineer
    National Instruments
    Attachments:
    9401NibbleConfig.vi ‏29 KB

  • Found the Solution to All of Aperture Problems! Easy Fix.

    [ Edited by Apple Discussions Moderator; Please start a new topic about your technical issue. ]
    After much tinkering with Aperture 1.0, 1.0.1, and 1.1, I've found the solution for all the problems that Apple is having with Aperture:
    They should simply acquire Capture One Pro and use that as the foundation for the RAW conversions in Aperture.

    Hello,
    in my opinion Aperture 1.1 is a killer application for editing files. The support for systems with two displays is the best I have worked with. But there are many fields to improve.
    - Quicker, easier and reliable IPTC keywording like iView Media Pro offers.
    - Still needed: better conversion of RAW files. Capture one Pro´s Color tools are very precise. When you are shooting portraits stay with C1. I have to open nearly every image converted with aperture within Photoshop. This is barely needed with C1Pro.
    - The HUD experience is still weak I think. Tweaking an image exactly is painful because the sliders are too small and sometimes a little move of a slider meens a lot of change inside the image.
    - Generated Webpages are full of coding errors. Weird thing: the templates are correct.
    - Versions of images should be marked more clearly. Please show me names or Pop-Up notes or something.
    - Having a closed vault looks good and sounds cool. But for now my vault holds 36 GB. This will grow quickly. I don´t feel good about it. I could use several vaults. For every month, every year. But am I able to search in all of them at the same time? Does Spotlight searches inside Aperture libraries? I dont think so. iView does. So I use iView to keep an eye on my aperture lib. That sound like a joke...
    But I like Aperture a lot. It is a revolution. When I work with images I usually have 2 to 6 versions on my harddrive. Plus backups. One original. One for print, one for the web, one for the client and so on. This is all gone with Aperture. And that´s great. But a revolution is not an easy thing. Many things are to improve. And they have to be improved without loosing this Aperture thing.
    My conclusion for now: Aperture is a workhorse. It helps a lot to edit images and to distribute them. It helps to keep images organized.
    It is not a digital archival system nor a high precision raw converter. When you are shooting lots of images during events - use Aperture. When you are shooting high quality productions use anything what makes sense to you. Aperture is a version number 1.1 We have to be patient until the revolution evolves.

  • How to make Adobe as your default viewer for all your PDF file instead of the Preview given? Thanks

    How to make Adobe as your default viewer for all your PDF file instead of the Preview given? Thanks

    you need to "Get Info" on the file first. Select it, right click and select 'Get Info' in the menu.
    In the window that pops up, near the bottom, the "Open With" drop down menu needs changed. If the drop down menu does not present the one you want, select "Other" and find it.

  • I want to make a CD that is NOT in alphabetical order, not in artist alphabetical order and not in album alphabetical order... I want to make it the order I want.  Can this be done? How?  thanks in advance for all your help.  Mona

    I want to make a CD that is NOT in alphabetical order, not in artist alphabetical order and not in album alphabetical order... I want to make it the order I want.  Can this be done? How?  thanks in advance for all your help.  Mona

    cjam732 wrote:
    Ed - by sequence of numbers, are you talking about the rectangle with the arrow that sorts by track number?  I've tried to follow your directions to Mona but my playlist still gets burned to CD in alpha order.  driving me crazy.  any other suggestions?   thanks, Chris
    Chris, The sequence number is the first column of numbers, to the left of the Name column.  It always goes 1, 2,3  etc.  It is not the same as the Track Number, which has its own column.
    As a precaution before burning, make sure that Shuffle is tunred off, and that you right-click the playlist name and choose 'Copy to Play Order"  (although technically they should not affect the burn).

  • I recently received a  WD My Book Studio external Hard drive and am installing it but can't figure out what the difference between wd turbo installer  64 and wd   turbo installer is.  Can someone tell me.  Thanks in advance for all your help.

    I recently received a  WD My Book Studio external Hard drive and am installing it but can't figure out what the difference between wd turbo installer  64 and wd   turbo installer is.  Can someone tell me.  Thanks in advance for all your help.

    Oh ok, well that was what the test said prior to reformatting the hard drive. Now, it doesn't find any trouble no matter how many times I run it. That's what has me so confused, everything seems to check out and yet...I can't do anything, not even install the software!

  • Solution of all your problems regarding "belle fp2...

    hi,
    all
    i found some solution i think the problem in the nokia server not in software
    they are releasing software for country and product code variant ok
    i will advise to you all not to do the update "over the air"
    beacuse some people recieving update "over the air" but the nokia still not release the software for their country or product code variant. they are updating and facing the problems.
    if nokia release software for your country and product code variant you will surely get the update on nokia suite and software updater and nokia care also have the software.
    so all people in my view you use for updating your phone (nokia suite,software updater or nokia care)
    and you will also able to reinstall your software by nokia suite if their product code variant released.
    some people saying they are not able to reinstall beacuse they have updated own phone from "over the air" and product code variant not yet released so they are facing problem after updating.
    for check that your product code variant is released or not you have to use only (nokia suite,software updater,or nokia care)
    thanks.
    i want to also mention that you are complaining about
    1.front camera and exit button.
    2.multiple selection in gallery.
    3.volume touch interface.
    4.colour of theme black and grey.
    5.photo and video editor.
    6.keyboard covering text
    these features are not a software problem
    nokia not put these features in update so all you can request the nokia to put these features again.beacuse these features are necessary.
    thanks .
    "if these information helped you then feel free to give kudos"
    Attachments:
    FIRMWARE.jpg ‏222 KB

    hi,
    all
    (nokia members and all readers and posting members)
    i will request you to all read this blog full
    and you will learn something and know something about nokia in my view its a excllent blog
    written by Steve Litchfield heads off to him
    http://www.allaboutsymbian.com/reviews/item/15957_​Belle_Feature_Pack_2.php
    thanks.

  • Need Solution for iWeb/QuickTime viewing problem in IE 6 for Windows

    When viewing an iWeb page in IE 6 for Windows with a background picture and a QuickTime movie embeded, the QT movie frame will "smear" when the page is scrolled. More specifically, The QT movie frame will not lock into its proper position as long as the page has a background picture selected in iWeb when viewing w/ IE 6 for Windows. Does anyone know of a solution for this? Does this problem still exist w/ later versions of IE for Windows?
    By the way, if you don't already know this, changing the Page Background setting back to the default of 'Color Fill' in iWeb and republishing will not correct the problem once a background picture is selected for a page. You have to set the Page Background setting to 'None' and republish. The movie frame will then be locked into place when scrolling the page in IE 6 for Windows.
    MBP 17in (1 GB RAM), PB G4 15in, PB G4 12in, iMac G3   Mac OS X (10.4.7)   Loyal to Apple since the Apple ][+

    Someone else posted that you may have to remove the image altogether, publish, then place the replacement image. The images for the background of my newest pages use this as a tiled background successfully.
    http://web.mac.com/makentosh/iWeb/tipsfromtheiceberg/Images/background.jpg
    I'm not sure how well tiling would work on your page though since it would begin to repeat vertically when you don't want it to (for me, tiling is exactly what I needed).

  • I found a solution for the You Tube problem

    For all of you that have had problem seen you tube videos with your Mac Book, finally the problem was solved. Yesterday March 22 Adobe updated its Flash Player. I updated it and the problem was solved.

    You should also have the last update Mac OS 10.6.7 and last update of Adobe Reader 9.4.3

  • Finally a SOLUTION for the black-screen problem!

    It took me almost a MONTH to find a solution to this wide-spread problem - and I had to do it by myself.
    I've got a Qosmio x300 (about 18 months old) and started having the black screen / lock-down problem about 6 months ago but it was sporadic. When it started getting worse, I took it in for repair, made sure it was cleaned religiously, had both a cooling pad and household fan directed at it to eliminate any possible overheating issue, made sure all of the *Toshiba* drivers were up to date according to their site, etc... The problem kept getting worse - to the point where I couldn't even open a browser without the dumb thing crashing.  VERY frustrating to say the least.
    Finally I gave up - I removed the nVidia driver that ran the GeForce 9700M GTS video card and used the standard VGA driver.  No more lock downs, but it limited what I could do because the on-board memory wasn't being utilized.  I re-installed the *Toshiba* drivers for the card and presto - lock-downs again.
    Fed up, I went directly to the nVidia download page and chose to have it automatically detect my card. Now, granted, it says to try to use the OEM versions of graphics, but Toshiba's drivers are FLAWED!  I installed the driver suggested directly from nVidia, and what do you know? Full use of the card again and not a single crash!
    I hope all of my frustration, and the solution that resulted from it, can help someone else not have to waste time, money, and hair on their heads as it did with me.  =)  The sad part about it all - this is a TOSHIBA flaw that affects a wide range of systems and models - and nothing has or is being done about it.
    Good luck!  =)
    Dave (Montreal, Canada)

    Which version of the nVidia driver did you use?

  • A solution for Secure Static Versioning problem in 1.5.0_10

    Hi,
    I have JRE 1.3.1_09 and 1.5.0_10 on my computer and I think I have solved static versioning problem.
    My test computer:
    - Windows XP sp2
    - Internet Explorer 7 (on another computer also IE 6)
    - Firefox 2.0.0.1
    - JRE 1.3.1_09
    - JRE 1.5.0_10
    I. Solution for Internet Explorer 6 and Internet Explorer 7
    1. Edit registry and add:
    HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Deployment\Policy
    DWORD: EnableSecureStaticVersioning = 0 (Hex)
    2. Restart browser if started.
    3. Start web page with java applet.
    II. Solution for Firefox 2.0.0.1:
    1. Install 1.3 JRE in the same parent directory as 1.5 JRE.
    Because default default installation path for 1.5 JRE is C:\Program Files\Java\jre1.5.0_10 you need to modify
    1.3 installation path from default C:\Program Files\JavaSoft\JRE\1.3.1_09 to C:\Program Files\Java\jre1.3.1_09
    After installation check out that "bin" directory is in the following path:
    C:\Program Files\Java\jre1.3.1_09\bin
    2. Install 1.5 JRE in default installation directory: C:\Program Files\Java\jre1.5.0_10.
    After installation check out that "bin" directory is in the following path:
    C:\Program Files\Java\jre1.3.1_09\bin
    3. Restart browser if started.
    4. Start web page with java applet.
    Note: HTML page must use <object> tabs for Internet Explorer or <embed> tabs for any other browser (e.g. Firefox). You need to specify correct classid in object and/or embed tag.
    P.S. If anyone would like to discuss with me send me an e-mail to [email protected], but please post question to forum and just mail me a link to forum. I will write my answer to forum.
    Hope this helps,
    Grofaty

    I have been trying to find a solution for this issue at our organization for over 6 months. Finally, we have a work around to run multiple java versions for newer and aging java apps.
    Thanks,
    Adunlow

  • Possible solution for all you that have skipping songs, & scratchy sound

    Hi All,
    After upgrading to 7.02, I was extremely annoyed with the performance. But here's what I found and did. In a nutshell, you uninstall the new version and install a 6.05 version or earlier. I'll include some links to what I found and hopefully it'll help. Here's the first link and it describes what you need to do. Scroll down to the post by marlowe5 posted 10-08-2006, 8:06 A.M. and I also included the exact wording from the post below the link.
    http://www.oldapps.com/forum/archive/index.php/t-228.html
    This is the exact wording:
    Thanks for the advise in this post... after installing iTunes 7, and then 7.01, my computer was running really slow, iTunes was skiping and garbling and acting terribly... so I really needed to go back to 6.05.
    For all of you that need to do the same it's pretty easy:
    I downloaded the 6.05 install file from from oldapps, uninstalled 7.01 and then re-installed 6.05. When I ran iTunes it did give me the error message that the library file was created in a new version and couldn't open, but I then deleted the 'itunes library.itl' file (in My Music > iTunes folder) and then replaced it with the backup that was automatically created when I installed 7.01 (in My Music > iTunes > Previous iTunes Libraries). iTunes then started up fine with all my music and playlists. And all the skipping and CPU bogging is better now.
    Library file note:
    With the library file, when you update iTunes it also updates the library file, which won't work with older versions. So you need to replace this file or create a new one. I would recommend copying/backing up the new library file to a different location to be safe instead of just deleting it. You'll see above where to find the new library file and prior ones. When I made these changes I did two things to be safe, 1) I moved the new "iTunes library.itl" to a backup location instead of deleting it 2) I moved my most recent old library file from(My Music > iTunes > Previous iTunes Libraries) to (My Music > iTunes folder)and renamed it to "iTunes library.itl". It was previously "iTunes library 2006-1-18.itl." Before renaming it, iTunes didn't find the library so renaming it worked. Your file name will most likely have a different date so don't look for the exact file I mentioned. Plus it's probably a good idea to make a copy or back up this library file too.
    If you don't have any previous library files, you may need to create a new one. I don't have the info but I believe the link to the post should have that info.
    After reading through the post and other info, the only thing that it appears might be lost are playlists that have been created since the upgrade. I don't believe any music should be lost but that's why it's safer to backup the new library just in case. I did not lose any music.
    Also, here's a link to where I found old versions of iTunes:
    http://www.filehippo.com/download_itunes/?1249
    Hopefully this helps and good luck. I'm back to normal now.
    Dell Dimension 4550   Windows XP  
    Dell Dimension 4550   Windows XP  
    Dell Dimension 4550   Windows XP  

    Soccerteen,
    Make sure you try all the other remedies mentioned in other posts. If this didn't work for you then try below. I consider it a last ditch effort since it's going back to a previous version, which unfortunately works much better than 7.0x for me.
    Remove & backup your current library file to a different file/location to be safe. Once you do that, uninstall 7.02, and then install 6.05 or any 6 version. Once 6.0x is installed and you've opened it, you'll need to create a new library file. If you've removed the library file from (My Music > iTunes folder)it should load up with a blank slate. What you to do from this point is create a new library file. Read the oldapps link, the post from "Admin" dated 9-30-2006 5:30 PM should help. Most likely all of your music will be under one main file but you might have to add individual folders one at a time depending on how much music you have. Since I didn't have to go this route, I'm not sure if it's the best route but after reading multiple post, this was the most common suggestion. Worst case scenario, you can always reload 7.02 an reinsert the backup library file, which will put you back where you started.
    Hope that works for you and good luck!

  • FOR ALL ENTRIES IN Problem

    Hello,
    probably it is a silly problem, but can anybody tell me why this FOR ALL ENTRIES IN statement does not fill all the columns of my internal table?
    At the end of the report only the columns LGOBE contains values.
    data itab type zmm_t_alv.
    select mardmatnr mardwerks mardlgort mardlabst
      maktspras maktmaktx
      into corresponding fields of table itab
      from mard inner join makt
        on mardmatnr = maktmatnr
    where makt~spras = 'D'.
    select lgobe
      into corresponding fields of table itab
      from t001l
      for all entries in itab
      where t001l~werks = itab-werks.
    break-point.
    Thanks,
    Manuel

    Please read the documentation aboutr for all entries
    For all entries selects all records from a db table which correspond to the entries in an internal table, the result must be stored in a different table.
    Otherwise use a loop at itab.
       select single ...
       modify itab
       endloop
    Be careful with empty For all entries tables, it behave like a ranges table, no entry means no restriction and you get all records from the db table. That is a different behavior than the loop above.
    Use   field1 field2 ... in corresponding fields of ....
    If you specify only one field then you get only one result.
    If you want one the field 'lgobe' then use into wa-lgobe and not the much slower into corresponding!
    Siegfried

Maybe you are looking for