Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Make a program with jsp

 
dhuha al khoiri
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64858
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea what you mean by "hardcode" in this context.
 
dhuha al khoiri
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually,i didnt know too,what the meaning of hardcode,but i got an assignment,and this assignment give me a task to:

"Make a program with JSP using servlet just for login from index.jsp"!!

and in this question,i must answer it,or maybe using servlet just for login itself,we can name it hardcode,so it have another name.

correct me if i am wrong,thanks.

or maybe you can help me with that question,to help me "Make a program with JSP using servlet just for login from index.jsp"??

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64858
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you done so far? Show your work.
 
ronney singh
Ranch Hand
Posts: 40
IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Punit Jain
Ranch Hand
Posts: 1012
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1012
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 2803
41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but we called hardcoded, perhaps because everything is coded manually so it becomes hard to do

That is hilarious.
 
Punit Jain
Ranch Hand
Posts: 1012
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i also think so...
 
ohimai anthony
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hardcode means you have to take username and password in your code not from database
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic