LoginSignup
6
5

More than 5 years have passed since last update.

【Seasar2】Teedaフレームワーク環境構築

Last updated at Posted at 2016-01-25

前提

  • tomcatとEclipseの設定完了していること

Teedaとは

Seasarプロジェクト発のJSF (JavaServer Faces) をベースとしたWebアプリケーションフレームワークです。
業務で化石を使う機会があったのでまとめました。

環境準備

Doltengというプラグインをeclipseに入れることでディレクトリ構成を自動で作成できる。
入れ方としては、Eclipseを開き、ヘルプ→新規ソフトウェアのインストール→作業対象に
http://eclipse.seasar.org/updates/3.2/
を入力するとDoltengがでてくるのでインストールしてきます。

コントローラーからビューに出力

htmlがテンプレートの役割をしていて

<span id="hoge"></span>

をhtmlファイルに設置して
コントローラから

public String hoge = "すきすき";

のようにidと同名の変数を設定でと出力できる。
詳しくは
http://teeda.seasar.org/ja/extension/tutorial/index.html

画面遷移、値を投げるなど

動作済みサンプル(インポートで取り込んで動作確認)
http://teeda.seasar.org/download/2011-09-19/teeda-html-example-1.0.13-sp11.zip

DB連携(S2Dao)

S2DaoのDB接続使い方参考
Daoとentityをsrc/main/javaに設置する
http://www.zealseeds.com/SysDevTech/seaser2/s2dao/helloworld/index.html

6
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5