views:

205

answers:

3

I have a JSP page that will display the exact content of another web page on a different server. My understanding was that c:import from the JSTL should be able to include content from files that are not part of the current web application.

I added c:import url="page on my server in a different application" and it works fine, but when I try to include a page from another server it fails.

Any suggestions as to what might be wrong?

EDIT: The exact error is: "The server encountered an internal error () that prevented it from fulfilling this request.". However, requesting a page from the same server, different app works...I get the content of the page.

+1  A: 

An exact code and how "it fails" would be a great help. All mind-readers are currently on vacation.

Meanwhile, take a look at http://www.ibm.com/developerworks/java/library/j-jsp06173.html

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
...
<c:import 
  url="http://www.truenorthguitars.com/Clients/Richman/index.htm" />
Vladimir Dyuzhev
A: 

If it works from the same server, different app, makes it possible that there's a variable that's not being initialized somewhere, or some state which makes it throw an exception. Check the error logs for any stack traces that could point to the specific line of code that's causing the problem.

Athena
+1  A: 

I had a similar error once. It turned out to be that the machine that I was running the app on had some problems connecting to the internet through the firewall. Once I deployed the app to a machine that was always connected it worked fine.

Morgul Master