This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes Weblogic 9.2 : Specifying path of file generated from application Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Products » BEA/Weblogic
Reply Bookmark "Weblogic 9.2 : Specifying path of file generated from application" Watch "Weblogic 9.2 : Specifying path of file generated from application" New topic
Author

Weblogic 9.2 : Specifying path of file generated from application

Viral Shah
Greenhorn

Joined: Jul 14, 2009
Posts: 8
We have a web application deployed on weblogic 9.2 as WAR file. ( Auto deploy)
For some functionality, the web application creates some files on the server. How to specify the path for the file to be created ?

For reading files we understand that getRealPath doesnt work and one has to use getResource.
But what is the equivalent solution to writing files where one needs to give some relative path to indicate where to create the file ?
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Hi,

you can use an alias mapped on weblogic.xml to point to a static resources directory.

http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webapp/weblogic_xml.html#wp1039396


another thing you may use but I STRONGLY wouldn't recommend is enabling getRealPath to work under archived deploys but that goes against J2EE specification.

To do that:
Select your domain_name in domain tree under admin console, than select web application and the las check box will be to enable archived getRealPath.

[]s
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Weblogic 9.2 : Specifying path of file generated from application
 
Similar Threads
Weblogic 9.2 + log4j : Adding path to log file not working
deploying war file on weblogic 9.2
Migration of web service from WebLogic 6.1 to WebLogic Application Server 9.2
log4j not working in Weblogic 9.2
Problem with starting and stopping weblogic server