Notes by nogeek
Displaying keyword search results 1 - 7
Created by nogeek on November 04, 2010 20:00:15
Last update: November 05, 2010 14:38:43
Following are some bugs in the Xalan jar shipped with JBoss 5.1.0 GA and JBoss 6.0. The Xalan jar file is located in jboss-5.1.0.GA/lib/endorsed ( %JBOSS_HOME%/common/lib for JBoss 6.0).
Test xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
...
Test xsl:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs...
XSLT Java code:
import org.w3c.dom.*;
import javax.xml.parsers....
DateUtil.java
import java.util.Date;
public class DateUti...
XSLT output:
Transformer Factory class: class org.apache.xalan....
Apparently, the output is wrong. The string "A test event" should not have been displayed.
Created by nogeek on November 04, 2010 20:55:31
Last update: November 05, 2010 14:36:09
Following part 1 , change to stylesheet to:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs...
The XSLT output becomes:
java Xslt test.xml test.xsl
Transformer Fac...
Parameter is not passed!
The Xalan version that comes with JDK 1.6 processed this correctly:
java -Djavax.xml.transform.TransformerFactory=com....
Created by nogeek on November 04, 2010 23:25:57
Last update: November 04, 2010 23:26:59
With this XML file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<ev...
and this XSL:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs...
The output of XSLT is:
A test event
Timestamp: 12886515008...
You may not want the title string in the output. There are two ways to do this:
Limit the apply-templates action with a select attribute:
<xsl:template match="/">
<xsl:apply-templat...
Suppress default text node output with an empty template:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs...
Reference: http://www.dpawson.co.uk/xsl/sect2/defaultrule.html
Created by nogeek on November 04, 2010 20:24:32
Last update: November 04, 2010 20:24:55
XSLT by default writes namespace declarations in the output. Most of the time it's spurious, sometimes outright wrong.
Take this XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<ev...
And this XSL:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs...
where DateUtil.java is:
import java.util.Date;
public class DateUti...
The output is (with JDK1.6):
Title: <br xmlns:java="http://xml.apache.org/x...
The namespace declaration went to the <br> element, not the timestamp where it belongs.
To remove the namespace info, add exclude-result-prefixes to the XSL:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs...
Created by nogeek on September 29, 2010 19:22:15
Last update: September 29, 2010 19:22:15
Assuming you are using the default server.
Edit the file server/default/conf/login-config.xml
Copy & paste the section:
<application-policy name="web-console">
...
Change the copy to:
<application-policy name="myapp">
<auth...
Create users properties file
Copy server/default/conf/props/jmx-console-users.properties to server/default/conf/props/myapp-users.properties . Change contents to:
# users.properties file for use with the Users...
Create roles properties file
Copy server/default/conf/props/jmx-console-roles.properties to server/default/conf/props/myapp-roles.properties . Change contents to:
# roles.properties file for use with the Users...
Edit web.xml in the application myapp . Add security constraints:
<security-constraint>
<web-resource-col...
Add file WEB-INF/jboss-web.xml with the following contents:
<?xml version='1.0' encoding='UTF-8' ?>
...
where myapp corresponds to the name attribute for application-policy in step 1.
Created by nogeek on June 01, 2010 14:34:12
Last update: June 01, 2010 14:34:12
Test with curl and default Apache doc.
C:\>curl --dump-header - http://localhost
HTTP/...
Created by nogeek on April 25, 2010 05:09:14
Last update: April 25, 2010 05:10:46
Oracle Web Cache version used:
Oracle Application Server Web Cache 10.1.2.3.0
...
The test page is a simple Struts action sending a URL redirect:
public ActionForward execute(ActionMapping map...
Web Cache setup
Origin server
Host Name Port
oas.host 7777
Site
Host Name Port URL Path Prefix
webcache.host 80
Test results
Request directly to the OC4J (Oracle Application Server):
C:\work\testAppWebApp2>curl --dump-header - http:/...
Request to Oracle Web Cache:
C:\work\testAppWebApp2>curl --dump-header - http:/...
Notice that Oracle Web Cache correctly translated the host name in the header and HTML page. However, the port number remained that of the Oracle App Server.