aspose file tools*
The moose likes Tomcat and the fly likes Accessing the files not stored in tomcat directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Accessing the files not stored in tomcat directory" Watch "Accessing the files not stored in tomcat directory" New topic
Author

Accessing the files not stored in tomcat directory

dinesh Venkatesan
Ranch Hand

Joined: Oct 12, 2006
Posts: 134
Hi Friends,

I want to access the files not stored inside the tomcat folders. (stored in my hard disk D:/) through the URL.

I have done the same few months back using <Context> element but I am not able to recollect the exact procedure now. Can anybody help me?

Thanks and Regards,
Dinesh Venkatesan.
[ June 24, 2008: Message edited by: Bear Bibeault ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

The docBase attribute of Context allows you to deploy an application that isn't in the Tomcat directory structure.

This page from the Tomcat documentation should help:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
[ June 19, 2008: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Zemian Deng
Greenhorn

Joined: Jun 12, 2007
Posts: 21
Access like reading a file?

There is nothing stopping you from creating
inside a servlet.
dinesh Venkatesan
Ranch Hand

Joined: Oct 12, 2006
Posts: 134
Hi,

Thanks for the replies. However, I am not looking for reading some physical files using Input Streams. I am working around the <context> tag but not able to achieve the results. I am trying it out.

Thanks again.

Thanks and Regards,
Dinesh Venkatesan.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Accessing the files not stored in tomcat directory
 
Similar Threads
Need Help reading files from a server
General Query about Servlet
servlet context log info
servlet location
where to store the .htm files related to the servlet