Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

JBoss - how to write files into the root context directory from the web application

Thread view: 
tophermiller - 15 Apr 2006 01:21 GMT
I use JBoss 2.4.7 (soon upgrading to 4).  My root web application
context is deployed outside of a war file. I want my web application to
be able to write new files into this directory tree. So, I need to
obtain a java.io.File object that points to the root of my web
application. However, this path varies from server to server. Is there
a way I can get this path from the JBoss API somehow?
Tobias Schierge - 15 Apr 2006 15:34 GMT
Hi,

> I use JBoss 2.4.7 (soon upgrading to 4).  My root web application
> context is deployed outside of a war file. I want my web application to
> be able to write new files into this directory tree. So, I need to
> obtain a java.io.File object that points to the root of my web
> application. However, this path varies from server to server. Is there
> a way I can get this path from the JBoss API somehow?

try ServletContext's getRealPath method but before rethink your idea and
evaluate if it is really a good one..

Regards,

Tobias


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.