my servlet shud get the static files such as htm,xsl etc from the .war fil
My htm , jsp or xsl files are placed under sub directories of my
appliction dir
/fcbWar / BO / 01 / eng / login.xsl
currently , this path is hard coded and i return the static files to my servlet to generate the response. This works fine.
But now , i shud get these files from my .war file that i use while deployment. I have the request , config and response object s as parametrs in my method where i shud return the file for response.
I tried this code
ServletContext sc = p_config.getServletContext();
String r = "/"+l_xsl_name; // l_xsl_name is the name of the static file
URL content = sc.getResource(r);
System.out.println(" resource content is...."+content);
String cfile = content.getFile();
l_xsl_file = new File(cfile);
return l_xsl_file;
here i get the o/p asresource content is.......null
because it does not identify the file from its sub directories.
Can anybody help me with suggestions . It is very urgent
Thank u,
mcraft

