Hello All I am learning Jsp. I did a program where in login and passwrd are entered thru a html page when we submit the page it calls the a login.jsp program this prg uses a login bean and uses a set property to set the values to login and password in the bean. I am using getProperty to get the values of login and passwrd. But it is not displaying nothing. can any help me by giving any hint or any program which will use bean and set the values using the setProprty and get the values using getProperty.I did startserver.
Haritha, Did you take care of the names of the fields in the Form? The names of the Form and the member names of the Bean must match. It is also case sensitive. Then you can set the Bean's members to grab the values of the SAME form fields like this.Also note that the minimum needed requirements for a bean is all set*** and get*** methods where *** denotes the member names. You need to take care of the methods also. I just copied a sample code from another post. Please check it up. regds maha anna
Haritha, If possible post ur code of the jsp file. Afroz
Joined: Oct 31, 2000
Hello Here is the code . I will be thankful if any one helps login.html <!-- Login and password program --> <html> <title> Login and password </title> <body> <FORM TYPE=POST ACTION="\examples\jsp\myjsp\Login.jsp"> LOGIN : <input type= text name="login" size="16"> PASSWORD : <input type="password" name = "pwd" size = "16"> <input type="Submit" value ="SUBMIT" > </form> </body> </html> Login.jsp: