Hi, I have written a java bean that puts a message onto an mqseries queue. I now want to be able to access this from a JSP. I have had a go but am having problems. I am using the file system context for the JNDI lookups and although they work when i use the bean in a java app it cannot find an initial context when accessed from a JSP. I am fairly new to this so could someone give me a few pointers. Such as what needs to be done to make the bean accessible from a JSP. Does it need to be an EJB etc? I have not deployed the bean as a web component or anything because i am not sure if i need to or why? The code for my bean is as follows.
The fscontext is on the classpath as is the provider jar. The bean worked fine when called from an app so i dont think it is a problem with the class path unless the class path is inaccessible when the bean is called from a JSP. Cheers for the help, Alan
Hi Again, I have solved that problem. I had the files in the system classpath but not in tomcat classpath. Have copied all jar files to lib directory of tomcat and t works now. I do however have a new problem. It now sends the message ok but the JSP will not disconnect from the queue until i close down tomcat. I receive the message "Unable to load message catalog - mqji" I have seen on the net that it is possible to get a more detailed error message if i add the directory that mqji.properties is in to the tomcat classpath but i dont know how to do this. Currently tomcat is loading the jar files itself but i dont know how to get it load the whole directory. Any ideas?
and POOF! You're gone! But look, this tiny ad is still here:
Free, earth friendly heat - from the CodeRanch trailboss