Showing posts with label Basic lesson 11:- Controllers in jsp. Show all posts
Showing posts with label Basic lesson 11:- Controllers in jsp. Show all posts

Thursday, August 22, 2013

Basic lesson 11:- Controllers in jsp

Sometimes, some pre-processing needs to be done after the user has submitted a form. The result of this pre-processing decides where the control flow should go next. Such pre-processing code is frequently referred to as a "controller".
JSPs are very highly suited for writing simple controllers. For more complex controller logic, JSPs can easily call Java code in other classes. A sample controller is shown below:


<jsp:useBean id="user" class="user.UserData" scope="session"/>
<jsp:setProperty name="user" property="*"/>