File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes Need help to access images with app running on Weblogic 10 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Need help to access images with app running on Weblogic 10" Watch "Need help to access images with app running on Weblogic 10" New topic
Author

Need help to access images with app running on Weblogic 10

Denia Phipps
Greenhorn

Joined: Apr 17, 2012
Posts: 1
Hi! I am stumped with this problem, so I hope somebody can help me out!

Our mature application runs on Weblogic 10.0 on unix boxes. It is an ear file deployed to what would be <app_name> directory shown below. There are images on various pages, stored in the project tree, which are deployed inside the <app_name>.war which is within the <app_name>.ear. The path of an image in the war file, for example, could be /jsp/assets/buttons/<someImage>.jpg. Then we refer to these types of images in our jsps this typical way:
/<app_name>/jsp/assets/buttons/<someImage>.jpg. All that works great.

Ear file is deployed something like this. /<dir1>/<dir2>/<dir3>/<app_name>/<app_name>.ear

My problem comes with accessing images which are procured dynamically from another server and saved to the server our app is running on thru Weblogic. I am trying to replace a legacy component image viewer which is a jar file for which we do not have source. I use the legacy code to get the image in a byte array (.tif format). Because of limitations of displaying tif format, I have to save the <image>.tif to the server, then I decode that and encode as a .png saved to the server in a place such as /<dir1>/<dir2>/<dir3>/<app_name>/images/<image>.png.

Up to this point, it's all working fine. The new viewer (external javascript code) is supposed to display the image. Essentially I am to pass to this new viewer the same URL as would go in an img tag. I coded this all up running Tomcat on my local machine, and it worked perfectly whether I referred to the images as /<app_name>/images/<image>.png, or images/<image>.png, or http://localhost:8080/<app_name>/images/<image>.png. Every one of those methods works perfectly on Tomcat locally.

I have tried a million things to try to get these dynamically saved images to display on the new viewer with our app running on Weblogic, and NOTHING WORKS. I have been working with an engineer, and we tried virtual directory mapping in weblogic.xml, alone and also in combination with different things in web.xml. Does anybody know how to get to these images? It should be the same as any img tag, but that just does not work running on Weblogic.

Also, before I got this viewer code working locally, I tried copying a jpg file (as su - weblogic) into the project tree, and simply coded an html image tag, and I was unable to display the jpg. Obviously, since these images are acquired dynamically, I cannot package them in the war file. I have read so many things on the internet, but I am completely out of ideas.

Help please!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help to access images with app running on Weblogic 10
 
Similar Threads
Development: trouble with import and classpath
Adding Images to JApplet
Read subdirectories and count files?
Unable to read Network File
Basic Ant excludes question