MyEclipse, ICEfaces, and JSTL

Home Forums Archived Forums MyEclipse Archived ICEfaces Integration MyEclipse, ICEfaces, and JSTL

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of dason dason 4 years, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #314166
    Profile photo of dason
    dason
    Member

    I have the need to import external content into an ICEfaces page contained in a MyEclipse project. I had thought to use JSTL, but will settle for alternatives.
    If I start with a Web project using Java EE 5, I can add JSF support and JSF Pages without a problem.
    I can then use the JSTL tag <c:import …/> to grab what I need.

    However, when I go to the MyEclipse menu, and convert the project to an ICEfaces project by adding the 1.8.1 ICEfaces libraries, ICEfaces pages work, but the previously created JSF pages now throw an exception.
    ICEfaces pages that use <c:import…/> also throw an exception.

    How can I get ICEfaces and the JSTL <c:import…/> statement to work together?

    Here’s a little more detail:

    MyEclipse Version: 8.6.1
    ICEFaces Version: 1.8.1
    Java EE version of the web project: 5

    Sample JSF Page that worked prior to adding ICEfaces support:

    <%@ page language=”java” pageEncoding=”ISO-8859-1″%>
    <%@ taglib uri=”http://java.sun.com/jsf/html” prefix=”h” %>
    <%@ taglib uri=”http://java.sun.com/jsf/core” prefix=”f” %>
    <%@ taglib uri=”http://java.sun.com/jsp/jstl/core” prefix=”c” %>

    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+”://”+request.getServerName()+”:”+request.getServerPort()+path+”/”;
    %>

    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
    <html>
    <head>
    <base href=”<%=basePath%>”>

    <title>Test Include for JSF</title>

    <meta http-equiv=”pragma” content=”no-cache”>
    <meta http-equiv=”cache-control” content=”no-cache”>
    <meta http-equiv=”expires” content=”0″>
    <meta http-equiv=”keywords” content=”keyword1,keyword2,keyword3″>
    <meta http-equiv=”description” content=”This is my page”>
    <!–
    <link rel=”stylesheet” type=”text/css” href=”styles.css”>
    –>

    </head>

    <body>
    <f:view>
    Test JSF Include Page. <br/>
    Revision: C. <br/>

    <c:import url=”http://localhost:8080/IOP_ Template/Main.jspx”>
    </c:import>
    </f:view>

    </body>
    </html>

    Here is an ICEFaces Page that works fine without the <c:import… /> tag.

    <?xml version=”1.0″ encoding=”ISO-8859-1″ ?>
    <jsp:root version=”1.2″
    xmlns:jsp=”http://java.sun.com/JSP/Page”
    xmlns:f=”http://java.sun.com/jsf/core”
    xmlns:h=”http://java.sun.com/jsf/html”
    xmlns:c=”http://java.sun.com/jsp/jstl/core”
    xmlns:ice=”http://www.icesoft.com/icefaces/component”>
    <jsp:directive.page contentType=”text/html;charset=ISO-8859-1″ pageEncoding=”ISO-8859-1″ />
    <f:view>
    <ice:outputDeclaration
    doctypeRoot=”html”
    doctypePublic=”-//W3C//DTD HTML 4.01 Transitional//EN”
    doctypeSystem=”http://www.w3.org/TR/html4/loose.dtd” />
    <html>
    <head>
    <title>ICE Faces Include Test</title>
    <link rel=”stylesheet” type=”text/css” href=”./xmlhttp/css/rime/rime.css”/>
    </head>
    <body>

    <ice:outputText value=”IceFaces Include Test” /><br/>
    <ice:outputText value=”Revision: B” /><br/>
    <ice:form>

    <ice:messages />

    <c:import url=”http://localhost:8080/IOP_ Template/Main.jspx”>
    </c:import>

    </ice:form>

    </body>
    </html>
    </f:view>
    </jsp:root>

    Here is the exception that the ICEFaces page throws with <c:import… />:

    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: java.lang.Exception: javax.faces.FacesException: java.lang.UnsupportedOperationException
    com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:179)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    java.lang.Exception: javax.faces.FacesException: java.lang.UnsupportedOperationException
    com.icesoft.faces.context.View.servePage(View.java:142)
    com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52)
    com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
    com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:114)
    com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
    com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
    com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:42)
    com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
    com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
    com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:62)
    com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
    com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:153)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

    Thank you very much for your help,
    Dave

    #314171
    Profile photo of support-swapna
    support-swapna
    Moderator

    dason,

    JSTL in ICEfaces is only supported with Facelets. The <c:import> is not supported even by the Facelets. You can use <ui:include/> instead.

    Have a look at the following posts :

    http://www.icefaces.org/JForum/posts/list/8269.page.
    http://www.icefaces.org/JForum/posts/list/4191.page
    http://www.icefaces.org/JForum/posts/list/6562.page

    You can cross post it to the ICEFaces forum for further support.

    Hope this helps.

    #314183
    Profile photo of dason
    dason
    Member

    Thank you for your reply.

    Unfortunately, <ui:include …/> doesn’t appear to let you pull in a page from another WAR file.

    The <iframe> take is the only other thing I’ve been able to come up with. It is not ideal, but I think it will work for this particular problem.

    Best,
    Dave

Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘ICEfaces Integration’ is closed to new topics and replies.

@jacolaisen Thank you, Jacob! Looking forward to your comments about it. :)

about 1 hour ago

Follow us on social media
30
Jul

Eclipse+Web=Webclipse

Hello developers of the world!Genuitec is pleased to announce the release of Webclipse. Webclipse comes loaded with features that are aimed to cover many missing pieces of Eclipse for Web development. At Genuitec, we are a family of programmers fr...