Integration Studio - Resource load

Integration Studio - Resource load

  
I create a extesion that load a XML file and return some values.
The problem is the extension dont find the XML.

Im using XMLParser parser = new XMLParser("Resources/states.xml");

In the debugger just show the exception "/opt/jboss/bin/Resources/states.xml" .

The exception show the states.xml are looked inside the bin folder, and not inside the app folder.

Im tried change the Resource to bin/applicaiton folder, but nothing works.
Hi Euber,

Have you specified the "Deploy Action" property of the resource?

Open the resource tab in Integration studio, double click the file that you want to load and set "Deploy Action"  to "Copy to Binaries directory".

Load it using the name of the file.

thanks,
Pradeep V.B.
Pradeep Badiger wrote:
Hi Euber,

Have you specified the "Deploy Action" property of the resource?

Open the resource tab in Integration studio, double click the file that you want to load and set "Deploy Action"  to "Copy to Binaries directory".

Load it using the name of the file.

thanks,
Pradeep V.B.
Now works.

Code

String path = HttpContext.getCurrent().getServletContext().getRealPath("states.xml");

XMLParser parser = new XMLParser(path);

In Extension Studio, i changed the deploy action to application.