Yes, Tomcat and JMS can interact but your question is much too general.
1. Do you have JMS installed - can you create and run simple JMS applications?
2. Do you have Tomcat installed - can you create and
test simple
servlets?
3. What is your
Java versions, what is your operating system?
4. Is there some particular reason you are using Tomcat 4 instead of a newer version?