Front Controller Servlet For this example we use a very simple bean as a model. The rules for writing a JavaBean must provide a constructor that takes no arguments ; it must not have any public variables; and any access to bean state should take place through getXXX() and setXXX() accesor methods. Business methods are other methods that operate on the model data. Script 1.0 Login /* //$Models.iNetModels.Com-Id:Administrator 12:00 PM 07/20/2006 $ // Copyright (C) 2006 The iNetModel Development Team // Login Interface Models.iNetModels.Com // // Script 1.0 Login Interface // */ public interface UserBean{ //Username public String getUserame( ); public void setUsername(String username); //Password public String getPassword( ); public void setPassword(String password); //lbusiness mehtod to perform Public boolean doLogin( ); public boolean IsloggedIn( ); } //session scope used to store the users login information, so information persists //across all requests from the user. < %page contentType="text/html"% > < jsp:useBean id="userbean" scope="session" class="UserBean"/ > < html> < head> < title>Login< /title> < /head> < body> < form action="pages/models.php" method="get" > < input type="text" name="username"> value=< jsp:getProperty name="userbean" property="username"/ >> Password: < input type="text" name="password"> < input type="submit" value="Log In"> < /form> < /body> < /html |