Rev 8 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4 | soliveira | 1 | package org.hellomenta.action; |
2 | soliveira | 2 | |
3 | import org.mentawai.core.BaseAction; |
||
4 | |||
5 | public class HelloAction extends BaseAction { |
||
6 | |||
7 | public String hi() { |
||
8 | String msg = input.getString("msg"); |
||
9 | if (isEmpty(msg)) { |
||
10 | msg = "Why you did not type anything?"; |
||
11 | } |
||
10 | soliveira | 12 | System.out.println("====> " + msg); |
13 | |||
14 | byte[] b = msg.getBytes(); |
||
15 | for(int i : b) { |
||
16 | System.out.println("=> " + i); |
||
17 | } |
||
18 | |||
19 | b = "ã".getBytes(); |
||
20 | System.out.println("====> ã"); |
||
21 | for(int i : b) { |
||
22 | System.out.println("=> " + i); |
||
23 | } |
||
24 | |||
8 | soliveira | 25 | output.setValue("msg", msg); |
2 | soliveira | 26 | return SUCCESS; |
27 | } |
||
28 | } |