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

Trying Out LDAP Modification

Writing a JSP to modify employee information is very similar to creating employee records (see Listing 15.6), although it saves a bit of time by having the form submit back to itself. On this page, the uid to modify is handed in as an argument (presumably from another page with a pull-down or fill-in-the-blank input field). The page checks to see if the employee requested exists; if not, it generates an error.

Listing 15.6. testLdapModify.jsp
 <%@ page import="com.bfg.employee.Employee" %> <HEAD><TITLE>Modify employee</TITLE></HEAD><BODY> <%! private boolean notNull(String str) { return ((str != null) && (str.length() > 0)); } private String bn (String val) { if (val == null) return ""; return val; } %> <% Employee ...

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