Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSTL c:import not woking

800368Mar 2 2009 — edited Mar 3 2009
I have two jsp files A and B. A.jsp generates some content and another one B.jsp calls c:import to include the generated content.
But when ever I call the c:import with full server URL to B.jsp I get the following error.
However if I hit the same URL in my browser window it works properly and returns the data. Also if I make the URL as relative path in the same server then also it works.

Can someone help me understand why the c:import is not working here. What am I doing wrong?

--exception --

org.apache.jasper.JasperException: javax.servlet.jsp.JspException: Problem accessing the absolute URL "http://dpldev-lm87.office.maze.com:8081/weather-web/include/modules/goodNewsWeather.jspf?config_slot=good_weather". java.io.IOException: Server returned HTTP response code: 500 for URL: http://dpldev-lm87.office.maze.com:8081/weather-web/include/modules/goodNewsWeather.jspf?config_slot=good_weather

--root cause--

javax.servlet.ServletException: javax.servlet.jsp.JspException: Problem accessing the absolute URL "http://dpldev-lm87.office.maze.com:8081/weather-web/include/modules/goodNewsWeather.jspf?config_slot=good_weather". java.io.IOException: Server returned HTTP response code: 500 for URL: http://dpldev-lm87.office.aol.com:8081/weather-web/include/modules/goodNewsWeather.jspf?config_slot=good_weather
	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:837)
	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
	org.apache.jsp.include.modules.goodNewsWeatherInterface_jspf._jspService(goodNewsWeatherInterface_jspf.java:78)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
	com.aol.pubt.vl6.VL6Filter.doFilter(VL6Filter.java:88)

--root cause--

java.io.IOException: Server returned HTTP response code: 500 for URL: http://dpldev-lm87.office.maze.com:8081/weather-web/include/modules/goodNewsWeather.jspf?config_slot=good_weather
	sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1153)
	org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireReader(ImportSupport.java:331)
	org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:241)
	org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:161)
My B.jsp code. This imports the the A.jsp code.
<%@ page language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page import="com.maze.pubt.cms.CMSClient"%>

<%
    CMSClient weathercms = new CMSClient();
    weathercms.setTemplateName("weather_good_news");
    pageContext.setAttribute("weathercms", weathercms);
%>
<c:if test="${not empty weathercms}">
    <c:import url="${weathercms.slots['weather_good_news_url'].payload}">
        <c:param name="config_slot" value="good_weather"/>
    </c:import>
</c:if>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 31 2009
Added on Mar 2 2009
2 comments
2,046 views