• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
  • Tim Holloway
  • Carey Brown
  • salvin francis

Need help to access images with app running on Weblogic 10

Posts: 1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!!!
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Six years later but I am seeing the exact same issue with my web application.

Can someone suggest a fix.

Thank you.
We should throw him a surprise party. It will cheer him up. We can use this tiny ad:
Enterprise-grade Excel API for Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!