This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 61084
    
  66

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: 61084
    
  66

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Issue in including image in a html from another server