というわけで、試してみました。テスト用には、PALから提供されている、helloworldポートレットを使用して、helloworld.jspを変更して試してみました。UTF-8 で J2 を動かし、J2の表示エンコーディングをUTF-8にして、JSPをShift_JISにして、pageEncodingがあるなしで確認したところ、pageEncodingがあれば、化けずに表示されています。そんで、pageEncodingを置かなければ、普通に化けました。というわけで、特に問題ないようです。一安心 🙂
カテゴリー: Apache
org.apache.jetspeed.security.spi.InternalPasswordCredentialInterceptor
src/webapp/WEB-INF/assembly/security-spi-atn.xmlで設定されているけど、これでJ2のパスワードのバリデーションなどなどを実行してます。デフォルトでは以下のような感じ。
<!-- allow multiple InternalPasswordCredentialInterceptors to be used for DefaultCredentialHandler --> <bean id="org.apache.jetspeed.security.spi.InternalPasswordCredentialInterceptor" class="org.apache.jetspeed.security.spi.impl.InternalPasswordCredentialInterceptorsProxy"> <constructor-arg index="0"> <list> <!-- enforce an invalid preset password value in the persisent store is required to be changed --> <bean class="org.apache.jetspeed.security.spi.impl.ValidatePasswordOnLoadInterceptor"/> <!-- ensure preset cleartext passwords in the persistent store will be encoded on first use --> <bean class="org.apache.jetspeed.security.spi.impl.EncodePasswordOnFirstLoadInterceptor"/> </list> </constructor-arg> </bean>
もし、パスワードに有効源期限を設定したければ、PasswordExpirationInterceptorを追加すれば良いでしょう(試してないけど)。他にもcomponents/security/src/java/org/apache/jetspeed/security/spi/implにいくつかあるから、参考になるかと。
NavigationalState
ページを移動して、元のページに戻っても、ページ状態が維持されているのがどうもすっきりしないので、NavigationalStateを変更してみた。
--- src/webapp/WEB-INF/assembly/portal-url-generation.xml +++ src/webapp/WEB-INF/assembly/portal-url-generation.xml @@ -26,7 +26,7 @@ <!-- Navigation state we are currently using --> <bean id="NavigationalState" - class="org.apache.jetspeed.container.state.impl.SessionFullNavigationalState" + class="org.apache.jetspeed.container.state.impl.SessionNavigationalState" singleton="false" > <constructor-arg><ref bean="NavigationalStateCodec"/></constructor-arg>
このほかのNavigationalStateについては、以前、Ateから説明が出ていたので、以下が参考になります。
a) fully encoded on the url (like for instance Pluto does): use class org.apache.jetspeed.container.state.impl.PathNavigationalState b) only portletwindow state (window state and portlet mode) are saved in the session, parameters are encoded on the url: use class org.apache.jetspeed.container.state.impl.SessionNavigationalState c) state and parameters are saved in the session (the default): use class org.apache.jetspeed.container.state.impl.SessionFullNavigationalState
(そういえば、Plutoはこの辺の実装が壊れているんだよな・・・。化け化けになる。バグがあがっていたと思うけど)