First of all, communication to serial and parallel ports as well as USB devices is not something j2ee was designed for. You should consider using j2se for such applications, here is a couple of references to Java Communications API and Java USB API:
http://java.sun.com/products/javacomm/
http://jcp.org/en/jsr/detail?id=80