O'Reilly logo

MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL by James Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing LDAP Creation

Now you can try a JSP to test LDAP record creation (see Listing 15.5). Model this page after the form-submission pages that you've written to this point. A couple of refinements have been added to make the code a bit more straightforward, mainly in the form of notNull and bn (blanks from nulls) helper functions defined at the top. When the page is first requested (or if all the values aren't filled out), it displays a form with all the employee fields (see Figure 15.6). When all the fields are filled out correctly, it uses LDAP to create the record and to display the uid that was assigned (see Figure 15.7).

Figure 15.6. testLdapCreate.jsp requesting values.
Figure 15.7. testLdapCreate.jsp creating a user.

You have to explicitly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required