permaculture playing cards*
The moose likes JSP and the fly likes to create login.jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "to create login.jsp" Watch "to create login.jsp" New topic
Author

to create login.jsp

Ashok George
Ranch Hand

Joined: Mar 25, 2005
Posts: 87
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!
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ashok George
Ranch Hand

Joined: Mar 25, 2005
Posts: 87
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

Joined: Dec 11, 2004
Posts: 13410

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

Joined: Mar 25, 2005
Posts: 87
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!
vishwanath nadimpally
Ranch Hand

Joined: Jan 25, 2005
Posts: 116
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

Joined: Dec 11, 2004
Posts: 13410

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?
Riyaz Saiyed
Greenhorn

Joined: Aug 13, 2006
Posts: 22
Visit this link..

http://www.onjava.com/pub/a/onjava/2001/04/19/tomcat.html?page=1
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
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"


MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
Tom Joiner
Ranch Hand

Joined: Sep 19, 2006
Posts: 47
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.


SCJP
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: to create login.jsp
 
Similar Threads
Which controller I have to use for a page having multiple submit buttons
Simple Login faces
Evelyn, Kathy and Berts: Can the exam period extends a bit?
change password
Which controller I have to use for a page having multiple submit buttons