Strutsの勉強を経て、いつしかTERASOLUNAマスターになった気分に浸っています。
しかし、Strutsをやればやるほど、TERASOLUNAの仕組みがよくわからなくなってくる。
例えば、Validation。
validation.xmlのformset/formタグのname属性になんでパスを書かなきゃならんのだ?
Strutsやっていないくとも、formのnameといっているんだから普通に考えれば、Form Beanの名前だろうと思う。それが違う。。。笑える。
で、今はまっているのが、別にTERASOLUNAというわけではなく、SPRINGFRAMEWORK。
APサーバーとしてTomcatを使っているけど、WARファイルを展開したくないので、Deployの指定でunpackWARsをfalseにした瞬間に
[2010/09/09 22:49:33][ERROR]/ クラス org.springframework.web.util.Log4jConfigListener のリスナインスタンスにコンテキスト初期化イベントを送信中の例外です
java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded
at org.springframework.web.util.WebUtils.setWebAppRootSystemProperty(WebUtils.java:125)
at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:118)
at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:47)
・・・・以下略・・・
なんだと思い、Log4jConfigListenerのJavaDocを見ると、注意書きがあった。
なになに、「WARNING: Assumes an expanded WAR file, both for loading the configuration
file and for writing the log files. If you want to keep your WAR unexpanded or
don't need application-specific log files within the WAR directory, don't use
Log4J setup within the application (thus, don't use Log4jConfigListener or
Log4jConfigServlet). Instead, use a global, VM-wide Log4J setup (for example,
in JBoss) or JDK 1.4's java.util.logging (which is global too).」と。
じゃぁ、使わないでおこう。と思ったが、自分の一存では決められないけど、多分、「よくわからんから、展開する方向で」で、この話は終わりになりそう。。。
うちのプロジェクトはこんな感じで、あまり考えたくないみたい。
追従します。。。
しかし、まともな回避策はないのかね。