NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
digigon247
Joined: 21 Apr 2012 Posts: 2
|
Posted: Sat Apr 21, 2012 3:00 am Post subject: Need Help Fix this code:( |
|
|
Don't know what is wrong and what is needed to do to fix. Can anyone help? or guide?
| Description: |
|
 Download |
| Filename: |
PayrollSystem.rar |
| Filesize: |
628.53 KB |
| Downloaded: |
50 Time(s) |
|
|
| Back to top |
|
 |
DarioS
Joined: 11 Apr 2012 Posts: 6 Location: Zagreb
|
Posted: Sat Apr 21, 2012 12:57 pm Post subject: |
|
|
| Provide us more information, like what is bothering you? Showing code in code tags would be helpful also.
|
|
| Back to top |
|
 |
digigon247
Joined: 21 Apr 2012 Posts: 2
|
Posted: Sat Apr 21, 2012 1:03 pm Post subject: |
|
|
| Erm, well i think all the codes should be correct but when i tried logging into the login screen, the enter buttons doesn't do its job and when ever i wanna save the employee data, it didn't save into the database. so wondering why
|
|
| Back to top |
|
 |
bolsover
Joined: 24 Jun 2010 Posts: 185
|
Posted: Wed Apr 25, 2012 11:32 am Post subject: |
|
|
index.jsp appears to have nested forms - so it is not clear what gets submitted:
| Code: | <form action="adminServletController">
<form id="form1" name="form1" method="post" action="">
<p align="center"> ADMIN NAME: <input type="text" name="adminName" value="${admin.adminName}"/>
</p>
<p align="center"> PASSWORD: <input type="password" name="password" value="${admin.password}"/>
</p>
<p align="center" class="style1"> </p>
<center>
<input type="submit" name="enterButton"
value="ENTER">
<input type="submit" name="reset"
value="RESET">
</center>
</form>
</form>
|
suggest you start by removing the inner 'form1'
db
|
|
| Back to top |
|
 |
bolsover
Joined: 24 Jun 2010 Posts: 185
|
Posted: Wed Apr 25, 2012 11:46 am Post subject: |
|
|
Just looked at a couple of your source files...
e.g.: adminServletController.java
Lot of bad style here
Class names should start with Uppercase letter: AdminServletController.java
Methods and Variables should start with lowercase letter.
Getter and Setter methods should use camelcase e.g.: in admin.java
Getter for password should be getPassword() not getpassword().
I know it seems picky to point out all of this - but correct usage of Getter and Setter methods can make the difference between your programs working or failing. Also, once you get used to the conventions, it makes your code MUCH easier to read e.g.: in adminServletController.java you have: admin admin = new admin(); - would be easier if this were Admin admin = new Admin();
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|