I tried 2 approaches
1) i tried to use the following in my action class,
String strPath = request.getSession().getServletContext().getRealPath("");
Following is the value set in strPath
C:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ContentValidation
then i tried ,
String strPath = request.getSession().getServletContext().getRealPath("")+"\\WebContent\\WEB-INF\\template\\initial.xls";
Following is the value set in strPath
C:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ContentValidation\WebContent\WEB-INF\template\initial.xls
It says file not found exception.
'But when i use the aboslute path ,
C:\workspace\ContentValidation\WebContent\WEB-INF\template\input.xls
it works fine
2)
String path = request.getContextPath();
System.out.println(path+"/WebContent/WEB-INF/template/input.xls");
output was
/ContentValidation/WebContent/WEB-INF/template/input.xls
but still i get file not found exception
can someone help please