permaculture playing cards*
The moose likes JSP and the fly likes Issue in including image in a html from another server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Issue in including image in a html from another server" Watch "Issue in including image in a html from another server" New topic
Author

Issue in including image in a html from another server

nandy desikan
Greenhorn

Joined: Apr 02, 2007
Posts: 10
Hii,

I load a jsp from my application. When this jsp loads, I include static html from another application(different context root). This html is loading fine. But the call to images in this static html is through a relative path corresponding to the other application.

My problem is,the images are not loaded because of the relative path. How do I replace the relative path in this static html with the absolute path so that the images are loaded?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

Why are you including a resource from another application? That's something I would never do. Can you not make this a build-time shared resource rather than a run-time shared resourse?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
nandy desikan
Greenhorn

Joined: Apr 02, 2007
Posts: 10
How do I do that? Please advice...I am pretty new to this...
Appreciate your response regarding this....
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

How are you building these applications? Is the source in a source control system?

The best way to share resources between different apps is to share the code at build-time, rather than to try and create run-time dependencies.
 
Don't get me started about those stupid light bulbs.
 
subject: Issue in including image in a html from another server
 
Similar Threads
images display problem with dispatcher.forward()
File path in Tomcat
html img problem with base url
Help me on URL issues
Point to an image in a javascript