NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Need Help Fix this code:(

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
digigon247



Joined: 21 Apr 2012
Posts: 2

PostPosted: Sat Apr 21, 2012 3:00 am    Post subject: Need Help Fix this code:( Reply with quote

Don't know what is wrong and what is needed to do to fix. Can anyone help? or guide?


PayrollSystem.rar
 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

PostPosted: Sat Apr 21, 2012 12:57 pm    Post subject: Reply with quote

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

PostPosted: Sat Apr 21, 2012 1:03 pm    Post subject: Reply with quote

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

PostPosted: Wed Apr 25, 2012 11:32 am    Post subject: Reply with quote

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">&nbsp;</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

PostPosted: Wed Apr 25, 2012 11:46 am    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo