I am in the middle of learning jsf.
<form action="addStatus" method="GET"> I have a jsf page that passes this form into "addStatus for processing"
The code as follow:
<%-- file: AddCustomer.jsp--%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>SecondBankWEB AddCustomer.jsp</title> </head> <body> <h1>AddCustomer JSP Page</h1> <form action="addStatus" method="GET"> <table> <tr> <td align="right">Name:</td> <td align="left"><input type="text" name="name" length="30"/></td> </tr> <tr> <td align="right">Password:</td> <td align="left"><input type="text" name="password" length="30"/></td> </tr> <tr> <td align="right">Postal:</td> <td align="left"><input type="text" name="postal" length="30"/></td> </tr> <tr> <td align="right">Phone: </td> <td align="left"><input type="text" name="phone" length="30"/></td> </tr> <tr> <td align="right">Email: </td> <td align="left"><input type="text" name="email" length="30"/></td> </tr> </table> <p><input type="submit" value="Submit"/></p> </form> </body> </html> and this is the AddStatus.jsf
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>SecondBankWEB AddStatus.jsp</title> </head> <body> <% ArrayList data = (ArrayList)request.getAttribute("data"); %> <table> <tr> <td align="right">Name:</td> <td align="left"><%= (String)data.get(0)%></td> </tr> <tr> <td align="right">Password</td> <td align="left"><%= (String)data.get(1)%></td> </tr> </table> <p>Status: <%= (String)data.get(3)%></p> <br> <font color=navy> <hr> <h1>Select Choice <br><br> <a href="addCustomer"> Add a Customer</a><br><br> <a href="listCustomers"> List customers</a> </h1> </font> --> </body> However, when ever i hit the submit button, i will be redirected the addstatus page which does not display a single thing. What am i doing wrong here?
POSTinstead ofGET.