aspose file tools*
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
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://aspose.com/file-tools
 
subject: Weblogic 9.2 : Specifying path of file generated from application
 
Similar Threads
Problem with starting and stopping weblogic server
Weblogic 9.2 + log4j : Adding path to log file not working
log4j not working in Weblogic 9.2
deploying war file on weblogic 9.2
Migration of web service from WebLogic 6.1 to WebLogic Application Server 9.2