aspose file tools*
The moose likes Servlets and the fly likes getRealPath() returns null using Weblogic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "getRealPath() returns null using Weblogic" Watch "getRealPath() returns null using Weblogic" New topic
Author

getRealPath() returns null using Weblogic

Michael Palka
Greenhorn

Joined: Jun 14, 2002
Posts: 14
Hello
Im using getRealPath() to acces config files within my web app structure, but Weblogic does not extract the .war file but works directly from then, so the proper directories are not being made. This results in that getRealPath returns null.
Is there any way to configure Weblogic 6.1 to extract the .war files ?
My .war file works perfectly with e.g tomcat 3.x & 4.x. I also tryed Jrun, worked fine aswell.
Shubhrajit Chatterjee
Ranch Hand

Joined: Aug 23, 2001
Posts: 356
I have read somewhere in the documentation that it always return null, when it cannot find a valid path info. I faced the same problem using Weblogic 5.1. Hold on ... I'll see if I can find the document


Shubhrajit
Shubhrajit Chatterjee
Ranch Hand

Joined: Aug 23, 2001
Posts: 356
Look here
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html and look at the getRealPath() documentation
Michael Palka
Greenhorn

Joined: Jun 14, 2002
Posts: 14
Thank you
Michael Palka
Greenhorn

Joined: Jun 14, 2002
Posts: 14
Actually i read that to, and the thing is that it cant finnd the valid path info only because Weblogic does not extract the war file but works within it. If you use e.g Tomcat it extracts your war file and everything works fine.
Is there maybe a way to modify Weblogic server to extract war files ?? I have to read curtain conf files within the structure and also upload files
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
Welcome to the JavaRanch! Please adjust your displayed name to meet
the JavaRanch
Naming Policy
. You can change it here.
Thanks!
and welcome to the JavaRanch!
[ June 14, 2002: Message edited by: Paul Stevens ]
 
 
subject: getRealPath() returns null using Weblogic