aspose file tools*
The moose likes Servlets and the fly likes Servlets and File I/O Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets and File I/O" Watch "Servlets and File I/O" New topic
Author

Servlets and File I/O

John R Roberts
Ranch Hand

Joined: Dec 27, 2006
Posts: 36
Hi all,
I am developing an application that will run in a clustered application server. My app will have message driven beans and session beans. Now I know that you should not have any file I/O in that environment and that is fine. The question is that if I have servlets running within that application aswell can I safely let the servlet access the file system to read or write files.

thanks,
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6657
    
    5

Your servlets should have no problem accessing the file system. As long as you dont let EJBs do the IO work it should work


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12671
    
    5
Note that Java provides very fine control over the IO allowed by a web application. For example in Tomcat, with security turned on, a servlet can be allowed to read/write etc in only one specific directory location.

Bill


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlets and File I/O
 
Similar Threads
packing
Isolation of EARs (and EJB3)
JBoss instances cooperating.
Using servlets to convert XML to CSV file
Writing/appending to text file