eclipse インストールフォルダにある eclipse.ini に下記を記述する。
-Dfile.encoding=UTF-8
解決。
eclipse インストールフォルダにある eclipse.ini に下記を記述する。
-Dfile.encoding=UTF-8
解決。
コンポーネント(class com.whoocus.app.form.xxxxForm)が見つかりません
こんな時は、下記をそれぞれのdiconファイルに追記してやる。
creator.dicon
<component class="org.seasar.struts.creator.FormCreator"/>
customizer.dicon
<component name="formCustomizer" class="org.seasar.framework.container.customizer.CustomizerChain"/>
毎回ハマる。(-_-;)
SAStrutsでの、jspファイルの配置場所に迷った。
基本、ActionからフォワードされるJSPファイルはWEB-INF以下に配置するべきである。
下記がそれぞれの設定。
web.xml
<context-param> <param-name>sastruts.VIEW_PREFIX</param-name> <param-value>/WEB-INF/view</param-value> </context-param> <!-- commonディレクトリも/WEB-INF/view 以下に移動した場合 --> <jsp-config> <jsp-property-group> <url-pattern>*.jsp</url-pattern> <el-ignored>false</el-ignored> <page-encoding>UTF-8</page-encoding> <scripting-invalid>false</scripting-invalid> <include-prelude>/WEB-INF/view/common/common.jsp</include-prelude> </jsp-property-group> </jsp-config>
IndexAction.java
public class IndexAction { @Execute(validator = false) public String index() { return "index/index.jsp"; } }
WEB-INF/view/index/index.jsp
<html> <head>index.jsp</head> <body> Hello. </body> </html>