• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Simple login form project - all attributes are null and HTTP Status 404 error in some cases

 
Ranch Hand
Posts: 355
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Change this in EditPage.jsp


to


and run it again
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
now password appears:
null
123asdas
alisda
yavuzadas
[email protected]
Master's Degree
UPDATE failed!

Back to the Edit Page.

And username comes when I delete "disabled"
 
Paul Ngom
Ranch Hand
Posts: 355
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, replace the attribute disabled by readonly in page EditPage.jsp. I mean in the input field named un
 
K. Karacakaya
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Done! Everything looks fine and database is changed. I couldn't understand how we fix it without adding something about return_code to UpdateUser.java.
 
Paul Ngom
Ranch Hand
Posts: 355
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good. Now let us look at the sign up process. Make the SignUpPage.jsp to look like this:


and change this line in Registration.java

to


and tell us the outcome when you run the process.
 
K. Karacakaya
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Still the same error: SQLException caught: Column 'un' cannot be null
 
Paul Ngom
Ranch Hand
Posts: 355
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
replace this in Registration.java

to

 
K. Karacakaya
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah Paul I just noticed it too and problem is solved I have learnt a lot of things thanks to you. Only thing I didn't understand is how we fix edit part. Can you explain it a bit?
 
Paul Ngom
Ranch Hand
Posts: 355
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You must be talking about this set:


It is confusing as the update could be done directly without having to call the UpdateUser class.
 
K. Karacakaya
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah it is so confusing but probably I got that. Tomorrow I will add some features like if password != re typed password, give alert and if user doesn't put an [at] to email box, give alert. They shouldn't be hard.
 
Paul Ngom
Ranch Hand
Posts: 355
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Tomorrow I will add some features like if password != re typed password, give alert and if user doesn't put an [at] to email box, give alert. They shouldn't be hard.


I do hope that will not be had to achieve. I will always be happy to give a helping hand from my little experience.
 
K. Karacakaya
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks again for your kindness and helpfulness. I will message you if I have some problems at some points. Feel free to say "I'm busy"
 
K. Karacakaya
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Ngom wrote:


Tomorrow I will add some features like if password != re typed password, give alert and if user doesn't put an [at] to email box, give alert. They shouldn't be hard.


I do hope that will not be had to achieve. I will always be happy to give a helping hand from my little experience.



Hey again and again Paul

I add some parts to my SignUpPage.jsp. Now it is like:


It gives alert but when I click on "OK" button in that pop-up, it still saves the new user to db.
For example, after this registration process: username: mark, password: mark, retype password: mark, name: Mark, surname: mark, email: mark, degree: Master's Degree, it gives an alert that says "There must be an [at] character in your email address". But after I click on OK, http://localhost:8080/loginpage/Registration comes and says: "Welcome : 'Mark' Registration is completed. Please click here and login to the system."

Do you have any idea how can I solve this problem?
 
Paul Ngom
Ranch Hand
Posts: 355
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, please try this for SignUpPage.jsp
 
K. Karacakaya
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now it says: Welcome : ''. Registration is completed. Please click here and login to the system. And still add a new user to table.
 
Paul Ngom
Ranch Hand
Posts: 355
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Now it says: Welcome : ''. Registration is completed. Please click here and login to the system. And still add a new user to table.


Is the record inserted in table with all values mainly 'name'?
 
K. Karacakaya
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah it is inserted with all values.
 
Paul Ngom
Ranch Hand
Posts: 355
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Now it says: Welcome : ''. Registration is completed. Please click here and login to the system.



Where does it fetch that? You should only see Welcome: 'someName'

or send Registration.java
 
K. Karacakaya
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know. And it shouldn't submit the values because of return false... Weird
 
Paul Ngom
Ranch Hand
Posts: 355
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post SignUpPage.jsp and Registration.java
 
K. Karacakaya
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SignUpPage.jsp:


Registration.java
 
Paul Ngom
Ranch Hand
Posts: 355
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


This from Registration.java should print the name. If the name is inserted in table, i cannot see why it is not displayed. Are you sure the name is added in table?
 
What are you doing? You are supposed to be reading this tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic