wood burning stoves 2.0*
The moose likes JSP and the fly likes JSTL: c:import - java script include issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL: c:import - java script include issue" Watch "JSTL: c:import - java script include issue" New topic
Author

JSTL: c:import - java script include issue

Prakash Nathan
Greenhorn

Joined: Sep 11, 2005
Posts: 6
Hi

My application is deployed in JBoss application server.
I need to include a HTML file ( which is present in different apache server ) into the JSP.

Im using the following jsp snippet to accomplish the same.

<c:import url="--apache server html file path--"/>

Here is where i need help..

The HTML file has few java script includes of the following type.
<script language="JavaScript" src="../../../globalscript.js"> </script>

The java script files resides in Apache server.
Im not able to give absolute url to include javascript due to other issue.

But when i import the HTML, the app server is searching for java script files in JBoss environment and not in Apache environment.Hence, the scripts files are not properly included.

Is there any way to include java scripts in such case?

Thanks
Prakash A
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

This has little to do with the import. When the HTML is sent to the browser, the browser will look for the JavaScript files wherever the script directives say. So if they are on a different server than that which served the page, you have no option but to use the full and absolute URL.

If you have persmission to be importing the content, you should also have permission to copy the JavaScript files to your local server. If you don't have permission, well...


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSTL: c:import - java script include issue
 
Similar Threads
Appliation Server - HTML Include
c:import and header file question
Simple Question
Serving Content from Outside the context
Accessing resources out of context