Rev 2018 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2018 | es | 1 | package pt.estgp.es.exemplos.hibernate.web.login; |
2 | |||
3 | import org.apache.struts.action.ActionForm; |
||
4 | import org.apache.struts.action.ActionForward; |
||
5 | import org.apache.struts.action.ActionMapping; |
||
6 | import org.apache.struts.actions.DispatchAction; |
||
7 | |||
8 | import javax.servlet.ServletException; |
||
9 | import javax.servlet.http.HttpServletRequest; |
||
10 | import javax.servlet.http.HttpServletResponse; |
||
11 | import java.io.IOException; |
||
12 | |||
13 | public class LoginAction extends DispatchAction |
||
14 | { |
||
2049 | es | 15 | public ActionForward login(ActionMapping mapping, |
16 | ActionForm form , |
||
17 | HttpServletRequest request, |
||
18 | HttpServletResponse response) |
||
19 | throws 1.5.0/docs/api/java/io/IOException.html">IOException, ServletException |
||
20 | { |
||
2018 | es | 21 | |
2049 | es | 22 | LoginForm lf = (LoginForm) form; |
2018 | es | 23 | |
24 | |||
25 | |||
2049 | es | 26 | 1.5.0/docs/api/java/lang/System.html">System.out.println(lf.getUsername()); |
27 | 1.5.0/docs/api/java/lang/System.html">System.out.println(lf.getPassword()); |
||
2018 | es | 28 | |
29 | |||
2049 | es | 30 | return mapping.getInputForward(); |
2018 | es | 31 | |
2049 | es | 32 | //return mapping.findForward("ok"); |
2018 | es | 33 | |
2049 | es | 34 | } |
2018 | es | 35 | |
36 | } |