To resolve the first problem
1. open "{jboss_home}\server\default\deploy\jbossweb-tomcat55.sar\META-INF\jboss-service.xml".
2. <attribute name="Java2ClassLoadingCompliance">true</attribute>
<attribute name="UseJBossWebLoader">true</attribute>
To resolve the second problem
1. open "{jboss_home}\server\default\deploy\jbossweb-tomcat55.sar\conf\web.xml".
2. locate at "<servlet>" entry, try to find "<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>"
3. Add 2 init-params as following:
<init-param>
<param-name>compilerSourceVM</param-name>
<param-value>1.5</param-value>
</init-param>
<init-param>
<param-name>compilerTargetVM</param-name>
<param-value>1.5</param-value>
</init-param>
4. If we want to use Log4j.properties in our own application, modify "{jboss_home}\server\default\conf\jboss_service.xml":
<mbean code="org.jboss.logging.Log4jService" name="jboss.system:type=Log4jService,service=Logging">
<attribute name="ConfigurationURL">resource:log4j.xml</attribute>
<attribute name="CatchSystemOut">false</attribute>
<attribute name="Log4jQuietMode">true</attribute>
</mbean>