Reputation: 274
I am uploading some documents from my application in
C:\oracle\MiddlewareWeblogic\user_projects\domains\base_domain\uploads
because from my code ,
File f=new File(".");
f.getCanonicalPath();
returns me the above path automatically (don't know how !)
I have created one folder in base_domain called 'uploads' and in it I upload user files, etc
However I want some web-based path to uploads folder , like mapping 'uploads' to , say, http://localhost:7001/<my-context-root>/UPLOADS/userdoc.pdf
Something like
<wls:virtual-directory-mapping>
<local-path>C:\oracle\MiddlewareWeblogic\user_projects\domains\base_domain\uploads</local-path>
<url-pattern>/UPLOADS/*</url-pattern>
<url-pattern>*.pdf</url-pattern>
</wls:virtual-directory-mapping>
I tried it and its different variations, but for some really strange reason it doesn't work for me :(
In my weblogic.xml file, all tags have wls: prefix, Thats how my senior made it for me.
Can anyone please help. I would be really grateful
Upvotes: 1
Views: 811