• 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

Read file from localhost?

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I remember there is security restriction to prevent web application from reading file that are located in same machine but not same web app folder, is that true?

Now I have a need to read real time log files from different folders of the tomcat/apache, could that be fulfilled? If can, is that just like normal java read file or there is some special way to do that?

What I want to do is kind of like clicking a button on a jsp file, it will go to some specific log folders (same machine) and read real time log files one by one, find the special things in the log and do other things, like run a exe file which contains dos command.

I know this can be done easily without using jsp/servlet, but i want to include this one to a existing web application.


Thanks,
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
You can read/write file using your web application which file is on different location than the web-app.
 
david arnold
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, really, then i will try it.

Thank you for the help.
reply
    Bookmark Topic Watch Topic
  • New Topic