1. This example mainly tells us how to use JSP actions in JSP code, such as
2. This example requires four files: login.jsp, test.jsp, ok.htm, no.htm
3. Let's take a look at Login.jsp
Username
Password
form>
center>
html>
4. TEST.JSP code is as follows:
<%
String Username = Request.getParameter ("UserName");
IF (Username.trim (). Equals ("ABC")))
{%>
<%}
Else
%>
5. Ok.htm and NO.htm are very simple, just write:
OK html>
no html>
6. Finally, it is configured, very simple:
Putting login.jsp, test.jsp, ok.htm, no.htm can be in J2EE's public_html, no need to start J2EE deployment, this is a simple method
7. Running is the page automatically jumps to the OK.htm page when you enter the user name ABC. Otherwise, jump to the no.htm page.