Hi ,
I want to develop a web app using grails ,which should invoke/execute a VBScript file. I have placed VBScript file in WEB_INF/resources folder.
I am using Runtime.getRuntime().exec() to invoke the VBscript .
I am accessing the VBSCript either by using
def vbPath = getServletContext().getRealPath("WEB-INF/resources/" + "calling.vbs");
or
String path = new File(getServletContext().getRealPath("WEB-INF/resources/" + "calling.vbs")).getAbsolutePath()
The above path values are working fine on Jetty server. but the same is not working on Tomcat. Though the above path values are returring the corrct values on both cases.
For local(Jetty) deployment the path value returning is :
C:\Grails\workspace\MyProject\web-app\WEB-INF\resources\calling.vbs
On Tomcat deployment tha path vaue returning is :
C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\MyProject-0.1\WEB-INF\resources\calling.vbs
I have even tried by placing the VBScript file in
C:\Test
folder, but it always works on Jetty, but not on tomcat server
I am thinking that, we can not access a file from Servlet/Web on Tomcat .
Could you please some one advise me how to accesss a file from a webservice on tomcat. It may be a local resource or WEB-INF folder resource on deployment machine.
Thanks
I want to develop a web app using grails ,which should invoke/execute a VBScript file. I have placed VBScript file in WEB_INF/resources folder.
I am using Runtime.getRuntime().exec() to invoke the VBscript .
I am accessing the VBSCript either by using
def vbPath = getServletContext().getRealPath("WEB-INF/resources/" + "calling.vbs");
or
String path = new File(getServletContext().getRealPath("WEB-INF/resources/" + "calling.vbs")).getAbsolutePath()
The above path values are working fine on Jetty server. but the same is not working on Tomcat. Though the above path values are returring the corrct values on both cases.
For local(Jetty) deployment the path value returning is :
C:\Grails\workspace\MyProject\web-app\WEB-INF\resources\calling.vbs
On Tomcat deployment tha path vaue returning is :
C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\MyProject-0.1\WEB-INF\resources\calling.vbs
I have even tried by placing the VBScript file in
C:\Test
folder, but it always works on Jetty, but not on tomcat server
I am thinking that, we can not access a file from Servlet/Web on Tomcat .
Could you please some one advise me how to accesss a file from a webservice on tomcat. It may be a local resource or WEB-INF folder resource on deployment machine.
Thanks