dev memo
Amebaでブログを始めよう!

components.properties

components.xmlの設定をローカル開発時とデプロイ時で少しを変えたい場合。 components.propertiesファイルはクラスパス上に配置すること。(src直下とか) components.xml

&ltcomponent name="Test"> <value>@test@</value> </component>

components.properties

 

test value
@test@にvalueが入る。

直接アクセスを防ぐ

WEB-INFの外に置いてあるファイルへの直接アクセスを防ぐ方法。

[web.xml]

<security-constraint>
<display-name>AccessControl</display-name>
<web-resource-collection>
<web-resource-name>XHTML</web-resource-name>
<url-pattern>*.xhtml</url-pattern>
<http-method>DELETE</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
</web-resource-collection>
<auth-constraint>
</auth-constraint>
</security-constraint>

SELinuxの無効化

SELinux : Samba etc...


「SELinuxの確認」


getenforce


Enforcing(有効)

Permissive(無効)


「SELinuxの無効化」


setenforce 0



「SELinuxの起動時設定」

/etc/sysconfig/selinux


(起動時、有効にする場合)

SELINUX=enforcing


(起動時、無効にする場合)

SELINUX=disabled