Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to load html file stored outside of the context root.

 
Veena Grandhi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Any one please help ASAP.
We are having a servlet which will create dynamically html file based on the query and store it in the filesystem.Now i am not able to load that html file as it is not present under context root.How shall i specify the url or load that file?
I tried loading that file directly like http://localhost:9080/CONTEXTROOT/html/atwRpt_12052008.html ,but it is not able to identify.Hope picture is clear..html is the folder which is present outside CONTEXTROOT and i need to load the html file

To give background OS: Solaris, WAS version 6.0.2.17.
Please suggest me urgent..

Regards,
Veena
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
by default, WAS starts with a security policy which prevents access to files outside the context root.

You haven't provided any details on how your code reads or writes to this 'external location', so it is a bit hard to provide additional information.
 
Veena Grandhi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ..
Thanks for responding.

Servlet is trying to create the file like
fout = new PrintWriter((new FileOutputStream(rptDir + "/" + fileName, false)), true);

and it is trying to load as out.println(webFilePath+ "/" + fileName);

Here rptDir is some thing like /bpp_atw/rel/docs/atwRpt_web
and webFilePath is atwRpt_web.

I tried appending / before webFilePath ..no luck..i created a softlink atwRpt_web,under contextroot and pointing to the report directory.

Please let me know if you need any further detrails..

Regards,
Veena
 
Veena Grandhi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please any one suggest...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic