MentaTutorials

Compare Revisions

Ignore whitespace Rev 3 → Rev 4

/HelloMenta/trunk/src/main/java/org/mentawai/AppManager.java
File deleted
\ No newline at end of file
/HelloMenta/trunk/src/main/java/org/hellomenta/AppManager.java
New file
0,0 → 1,16
package org.hellomenta;
 
import org.hellomenta.action.HelloAction;
import org.mentawai.core.ApplicationManager;
 
public class AppManager extends ApplicationManager {
 
@Override
public void loadActions() {
action("/Hello", HelloAction.class, "hi")
.on(SUCCESS, fwd("/jsp/hello.jsp"));
}
}
/HelloMenta/trunk/src/main/java/org/hellomenta/action/HelloAction.java
New file
0,0 → 1,15
package org.hellomenta.action;
 
import org.mentawai.core.BaseAction;
 
public class HelloAction extends BaseAction {
public String hi() {
String msg = input.getString("msg");
if (isEmpty(msg)) {
msg = "Why you did not type anything?";
}
output.setValue("msg", msg);
return SUCCESS;
}
}
/HelloMenta/trunk/pom.xml
1,6 → 1,6
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.mentawai</groupId>
<groupId>org.hellomenta</groupId>
<artifactId>HelloMenta</artifactId>
<packaging>war</packaging>
<version>0.9.0-SNAPSHOT</version>