Skip to content

Commit

Permalink
トップページの追加
Browse files Browse the repository at this point in the history
  • Loading branch information
secondarykey committed Jan 12, 2013
1 parent fcc9591 commit bd647bf
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/jp/dogrun/ileaflet/controller/IndexController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package jp.dogrun.ileaflet.controller;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;

public class IndexController extends Controller {

@Override
public Navigation run() throws Exception {
return forward("index.jsp");
}
}
18 changes: 18 additions & 0 deletions test/jp/dogrun/ileaflet/controller/IndexControllerTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package jp.dogrun.ileaflet.controller;

import org.slim3.tester.ControllerTestCase;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;

public class IndexControllerTest extends ControllerTestCase {

@Test
public void run() throws Exception {
tester.start("/index");
IndexController controller = tester.getController();
assertThat(controller, is(notNullValue()));
assertThat(tester.isRedirect(), is(false));
assertThat(tester.getDestinationPath(), is("/index.jsp"));
}
}
Binary file not shown.
Binary file not shown.
14 changes: 14 additions & 0 deletions war/index.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<%@page pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="f" uri="http://www.slim3.org/functions"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Index</title>
</head>
<body>
<p>Hello Index !!!</p>
</body>
</html>

0 comments on commit bd647bf

Please sign in to comment.