-
Notifications
You must be signed in to change notification settings - Fork 56
JBoss6_en
terasoluan-gfw | OS | Java | JBoss | RDBMS | Browser | Mail Server | Message Queue |
---|---|---|---|---|---|---|---|
5.4.2.RELEASE | CentOS 7.4 | OpenJDK 8u161 | JBoss EAP 6.4.0 | PostgreSQL 9.6.10 | Firefox ESR 38 (38.8.0) | Postfix 3.2.2 + Dovecot 2.3.1 | ActiveMQ 5.15.3 |
When TERASOLUNA Server Framework for Java (5.x) is used in JBoss EAP(JBoss Enterprise Application Platform)6 environment, the following settings are required.
- Creation and setting of
jboss-deployment-structure.xml
- Setting of URI encoding
- Setting of file upload (Commons FileUpload)
jboss-deployment-structure.xml
and exclude the module on JBoss side (partial reference).jboss-deployment-structure.xml
under WEB-INF.WEB-INF/jboss-deployment-structure.xml
<jboss-deployment-structure>
<deployment>
<exclusions>
<module name="javaee.api" /><!-- (1) -->
<module name="javax.faces.api" /><!-- (2) -->
<module name="org.hibernate.validator" /><!-- (3) -->
<module name="org.jboss.logging" /><!-- (4) -->
<module name="org.slf4j" /><!-- (5) -->
<module name="javax.inject.api" /> <!-- (6) -->
</exclusions>
<dependencies>
<module name="javax.annotation.api" /><!-- (7) -->
<module name="javax.jms.api" /><!-- (8) -->
</dependencies>
<exclude-subsystems>
<subsystem name="jpa" /><!-- (9) -->
</exclude-subsystems>
</deployment>
</jboss-deployment-structure>
.. tabularcolumns:: |p{0.10\linewidth}|p{0.80\linewidth}|
Sr. No. | Explanation |
---|---|
(1)
|
Since there is a conflict between Bean Validation and JPA version and an error occurs, exclude Java EE module. (This setting is required when using Bean Validation for input check or using JPA as O/R Mapper)
|
(2)
|
Since Bean Validation version conflicts and an error occurs, exclude JavaServer Faces module. It should be set as per (1). (This setting is required when using Bean Validation for input check)
|
(3)
|
Since Hibernate Validator does not work properly, exclude Hibernate Validator module.
|
(4)
|
Since JBoss Logging version conflicts and an error occurs, exclude JBoss Logging module.
|
(5)
|
Since application log is not output properly, exclude SLF4J module.
|
(6)
|
Since javax.inject.api version conflicts and an error occurs, exclude javax.inject.api module. (In 5.3.0.RELEASE, error does not occur even if it is not excluded)
|
(7)
|
Since injection does not work using
@Resource annotation, refer javax.annotation.api module. |
(8)
|
Since API class of JMS is required in class path, refer javax.jms.api module. (This setting is required when using JMS) [1]
|
(9)
|
Since JPA version conflicts and an error occurs, exclude JPS subsystem from operation. (This setting is required when using JPA as O/R Mapper)
|
- Set default character codes using
org.apache.catalina.connector.URI_ENCODING
- If character codes are set for each request, apply the same to the request using
org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING
Refer the following for how to set.
- How to specify default character codes in URI
- How to apply character codes of request to the character codes of request parameter in URI
Use org.apache.catalina.connector.URI_ENCODING
to set default character codes in URI.
- Setting example
{JBOSS_HOME}/standalone/configuration/standalone.xml
Add the following settings of <extensions>
tag
<!--omitted-->
</extensions>
<system-properties>
<property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/>
</system-properties>
"UTF-8" is applied in the above example.
When character codes are set to each request using ServletRequest#setCharacterEncoding(String)
in application,
character codes of request are applied to URI request parameter using org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING
.
- Setting example
request.setCharacterEncoding("Windows-31J");
{JBOSS_HOME}/standalone/configuration/standalone.xml
Add the folloing settings of <extensions>
tag
<!--omitted-->
</extensions>
<system-properties>
<property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/>
<property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/>
</system-properties>
"Windows-31J" is applied in the above example.
org.apache.catalina.connector.URI_ENCODING
is applied.