Friday, April 21, 2006

starting to learn XSLT ? here are some tools ...

As I wanted to take a closer look at this "language", I found myself loaded with lots of articles describing what it is, how to use it and so on ... much information useful theoretically, hard to apply in practice. Why ? because as I am not so familiar with XML syntax itself I could hardly focus on what's important to get things done. And what I want is simply to play a little bit with the XML generated by a ?readviewentries Domino command and trying to transform it into something more useful.

So I started to look on the net to find useful tools which can increase my learning curve into XML/XSLT stuff. After reading articles and stuff I did find a useful example list and a great tool

Both above links are great resources, because they allow you see step-by-step what is going on when you apply an XSLT to a XML source.

Actually, the ExchangerXML allows debugging of XSLT transformations, much like the examples mentioned above. And can be used free of charge for a beginner like myself. If I will go deep into this technology I will consider buying the full license, this is a very good piece of software.

Tuesday, April 18, 2006

use domino servlets unpacked

As many others like you Domino devs out there, I am also approaching Java. For the moment, Java under Domino. And I am also playing more and more with servlets, due to their feature of being loaded into memory. I think this makes things a little faster.

I used to like packing files (classes) into *.jar files, then deploy them on the domino server using ftp, issue 'tell http restart' and test. No more this approach, at least the jar packing. Why ? Because if you deploy a new servlet into domino\servlet\someServlet.jar, you also have to specify the same relative path into the server document (the Classpath field). If you have many servlets, you may end up deal with the 32k limit for the Classpath field.

Solution is to leave the Classpath field to its default domino\servlet path, then recreate the folder hierarchy on the domino server

Example: using Eclipse, I like to keep things organized. I use packages, thus the servlet code is looking something like:

package ro.radu.mypackage ;
public class MyServlet extends HttpServlet {
....
}

When compiled, on the Domino server, I go and create the proper folder hierarchy: domino\servlet\ro\radu\mypackage and copy the MyServlet.class into the last folder.

This is old news, I know :)

The advantage is that you can have one Eclipse project called DominoServlets, and all little servlets can be developed under the same Eclipse package, deployment meaning:
- copy your class file on the Domino server proper path
- if new, modify the servlet.properties file under /domino/data to add an alias or whatever needed.