How to make a program with JSP using servlet just for login (hardcode) from index.jsp??
please explain it to me,it was so difficult to me,help me please...
i dont' understand what hardcode is?? is hardcode have a different with an usual code??
explain it to me
It is so clear from your question that you have to make one jsp page named index.jsp and put form into it.
Put textboxes and buttons you need on login page and insert the path of servlet onto the action attribute of form tag.
When you click on submit button in form tag then it will go to servlet and do your coding there by making connection with database.
Please post your jsp and servlet code.
Live Life King Size
Punit Jain
Ranch Hand
Joined: Aug 20, 2011
Posts: 902
posted
0
i don't know what you mean by hardcoded.
but in our college(when i got assignments) we generally refer hardcoded mean, everything should be coded by me, no api's, no plugins should be used.
Punit Jain wrote:i don't know what you mean by hardcoded.
but in our college(when i got assignments) we generally refer hardcoded mean, everything should be coded by me, no api's, no plugins should be used.
Well that should be named "Handcoded".
Punit Jain
Ranch Hand
Joined: Aug 20, 2011
Posts: 902
posted
0
yes it should be..
but we called hardcoded, perhaps because everything is coded manually so it becomes hard to do, as compared to do by using api's and plugins.
but i m not sure why it's called hardcoded.
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
posted
0
but we called hardcoded, perhaps because everything is coded manually so it becomes hard to do
That is hilarious.
Punit Jain
Ranch Hand
Joined: Aug 20, 2011
Posts: 902
posted
0
i also think so...
ohimai anthony
Greenhorn
Joined: Feb 07, 2012
Posts: 15
posted
0
the hardcoded is probably asking you to put your password in the verification code. meaning you can only change the password inside your code. you don't have to save the password on a database or any other medium.
This thread is insane, but I think I know what the OP means:
for a mock login screen, I have "hardcoded" the users password. That is, in the servlet, just say
and then compare what the user has entered to this hardcoded string.
The opposite is that the password, or hopefully the hash of the password is pulled out of a database somewhere and compared to the string the user has entered.
R Vm
Greenhorn
Joined: Apr 24, 2012
Posts: 1
posted
0
hardcode means, the username and password will be coded in controller itself. While executing the program , when user enters username and password then verification will not be done by retriving the values from database . Instead the checking/matching will be done with hardcode values.
dhuha al khoiri
Greenhorn
Joined: Apr 17, 2012
Posts: 24
posted
0
this is my code,correct me if i am wrong,so i made index.jsp code,and dologin.jsp code,and i combine it like that,is that true?? thanks...
pravin rasal
Ranch Hand
Joined: Jul 27, 2011
Posts: 63
posted
0
hardcode means you have to take username and password in your code not from database
@Dhuha al khoiri
In future, while posting code, please UseCodeTags I have added them for you this time. As you can see the tags make the code much more easier to read and understand