Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help to access images with app running on Weblogic 10  RSS feed

Denia Phipps
Posts: 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!!!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!