• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please any one suggest...
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic