server path in onMessage method

Hi,

getServletContext().getRealPath("./") in Servlet will give the server path of the current web application.

Similarly how to get the server path in onMessage method of Message Driven Bean ?

I have a xml from database. Need to access a xsl in WL server and create a html and then write this html to a flat file. I need to do all this in onMessage method. So, now to access the xsl file i need the server path.

Your help is greatly appreciated.

Thanks in Advance,

Anitha

[514 byte] By [AniKrisha] at [2007-10-2 16:55:36]
# 1

Hey Anitha,

Here is a sample that maybe useful.

URL url = (new TestClass()).getClass().getResource(name);

String absPath = url.getFile()

Where new TestClass() is the classname where this code goes and fits. The name is a relative path to retrive the xsl file or any other stuff u like.

reflex2javaa at 2007-7-13 18:08:06 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...