Importing the content of another web resource using JSTL

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.

Asked by: Melissa220 | Posted: 28-01-2022

Answer 1

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.

Answered by: Audrey481 | Posted: 01-03-2022

Answer 2

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

Meanwhile, take a look at

<%@ taglib prefix="c" uri="" %>
  url="" />

Answered by: Freddie531 | Posted: 01-03-2022

Answer 3

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.

Answered by: Daniel443 | Posted: 01-03-2022

Similar questions

eclipse - Importing Delphi Web Services into Java

I have a web server built in Delphi, and I'm trying to consume its web services on Java (I'm using Eclipse IDE) by creating a Web Service Client through the Eclipse wizard. The Web Services Explorer recognice the WSDL file, but when trying to create the client, the wizard says there's an "unexpected attribute" and does not create any file. This is my wsdl file (the one that my Delphi Web Server publishes).

java - Importing and using external schema using XML Beans

I have a bit of a problem. I wrote an API a long time ago for our production system, and it used Apache XML Beans. The schema was homogeneous (ie no imports, everything was from within the same schema), and everything worked just fine, even if the code for API handling was incredibly verbose. I've since written a far simpler and more elegant restful API using JAXB, with parts of the old one in mind, ie different schema,...

java - problem while importing the data from text to mysql

I have used an application to import some data from a text file to mysql. I have used the following code. try { stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); stmt1= (Statement) conn.createStatement(); int deleteRows = stmt1.executeUpdate("delete from powerdata where dateformat &lt; dateformat_sub(now(), interval 8 month)");...

java - Importing CSV data with Apache POI

How can I efficiently import CSV data with Apache POI? If I have a very large CSV file that I would like to store in my Excel spreadsheet, then I don't imagine that going cell-by-cell is the best way to import...?

java - Why is WSDL parser still importing external documents?

I tried to turn off importing documents in WSDL4J (1.6.2) in the way suggested by the API documentation: wsdlReader.setFeature("javax.wsdl.importDocuments", false); In fact, it stops importing XML schema files declared with wsdl:import tag, but does stop importing files declared with xs:import tags. The following code snippet [see at the end of t...

java - importing Source code into Jlist

Closed. This question does not meet Stack Overflow guid...

java - warning in importing ""

I import these:;; to use and play a sound, but compiler produce warining. the sound plays well but when I run the jar file no sound is played! NetBeans says that I'm using forbidden import. Can someone tell me "Why the jar file does not play the sound?"

import - problem in importing java class in jsp

i have created a java package in source packages in netbeans i have a jsp file in a web folder now i want to import this java package in jsp file but i am not getting my package name in import command

java - class importing in jython

I've got a jython script that needs to include a class (from JUnit in this case). I've got the junit jar in "some/path/junit.jar". My script is: from junit.textui import TestRunner TestRunner.Main(["name of some class here"]) I'm running it like this: java -cp "some/path/junit.jar" -jar jython.jar but it complains that: from ...

java - importing a text file

any way easier to do this?? i'm trying to import a file which is four lines: name phone mobile address I'm using: public void importContacts() { try { BufferedReader infoReader = new BufferedReader(new FileReader( "../files/example.txt")); int i = 0; String loadContacts; while ((loadContacts = infoReader.readLine()) != null) ...

Still can't find your answer? Check out these amazing Java communities for help...

Java Reddit Community | Java Help Reddit Community | Java Community | Java Discord | Java Programmers (Facebook) | Java developers (Facebook)