Oracle Containers for Java EE
Here are my instructions for getting JSPWiki 2.6.4 to work on OC4J 10.1.3.1:
Successfully tested with JSPWiki 2.6.0, 2.6.3, 2.8.0 alpha.
OC4J 10g R3 (10.1.3.1)
MBean JDK 1.5
Workaround for a security error:Solution 1: Start OC4J with the JVM parameter "-Doc4j.jmx.security.proxy.off=true".
Linux
../bin/oc4j Configuration Section
JVMARGS="{Other parameters} -Doc4j.jmx.security.proxy.off=true"
../bin/oc4j.cmd Configuration Section
set JVMARGS="%OC4J_JVM_ARGS% -Doc4j.jmx.security.proxy.off=true"
Call MBeanServerFactory14 instead of MBeanServerFactory15
if( SystemUtils.isJavaVersionAtLeast(1.5f) )
{
log.info("Using JDK 1.5 Platform MBeanServer");
m_mbeanServer = MBeanServerFactory14.getServer();
JAAS login configuration
Paste into ../J2EE/home/config/system-jazn-data.xml
<application>
<name>JSPWiki-container</name>
<login-modules>
<login-module>
<class>com.ecyrd.jspwiki.auth.login.WebContainerLoginModule</class>
<control-flag>sufficient</control-flag>
</login-module>
<login-module>
<class>com.ecyrd.jspwiki.auth.login.CookieAssertionLoginModule</class>
<control-flag>sufficient</control-flag>
</login-module>
<login-module>
<class>com.ecyrd.jspwiki.auth.login.AnonymousLoginModule</class>
<control-flag>sufficient</control-flag>
</login-module>
</login-modules>
</application>
<application>
<name>JSPWiki-custom</name>
<login-modules>
<login-module>
<class>com.ecyrd.jspwiki.auth.login.UserDatabaseLoginModule</class>
<control-flag>required</control-flag>
</login-module>
</login-modules>
</application>
Container managed authentication
JSPWiki 2.6.3 does not work properly on OC4J with custom authentication. You always get logged out whenever you change a page.- Setup Oracle user and group
Use the Oracle Application Server Control. For example User admin, groups admin, authenticated
- Enable container managed authentication
Remove comments in ../J2EE/home/applications/JSPWiki/JSPWiki/web.xml
Comment the 2 <user-data-constraint> sections. OC4J does not like the <transport-guarantee>CONFIDENTIAL</transport-guarantee> parameter. - Map OC4J users, groups to JSPWiki groups
Add in ../J2EE/home/application-deployments/JSPWiki/JSPWiki/orion-web.xml for example
<security-role-mapping name="Authenticated">
<group name="admin" />
<group name="authenticated" />
</security-role-mapping>
<security-role-mapping name="Admin">
<group name="admin" />
</security-role-mapping>
Double quotation marks in JSP tags
OC4J is not as forgiving when you use quotation marks. You need to alternate ' and ". Tnx João Condack and team.Update tags in ../J2EE/home/applications/JSPWiki/JSPWiki/templates/default/commonheader.jsp
Line 81:
<link rel="stylesheet" type="text/css" media="screen, projection, print"
href="<wiki:Link format='url' templatefile='skins/' /><c:out value='${prefs["SkinName"]}' />/skin.css" />
<script type="text/javascript"
src="<wiki:Link format='url' templatefile='skins/' /><c:out value='${prefs["SkinName"]}' />/skin.js" >
</script>
German umlauts
German umlauts are shown as chinese characters. Funny but annoying.Unfortunately, it is not a simple patch. The problem was found in the MyServletResponseWrapper in WikiJSPFilter.java. Reported as Bug JSPWIKI-348
. I created a patch which has not been tested on any other servlet container. So, I don't know if there will be a soon official solution. If someone wants to get detailed instructions just send me an email.Extract the properties files out of the jar file and move them into the ../J2EE/home/applications/JSPWiki263/JSPWiki/WEB-INF/classes/ directory. OC4J does not seem to read the encoding correctly if the files are packed.
--Lutz Tietze
, 21-Aug-2008