For example, the flag library from the Blazix server cannot be used in your system environment, so do not use the flag library to implement similar functions? This tutorial is for this question. This problem can be solved, but the code is longer. Basically, you must edit the HTML flag and set the default value. In the example below, we can learn how to modify GetName. jsp to provide features similar to blx: getProperty, but we can only manually edit the HTML flag:
<Jsp: useBean id = "user" class = "UserData" scope = "session"/>
<HTML>
<BODY>
<Form method = post action = "SaveName. jsp">
What's your name? <Input type = text name = username
SIZE = 20 VALUE = "<% = user. getUsername () %>"> <BR>
What's your e-mail address? <Input type = TEXT
NAME = email SIZE = 20
VALUE = "<% = user. getEmail () %>"> <BR>
What's your age? <Input type = text name = age
SIZE = 4 VALUE = <% = user. getAge () %>
<P> <input type = SUBMIT>
</FORM>
</BODY>
</HTML>
As shown in the code above, it simply adds a "VALUE" area on the INPUT flag and uses an expression to initialize this area.
To handle exception errors during input, we can use the "String" Area in bean and convert it to the target data type. Therefore, exception errors can also be handled.
As an after-school exercise, we can change the example in the previous tutorial to a non-Blazix flag library.
At this point, the "JSP from simple to deep" series of tutorials have all ended, and I hope to help you.