Archive for category java

Unable to apply Javascript XSL Transform over HTTPS

I came across this issue a while a go and couldn’t really find much information on it at the time so thought that I would post about it just in case anyone has a similar issue.

We had the following code that loads an XML document and then applies a XSL transform against the XML document. The code looks a bit like following:
(This is the IE Specific version)

xmlDoc = new ActiveXObject(‘Msxml2.DOMDocument.3.0’);
xmlDoc.loadXML(XMLString);
xslDoc = new ActiveXObject(‘Msxml2.DOMDocument.3.0’);
xslDoc.load(xslFile);
output = xmlDoc.transformNode(xslDoc);

We would normally run this over HTTP and it always applied the transform and generated our output as you would expect. When we ran the same code over HTTPS the transform would never work.

After a lot of investigation it turned out that the issue was being caused due to a cache setting in the response header.

We were setting the Cache-Control parameter in the Response header to

‘private,no-cache,no-store’.

It seems that not allowing the XSL form to be cached was preventing the ActiveObject from loading it for the transform. By removing Cache-control parameter from the response header it worked fine every time.
Hope this can save someone with the same issue a bit of time.

1 Comment

See the accelerometer in action on the N95

Just found out something cool about the N95; it turns out that it has a Accelerometer (Level Sensor). It is used by the camera in the phone to rotate pictures taken in portrait mode. It makes you wonder why Nokia did not use this to give an auto rotate to the phones screen, similar to the feature available on the IPhone? It looks like there is someone developing this for the phone at the moment. It is called rotateme and should be out later this month. Check out the developers site for more information.


Nokia have released a demo application to show the accelerometer in action. Its a pretty simple application but it shows the power of what can be done. At first I didn’t believe it was possible but check out this video below to see it in action.

They have also released the source code for the game so you can see how it is done. The game uses the N95 RD Accelerometer Plug-in package to hook into the accelerometer on the N95. According to the research group that developed the this:

In a later N95 firmware release you should be able to access the raw accelerometer data by using the official sensor plug-in downloadable from Forum Nokia (Sensor Plug-in for 60 3rd Edition).

I can think of lots of game applications that could use this that I would love to write. Unfortunately my C++ skills are very limited. I wonder if I could hook into it from a JAVA app using JNI?

No Comments

Using Java with Assembly

I came across this article from java.net about how to invoke a JVM from Assembly! I was luck enough to not have to work with Assembly in college but anyone I have ever talked to about it said it was pretty painful to work with. You are probably wondering the same I was: Why use Java with Assembly this is what the author, Biswajit Sarkar, has to say

JNI is essential to the implementation of Java, since the JVM needs to interact with the native platform to implement some of its functionality. Apart from that, however, use of Java classes can often be an attractive supplement to applications written in other languages, as Java offers a wide selection of APIs that makes implementation of advanced functions very simple.

Here is the full article.

No Comments

Dublin Java Meetup has closed

I just got an email to say that the Dublin Java meetup group has closed on meetup.com.

Don’t be alarmed, it has not been disbanded but moved to a new home over at dubjug.org. Jake has more details on the move over at his blog. I did go to a few of the meetups for a while but have been working with a company out in west Dublin since year so have found it hard to attend.

I must try to make more of an effort to get into Dublin city to attend the meetups. Check out the new home for more details on the next meetup.

No Comments

Think i’m sold on silverlight

posted via n95

just caught Martha presentation at barcamp and it looks pretty impressive.

1 Comment