• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

to create login.jsp

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
I am a novice ewith programming in jsp.Could you please help me out in making a jsp which has a login and password and a submit button.both fields should also be authenticated after submit is hit.there are a maximum of three attempts.if not successful in all three attempts then you cannot login a fourth time.Could you please tell me how to do this .Urgent!
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ashok George:
I am a novice ewith programming in jsp.
...
Could you please tell me how to do this .Urgent!



If you're just beginning to learn JSP, nothing should be urgent.
Take your time, read some books, follow some web tutuorials.

See EaseUp to find out why adding the word "urgent" to your posts can actually slow down responses to your question.

-Ben
 
Ashok George
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I apologize for using the term.But if you could please let me know where I can find a code for this or a similar kind of login page I would be grateful.Thank you!
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know of any code samples that do this.

To be honest, it doesn't sound like something that can be done, reliably in a web environment. How do plan to mark users as as ineligible for future logins; cookies, IP number? If it's the former, the user could clear his/her cookies and try again, or just try with a different browser. If it's by IP you could potentially lock out an entire office full of people working from the same sub-net.
[ October 11, 2006: Message edited by: Ben Souther ]
 
Ashok George
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi!

See this is just a dummy code that I have to do.there should just be a login page with text fields for login id and password.i ahve created this html page.nOW I NEED TO CONVERT THIS INTO A JSP PAGE WHERE THESE VALUES HAVE TO BE RETRIEVED AND VALIDATED AGIANST A FEW DEFAULT INPUT VALUES AND THE ABOVE GIVEN PROCESSES SHOULD BE DONE.PLease help me!
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ashok George:
hi!

See this is just a dummy code that I have to do.there should just be a login page with text fields for login id and password.i ahve created this html page.nOW I NEED TO CONVERT THIS INTO A JSP PAGE WHERE THESE VALUES HAVE TO BE RETRIEVED AND VALIDATED AGIANST A FEW DEFAULT INPUT VALUES AND THE ABOVE GIVEN PROCESSES SHOULD BE DONE.PLease help me!





THESE VALUES HAVE TO BE RETRIEVED AND VALIDATED AGIANST A FEW DEFAULT INPUT VALUES AND THE ABOVE GIVEN PROCESSES SHOULD BE DONE


Where are these 'DEFAULT INPUT VALUES' coming from? If they are coming from a table in the databse and If you want to keep track of the number of login attempts then you may have to write the number of attempts to the database each time. Thats one way I can think of, because you are going to the DB to retrieve values anyway.

If your login credentials are in a text file or a properties file, then try writing the login attempt made to a log file each time the user tries to login, so you can keep track of the number of attemps made.
[ October 11, 2006: Message edited by: vishwanath nadimpally ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ashok George:
hi!

See this is just a dummy code that I have to do.there should just be a login page with text fields for login id and password.i ahve created this html page.nOW I NEED TO CONVERT THIS INTO A JSP PAGE WHERE THESE VALUES HAVE TO BE RETRIEVED AND VALIDATED AGIANST A FEW DEFAULT INPUT VALUES AND THE ABOVE GIVEN PROCESSES SHOULD BE DONE.PLease help me!



Ashok George,
Typing with the caps-lock button down in a web forum is the equivalent to yelling and is considered rude.

You told me your requirements, I asked you for some specific details, and warned you about some of the issues that you can run into when trying to implement something like this in a stateless environment. Instead of answering my questions or clarifying what it is that you're trying to do, you replied by repeating what you said in the first post but in capital letters.

Do you really think this is a good way to encourage people to help you; for free?
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Visit this link..

http://www.onjava.com/pub/a/onjava/2001/04/19/tomcat.html?page=1
 
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I don't know of any code samples that do this.

To be honest, it doesn't sound like something that can be done, reliably in a web environment. How do plan to mark users as as ineligible for future logins; cookies, IP number?


i just guessing that he meant 3 unsuccessful login attempts for a given username. say if i try to login as x with an invalid password, the first three attempts will result in "login/passowrd incorrect" whereas the fourth attempt will result in "account locked out"
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would create a database which has account information, and has a "locked" column.

Another table would record login attempts against real accounts. Thus, this would have

primary_key
timestamp
foreign_key for account
passed_login_check

Then, every time someone attempted to log in, I would record in this table the event. If they succeeded, I would put in true for the passed login check, if they failed, false.

Before the attempt to login, I would check to see if the previous to account log ins were failures- if they were, I would mark the account as locked and disallow future access until a system administrator confirmed a valid user authorization.
 
Acetylsalicylic acid is aspirin. This could be handy too:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic