Meaningless Drivel is fun!*
The moose likes JSP and the fly likes Make a program with jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Make a program with jsp" Watch "Make a program with jsp" New topic
Author

Make a program with jsp

dhuha al khoiri
Greenhorn

Joined: Apr 17, 2012
Posts: 24

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

Joined: Jan 10, 2002
Posts: 61095
    
  66

I have no idea what you mean by "hardcode" in this context.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
dhuha al khoiri
Greenhorn

Joined: Apr 17, 2012
Posts: 24
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

Joined: Jan 10, 2002
Posts: 61095
    
  66

What have you done so far? Show your work.
ronney singh
Ranch Hand

Joined: Feb 10, 2012
Posts: 40

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: 998
    
    2
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

Joined: Nov 08, 2003
Posts: 3479

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: 998
    
    2
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: 2408
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: 998
    
    2
i also think so...
ohimai anthony
Greenhorn

Joined: Feb 07, 2012
Posts: 15
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

Joined: Apr 30, 2003
Posts: 820

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
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


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
hardcode means you have to take username and password in your code not from database
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10268
    
    8

@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


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Make a program with jsp