Importing the content of another web resource using JSTL - java

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.

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.

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" />

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.

Related

Tomcat issue, inconsistent NoClassDefFoundError exceptions

I have a somewhat baffling issue running a webapp in Apache Tomcat.
After deploying the page works fine, but sometime during the day, a page inevitably fails to compile.
The issue is not with the page itself, the page changes daily, which page seems to be determined by the order/frequency of access.
If nobody has accessed the log page during the day, that's the page that will break down.
If the log page has been accessed, it will keep on working until the next deploy, but another page page will break down.
By break down i mean:
http://codepad.org/V1yosH8k (jsp, more prevailant)
Stacktrace: http://codepad.org/P9VpXBRW (java)
ClassNotFoundException/NoClassDefFoundError: Obviously the class does exist, it works fine if accessed early after deploy.
It happens on the live server, but am unable to reproduce it on my dev machine.
Running apache tomcat 6 with JAVA_OPTS "-Xms1024m -Xmx1900m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=768m -XX:MaxPermSize=768m"
Anyone able to give me a push in the right direction?

How to include one page from another page in java?

I am new in java and i am developing web application in java.
I am trying to include one page to another page.But it gives path error in server side.
My another page is placed in user folder of root directory.
I am trying to include page like
<%#include file="../user_menu.jsp" %>
Its working on local host but not working in live linux server.
How can i fix this error?
Help me
Use /path/to/your/file.jsp
Where / is your public_HTML dir

My web page does not render

I am developing a evaluation system. I have set up a dynamic web project in eclipse (with apache tomcat) and have been able to successfully access and view project when accessing it on my local host. However, I just deployed it online (via a war) and when I access the site the web pages do not render. All that is shown is the code. I set the doc type and the content type in an html comment and a meta tag respectively. Why could this be happening? the site is deployed at (REMOVED) as of right now.
Firebug is a great tool to check the HTTP request/responses. Check the Net tab. Here are the HTTP response headers which I get when I access the site which you linked in the question:
Note the content type. It's wrong, it should be text/html. If you was using JSP to serve the response, then you probably had like this in top of your JSP
<%#page contentType="text/plain" %>
you should remove this (it already defaults to text/html) or if in vain, replace this by
<%#page contentType="text/html" %>
If still in vain, contact the support of your hosting.

Wicket excel Page expired

After using WebResponse to export excel then clicking a Link gives Page expired error.
Any suggestions ?
Thanks.
The session expired page usually appears when your pages are not bookmarkable and you make a request for a page to the server but the server has a different version of the page that you have requested. It shouldn't have anything to do with the session time out which is defined in the web.xml file.
As a good practice, your pages should have a constructor with PageParameters. Also be careful with the popup pages because they usually generate these kind of errors when they are not using PageParameters.
Make sure that your classes that don't extend wicket components use implements Serializable, otherwise you will often see a Page Expired error.
If this doesn't help, copy and paste the error logs so we can see the exception being thrown.

GlassFish Forbidden 403 error page

I am really confused with this error and need some help.
When accessing my link the first time in IE I type in : https://something/other/test.jsp
and I'm presented with the FORBIDDEN-403 GlassFish Enterprise Server is now Presenting The Forbidden Page error page in GlassFish.
However, if I refresh this same page then I see the results of test.jsp.
I have filters in my java code and all filters are letting test.jsp let go through.
Why am I getting the GlassFish 403 error page in this scenario? and why does it go away after refresh?
Once I see results of test.jsp...If I close IE and open it again, then again this same thing happens.
IE is notorious for page-caching. I know this from my experiences with AJAX.so maybe when you refresh the page, it shows you the cached page.

Categories

Resources