JSF Trinidad, JSTL taglib

Hi,
Im trying to deploy a web application which uses trinidad ui components within jsp pages.
It deploys ok, but whenever i hit a .jsf page (which is then taken and matched with the right jsp page), it gives the following error in the log about it not being able to parse the URI of "http://myfaces.apache.org/trinidad" and therefore the taglib was seemingly made invalid.
I tried to get the .tld file from the jar and reference it in the web.xml, but it made no difference.
Any ideas?
Regards,
Andrew

I have had similar messages with taglibs - it was because the .tld files were DTD- based and CE 7.1 doesn't seem to like the older DTD definitions. Have a look and see if there is a newer version that uses an XML schema definition. I've had a look at JSF Trinidad and it appears v 1.0.6 has DTDs but 1.2.6 is Schema based.
A lot of the issues we've been having are not to do with CE7.1 but the change from J2EE to JEE 5 e.g. using the Java Standard TagLibrary where the old jstl.jar and Standard.jar have been left in the the /lib directory.
Hope this helps
Ben
Edited by: Ben Newton on Feb 13, 2008 1:55 PM

Similar Messages

  • Jstl taglib causes SAXParseException

    I'm having a strange problem with Weblogic Server 7.0 and the JSTL taglib
              from Apache Jakarta. I've isolated the problem to the JSTL taglib
              declaration in my JSP. Whenever the taglib is included in a JSP, the page
              fails to load and displays "Error 500--Internal Server Error". An exception
              appears in the server log complaining that "The value of attribute "import"
              must begin with either a single or double quote character." However, the
              import attribute is correctly quoted. Experimentation showed that the JSP
              parser fails on the first attribute of any tag on the page whenever the JSTL
              taglib is included. Removing the taglib declaration makes the error
              disappear, and removing all tags but the taglib declaration also makes the
              problem disappear. The page runs fine on Tomcat. Any ideas what's wrong?
              Thanks,
              Dave
              Here's a minimal JSP that recreates the problem:
              [start page]
              <%@ page import="java.io.InputStream" %>
              <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
              [end page]
              Here's the exception stack trace from the console:
              <Oct 28, 2002 8:41:12 PM PST> <Error> <HTTP> <101019>
              <[ServletContext(id=4925452,name=cdshopcart,co
              ntext-path=/cdshopcart)] Servlet failed with IOException
              java.io.IOException: javax.servlet.jsp.JspException: The taglib validator
              rejected the page: "org.xm
              l.sax.SAXParseException: The value of attribute "import" must begin with
              either a single or double q
              uote character., "
              at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:124)
              at
              weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:255)
              at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:348)
              at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:206)
              at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:160)
              at
              weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:44
              7)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :287)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :376)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :242)
              at
              weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
              ebAppServletC
              ontext.java:5360)
              at
              weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
              r.java:721)
              at
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
              ntext.java:30
              43)
              at
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
              :2468)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
              and here's a transcript of my web.xml file:
              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE web-app
              PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
              "http://java.sun.com/dtd/web-app_2_3.dtd">
              <web-app>
              <session-config>
              <session-timeout>
              30
              </session-timeout>
              </session-config>
              <welcome-file-list>
              <welcome-file>
              index.jsp
              </welcome-file>
              <welcome-file>
              index.html
              </welcome-file>
              <welcome-file>
              index.htm
              </welcome-file>
              </welcome-file-list>
              <taglib>
              <taglib-uri>"http://java.sun.com/jstl/core"</taglib-uri>
              <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
              </taglib>
              </web-app>
              

    Ok, sorry, but this topic (including JSTL into logon page) has been already discussed.
    So, does anyone know another solution how to include a page like masthead into the logon page?
    Best Regards
    Philipp Kölsch

  • Difference in ADF, JSF, Trinidad, MyFace

    Hi,
    I need a brief explanation on ADF, JSF, Trinidad and MyFace. What are the similarities and the differences among them? More elaboration on price, license, the history, and the situation & condition to apply, IDE to work on for each product would be greatly appreciated.
    Thanks

    So Apache has 2 projects of ADF? i.e. MyFaces and Trinidad.
    Apache has 5 JSF related projects:
    - MyFaces: JSF implementation
    - Trinidad: JSF extension that is the evolution of ADF Faces 10g
    - Tomahawk: JSF extension with a small but useful component set
    - Tobago: A richer set than Tomahawk, but not as feature packed as Trinidad imho
    - Orchestra: A JSF extension focusing on the controller layer, not on component. It allows conversations, better web flows and such, but I didn't play a lot with that project so I cannot provide much insight
    And why Oracle would like grant ADF Faces extended component to Trinidad while Trinidad is free and ADF Faces is Oracle proprietary. People will start using Trinidad instead of Oracle ADF Faces and Oracle is not making any money then.
    Ah, a business model related question. There are many reasons why a company may decide to invest in open source:
    - Allows other people to contribute to the code base, without having to pay them, effectively reducing the maintenance cost
    - Look "cool" and open minded, not evil corporate-ish. This is therefore good for PR and is often perceived positively by the community, making the company more appealing as a potential employers. Also, contributors to open source projects, happen to be both the most passionate and skilled in their field most of the times, making them interesting resources for the company as well.
    - Increase the adoption level of the product, thus producing an Halo effect.
    Now the money side. If you cannot make money out of the product itself, nothing prevents you from offering the best tool integration as well. That tool can also happen to integrate other technologies that are themselves not free, like the AS or the remaining of the ADF stack for that matter. Most project managers will prefer to use the AS integrated with the tool rather than having to test and maintain both environment (the IDE and production one). Also, even if you don't make money that way, you can still sell expertise and who knows a technology better than the ones who created it? Last time I checked, Oracle Consulting was not the cheapest option around, but if they're the best ist's it worth it?
    Hmm this is would be a hard choice; richer UI over lesser browser selection and more CPU consumption. But People will choose the free one I guess. This lead us back to Why Oracle grant a free Trinidad to have "rich" UI?
    Actually, from my experience it's the opposite, Web 2.0 and Rich Web Application are buzz words in the industry and a hype can move market. Furthermore, the supported browser set difference is not that bad, it's mainly the horrible IE6 abomination that should not have ever existed in the first place. As for the CPU load on the client, well, most people don't use half of their CPU horsepower nowadays.
    Good point. How much ADF Faces 11g richer than Apache Trinidad? Free license could be a big impact. Can I conclude that the richness of Trinidad is much more than JSF? If yes, I will take Trinidad for sure. Or Is Trinidad has the same level of richness with JSF?
    Trinidad is infinitely richer than JSF 1.1 and 1.2 (the difference is a bit smaller with JSF 2.0, but that on is not really option just yet). ADF Faces 11g is much richer than Trinidad imho, but why not compare yourself:
    Trinidad: http://www.irian.at/trinidad-demo/faces/index.jspx
    ADF Faces 11g: http://jdevadf.oracle.com/adf-richclient-demo/faces/index.jspx
    Regards,
    ~ Simon

  • JDevelopper 10.1.3.3 + JSF Trinidad error 405

    Hi,
    First, scuse for my english, i'm french.
    Hi have Trinidad 1.0.2 Distribution for JSF 1.1 in my JDevelopper.
    Here is my web.xml :
    <?xml version = '1.0' encoding = 'ISO-8859-1'?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    <!--<param-value>client</param-value> mettre à serveur pour la prod.-->
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE</param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.trinidad.CLIENT_STATE_METHOD</param-name>
    <param-value>token</param-value>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.trinidad.CHANGE_PERSISTENCE</param-name>
    <param-value>session</param-value>
    </context-param>
    <context-param>
    <param-name>Identifiant</param-name>
    <param-value>username</param-value>
    </context-param>
    <context-param>
    <param-name>MotDePasse</param-name>
    <param-value>password</param-value>
    </context-param>
    <context-param>
    <param-name>UrlBD</param-name>
    <param-value>jdbc:oracle:thin:@KEKATA.enap.ca:1521:DB</param-value>
    </context-param>
    <filter>
    <filter-name>trinidad</filter-name>
    <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>trinidad</filter-name>
    <servlet-name>faces</servlet-name>
    </filter-mapping>
    <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>resources</servlet-name>
    <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
    </servlet>
    <listener>
    <listener-class>ca.enap.brel.serveur.listeners.ContextListener</listener-class>
    </listener>
    <listener>
    <listener-class>ca.enap.brel.serveur.listeners.RequestListener</listener-class>     
    </listener>
    <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/adf/*</url-pattern>
    </servlet-mapping>
    </web-app>
    Here is my face-config.xml :
    <?xml version="1.0"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_0.dtd" >
    <faces-config>
    <application>
    <default-render-kit-id>
    org.apache.myfaces.trinidad.core
    </default-render-kit-id>
    </application>
    <managed-bean>
    <managed-bean-name>EtudiantCoordonneesBean</managed-bean-name>
    <managed-bean-class>ca.enap.brel.etudiant.profilsociodemographique.clientetserveur.affaires.EtudiantCoordonneesBean</managed-bean-class>
    <managed-bean-scope>application</managed-bean-scope>
    </managed-bean>
    <managed-bean>
    <managed-bean-name>AdresseBean</managed-bean-name>
    <managed-bean-class>ca.enap.brel.etudiant.profilsociodemographique.clientetserveur.affaires.AdresseBean</managed-bean-class>
    <managed-bean-scope>application</managed-bean-scope>
    </managed-bean>
    <managed-bean>
    <managed-bean-name>TelephoneBean</managed-bean-name>
    <managed-bean-class>ca.enap.brel.etudiant.profilsociodemographique.clientetserveur.affaires.TelephoneBean</managed-bean-class>
    <managed-bean-scope>application</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/etudiantVueMain.jsp</from-view-id>
    <navigation-case>
    <to-view-id>/dossierFinancier.jsp</to-view-id>
    </navigation-case>
    <navigation-case>
    <to-view-id>/dossierAcademique.jsp</to-view-id>
    </navigation-case>
    <navigation-case>
    <to-view-id>/profilSocioDemographique.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/profilSocioDemographique.jsp</from-view-id>
    <navigation-case>
    <from-outcome>Transmettre</from-outcome>
    <to-view-id>/dossierFinancier.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    He is my profilSocioDemographique.jsp:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://myfaces.apache.org/trinidad/html" prefix="trh"%>
    <%@ taglib uri="http://myfaces.apache.org/trinidad" prefix="tr"%>
    <%@ page import="javax.faces.context.FacesContext" %>
    <%@ page import="ca.enap.brel.etudiant.profilsociodemographique.clientetserveur.affaires.EtudiantCoordonneesBean" %>
    <%@ page import="ca.enap.brel.utilitaires.client.Transaction" %>
    <%@ page import="ca.enap.brel.utilitaires.client.UtilitairesClient" %>
    <%@ page import="java.util.*" %>
    <%@ page import="javax.faces.application.Application" %>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>profilSocioDemographique</title>
    </head>
    <body>
    <h:form>
    <tr:panelHorizontalLayout>
    <tr:panelBox text="Adresse actuelle de correspondance"
    background="dark">
    <tr:inputText value="#{EtudiantCoordonneesBean.adresseCorrespondance.ligne1}"/>
    <tr:inputText value="#{EtudiantCoordonneesBean.adresseCorrespondance.ligne2}"/>
    <tr:inputText value="#{EtudiantCoordonneesBean.adresseCorrespondance.ligne3}"/>
    <tr:inputText value="#{EtudiantCoordonneesBean.adresseCorrespondance.codePostal}"/>
    </tr:panelBox>
    <tr:panelBox text="Adresse à venir de correspondance"
    background="dark">
    <tr:inputText value="#{EtudiantCoordonneesBean.adresseCorrespondanceFuture.ligne1}"/>
    <tr:inputText value="#{EtudiantCoordonneesBean.adresseCorrespondanceFuture.ligne2}"/>
    <tr:inputText value="#{EtudiantCoordonneesBean.adresseCorrespondanceFuture.ligne3}"/>
    <tr:inputText value="#{EtudiantCoordonneesBean.courriel}"/>
    <tr:inputText value="#{EtudiantCoordonneesBean.adresseCorrespondanceFuture.codePostal}"/>
    </tr:panelBox>
    </tr:panelHorizontalLayout>
    <tr:panelButtonBar>
    <h:commandButton value="Transmettre" /><br>
    <tr:resetButton text="Restaurer"/><br>
    </tr:panelButtonBar>
    </h:form>
    </body>
    </html>
    </f:view>
    When i go to localhost/myProject/faces/profilSocioDemographique.jsp and i click on the commandButton (Transmettre), i have this error : ERROR HTML 405 : HTTP POST not allowed ....
    Here is the list of the librairies :
    - commons-beanutils
    - commons-collections
    commons-logging
    commons-lang
    jsf-facelets
    trinidad-api1.0.2
    trinidad-impl 1.0.02
    JSF
    JSP Runtime
    JSTL
    Someone can help me ??
    I have also this problem in my log of tomcat :
    WARNING: Trying to attach RenderingContext to a thread that already had one.
    2007-09-05 14:49:46 org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit encodeFinally
    WARNING: No RenderingContext available
    Can someone can help me ?? I dont know why i am unabled to post a simply form with a command button.....
    Message was edited by:
    user591085

    Hello,
    Try something like that, it works fine for me.
    Web.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
             version="2.5" >
        <description>Empty web.xml file for Web Application</description>
        <!-- Section Paramètres -->
        <!-- Spécification Servlet - Configuartion de la session -->
        <session-config>
            <session-timeout>30</session-timeout>
        </session-config>
        <!-- Section - Mime -->
        <mime-mapping>
            <extension>html</extension>
            <mime-type>text/html</mime-type>
        </mime-mapping>
        <mime-mapping>
            <extension>txt</extension>
            <mime-type>text/plain</mime-type>
        </mime-mapping>
        <!-- Specification JSF 1.1 -->
        <!-- Conservation de l'arbre JSF: server ou client -->
        <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>server</param-value>
        </context-param>
        <!-- Specification Trinidad ... -->
        <!-- Trinidad also supports an optimized strategy for caching some
       view state at an application level, which significantly improves
       scalability.  However, it makes it harder to develop (updates to
       pages will not be noticed until the server is restarted), and in
       some rare cases cannot be used for some pages (see Trinidad
       documentation for more information) -->
        <context-param>
            <param-name>org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE</param-name>
            <param-value>false</param-value>
        </context-param>
        <!-- If this parameter is enabled, Trinidad will automatically
           check the modification date of your JSPs, and discard saved
           state when they change;  this makes development easier,
           but adds overhead that should be avoided when your application
           is deployed -->
        <context-param>
            <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
            <param-value>false</param-value>
        </context-param>
        <context-param>
          <param-name>org.apache.myfaces.trinidadinternal.renderkit.USE_DIALOG_POPUP</param-name>
          <param-value>false</param-value>
        </context-param>
        <context-param>
          <param-name>org.apache.myfaces.trinidadinternal.DISABLE_CONTENT_COMPRESSION</param-name>
          <param-value>true</param-value>
        </context-param>
        <context-param>
          <param-name>org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT</param-name>
          <param-value>true</param-value>
        </context-param>
        <servlet>
            <servlet-name>FacesServlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>FacesServlet</servlet-name>
            <url-pattern>/faces/*</url-pattern>
        </servlet-mapping>
        <!-- Section - Filtre Trinidad - TOUJOURS PLACÉS COMME PREMIER FILTRE (Les filtres sont toujours exécutés avant le servlet concerné) -->
        <filter>
            <filter-name>trinidad</filter-name>
            <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
        </filter>
        <filter-mapping>
            <filter-name>trinidad</filter-name>
            <servlet-name>FacesServlet</servlet-name>
        </filter-mapping>
        <servlet>
            <servlet-name>resources</servlet-name>
            <servlet-class>
              org.apache.myfaces.trinidad.webapp.ResourceServlet
            </servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>resources</servlet-name>
            <url-pattern>/adf/*</url-pattern>
        </servlet-mapping>
    </web-app>
    faces-config.xml
    <?xml version="1.0" encoding="windows-1252"?>
    <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
                  version="1.2">
      <application>
        <default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>
        <locale-config>
          <default-locale>fr</default-locale>
          <supported-locale>fr-ca</supported-locale>
          <supported-locale>fr</supported-locale>
          <supported-locale>fr-fr</supported-locale>
        </locale-config>
      </application>
    trinidad-config.xml
    <?xml version="1.0" encoding="windows-1252"?>
    <trinidad-config xmlns="http://myfaces.apache.org/trinidad/config"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:shemaLocation="http://myfaces.apache.org/trinidad/config trinidad-config.xsd">
      <accessibility-mode>inaccessible</accessibility-mode>
      <client-validation>DISABLED</client-validation>
      <skin-family>simple</skin-family>
      <time-zone>America/New_York</time-zone>
    </trinidad-config>
    page.jspx
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:trh="http://myfaces.apache.org/trinidad/html"
              xmlns:tr="http://myfaces.apache.org/trinidad">
      <jsp:directive.page contentType="text/html;charset=windows-1252"/>
      <f:view>
        <trh:html>
          <trh:head title="Test page">
            <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
          </trh:head>
          <trh:body>
            <tr:form>
              <tr:inputDate label="inputDate Trinidad"/>
            </tr:form>
          </trh:body>
        </trh:html>
      </f:view>
    </jsp:root>

  • JSF and JSTL.  :'(

    I'm trying to include a "jspx" component if the user has a role, but "c:if" seems not to work.
        <f:view>
        ${submenu}
        ${not empty submenu}
        <c:if test="#{not empty submenu}"><jsp:include page="${submenu}" /></c:if>
       </f:view>The first 2 lines print
    mysubmenufile.jspx
    true
    ... other code, not my included file! :'(
    Why it doesn't work. I'm using .tag files, and it works fine, but i've to use scriptlet code, like
    <% if (cond) { %>lot of unpretty JSF tags<% } %>
    Can somebody help me to fix it?

    JSTL and JSF don't really play together that well.
    I don't know if JSTL tags can understand the #{expr} expr.
    Mostly I find it easier to just use JSF.
    Any time you include a page, I believe you need to use <f:subview> tags
    Why not use that and the rendered attribute to accomplish the same thing:
    <f:subview id="submenuView" rendered="#{not empty submenu}">
      <jsp:include page="${submenu}" />
    </f:subview>Does that work?

  • Jsp:include doesn't work in JSF (Trinidad)

    Hallo,
    first: i'm a newbe in JSF - so sorry for stupid questions.
    I would like to include a page with some trinidad-tags in my jsf-page (into the body).
    But running the application the included page isn't shown. Looking to the generated html-code the included code is shown between the head- and body-tag -> not rendered as html-tag but still as trinidad-tags.
    I do not understand why :(
    I tried to integrate my jsp:inlcude with <f:subview> and also with <h:panelGroup> but without different results. Also I've tried to use <jsp:directive.include> but nothing different happens.
    Does anybody know what I'm doing wrong?
    Thanks for help

    The way I include another faces file is to use the following syntax:
    <body>
    <jsp:include page="/header.jsp"/>
    the header.jsp file is a file that contains JSF components, but its included using the jsp extension since you already within the mist of a request.
    And in the included file, you MUST have everything surround with a subview tag with an ID attribute...
    <f:subview id="headerView">
    </f:subView>
    And lastly, something to always remember...everything in your included page must be contained within JSF components. You cannot have straight html, it must be surrounded with verbatim tags. The reason being when the page is included, the components from the page are included into the main pages component tree. The HTML from those components is output and then any regular html markup in the page is output AFTER the components output.

  • Jdev 10.1.2 problem define jstl tagLib

    hi,
    i have a problem in my jsp when i compile it with JDev 10.1.2, when trying to use JSTL tag:
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    I always get the following message:
    Error(3,49): Attribute 'xmlns' used but not declared.
    Error(4,58): Attribute 'xmlns:xsi' used but not declared.
    Error(5,105): Attribute 'xsi:schemaLocation' used but not declared.
    Error(6,18): Attribute 'version' used but not declared.
    Error(33,19): Invalid element 'context-param' in content of 'web-app', expected elements '[resource-ref, security-constraint, login-config, security-role, env-entry, ejb-ref, ejb-local-ref]'.
    Error(34,18): Invalid element 'description' in content of 'context-param', expected elements '[param-name]'.
    but i saw this tutorial http://www.oracle.com/technology/products/jdev/tips/schalk/taglibs/taglibs.html
    and i check my preferences about my projet, i had the libraries standart.jar and jstl.jar to my project (Project Properties->Profile->developement->Libraries), and they are located in my <project>/public_html/WEB-INF/lib/
    And for the declaration of the taglib,
    Tools->Manage Libraries-> JSP TagLibraries the prefix "c" is defined, and it is the same uri what i'm using in my jsp.
    I make another with jdev 10.1.3, and i put my project, i compile and it work very fine.
    Thanks for any help.
    Regis.

    Hi this is my Web.xml
    I do not have a DTD with the web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
    <display-name>jGallery</display-name>
    <context-param>
         <param-name>useDataBase</param-name>
         <param-value>false</param-value>
    </context-param>
    <context-param>
         <param-name>dataSource</param-name>
         <param-value>java:comp/env/jdbc/jGallery</param-value>
    </context-param>
    <context-param>
         <param-name>thumbnailWriter</param-name>
         <param-value>de.jwi.jgallery.toolkit.ToolkitThumbnailWriter</param-value>
    </context-param>
    <resource-ref>
    <description>DB Connection</description>
    <res-ref-name>jdbc/jGallery</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <context-param>
         <description>separate with commas</description>
         <param-name>dirmappings</param-name>
              <param-value>/=D:/temp/jg</param-value>
    </context-param>
    <servlet>
    <servlet-name>Controller</servlet-name>
    <servlet-class>de.jwi.jgallery.servlets.Controller</servlet-class>
         <init-param>
              <description>Path prefix, that maps to web ressources</description>
              <param-name>webprefix</param-name>
              <param-value>/web/</param-value>
         </init-param>
    </servlet>
    <servlet>
    <servlet-name>StatisticsController</servlet-name>
    <servlet-class>de.jwi.jgallery.servlets.StatisticsController</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Controller</servlet-name>
              <url-pattern>*.html</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>StatisticsController</servlet-name>
         <url-pattern>/Statistics/*</url-pattern>
    </servlet-mapping>
    <!--
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>jGallery</web-resource-name>
    <url-pattern>/Statistics</url-pattern>
    </web-resource-collection>
    <auth-constraint>
         <role-name>manager</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>FORM</auth-method>
    <realm-name>Example Form-Based Authentication Area</realm-name>
    <form-login-config>
    <form-login-page>/security/login.jsp</form-login-page>
    <form-error-page>/security/error.jsp</form-error-page>
    </form-login-config>
    </login-config>
    <security-role>
    <role-name>manager</role-name>
    </security-role>
    -->
    <welcome-file-list>
         <welcome-file>jGallery.htm</welcome-file>
    </welcome-file-list>
    <jsp-config>
    <taglib>
    <taglib-uri> http://www.jwi.de/jGallery/taglib </taglib-uri>
    <taglib-location> /WEB-INF/jGallery.tld </taglib-location>
    </taglib>
    </jsp-config>
    </web-app>
    I'm not using the JSTL 1.1, in the "management libraries"
    i define a JSTL librarie and the version is 1.0.

  • JSF and JSTL integration

    Can anyone tell me how to access JSF objects from JSTL tags?
    I want to set a requestScope flag in my changeListener
    ... context.getExternalContext().getRequestMap().put("xxx","ok"); ... and render output depending on existance of this flag:
    ...<c:if test="${requestScope.xxx!=null}" > .... .
    This examplecode doesn't work, JSTL tags cannot access this var! How can I do that?
    What I realy want is to reload another frame when user changed a specific input field.
    Above code should add a JavaScript to reload the frame if this is true .
    I can't do this on submit because the other framepage uses the stored/modified data.
    Maybe there's a better approach for this anyway?
    Thanks for your help!

    Thanks for your help - I found it was my own mistake why it didn't work. Now it does, as you said.
    But in the meentime I ran into another Problem mixing JSTL und JSF:
    I want to build a SelectOneMenu and populate it with data from a database, but with selectItemValue
    other than selectItemLabel (value should be numeric DB-ID, label a readable name).
    Since "selectItems" allows only one dimensional Arrays (?) as parameter, I must use "selectItem" for
    each row. So I wrote following code:
    <h:selectOneMenu id="m1" value="#{worktime.employee}">
       <sql:query var="employees" dataSource="jdbc/WebOfficeDB">
           select oid,displayname from employees order by displayname asc
        </sql:query>
        <c:forEach var="row" items="${employees.rows}" >
           <f:selectItem itemValue="#{row.oid}" itemLabel="#{row.displayname}" />
        </c:forEach>
    </h:selectOneMenu>This doesn't work, I get NullPointer Exceptions from selectItem.setValue().
    I think because JSF "#" references another context than JSTL "$" - is this correct?
    So I tried to set a JSTL variable inside the forEach loop to access the datarow
    <c:set var="data" value="${row}" scope="request"/>
    <f:selectItem itemValue="#{requestScope.data.oid}" itemLabel="#{requestScope.data.displayname}" />
    ...The effect is that all lines of the selectOneMenu have the same content (from the last datarecord)!?
    Since this is my first project in JSTL and JSF and should stay a small one I don't want to go into building
    CustomComponents and so on for such a simple Task.
    I would be very very happy for some tips and hints, since I think this mixing of JSTL and JSF Context
    will be a very common problem within my project.
    Thanks

  • JSF and JSTL 1.2...please help, i`m going nuts

    Hey guys,
    This is driving me up the wall. I`m running glassfish v2 b19 (i havent upgraded, because this one works for me).
    But i have a problem using jstl in my jsf app. i`m trying to do the following :
                                                    <c:choose>
                                                        <c:when test="#{currentRow.value['dboSTANDBY_LOG.STANDBY_LOG_TYPE'] eq 'server'}">
                                                            <webuijsf:tableColumn binding="#{standby$Standby_Log.tableColumn19}" headerText="NAME"
                                                                id="tableColumn19" sort="dboSTANDBY_LOG.SBYN_HOST_NAME" width="40">
                                                                <webuijsf:staticText binding="#{standby$Standby_Log.staticText20}" id="staticText20" text="#{currentRow.value['dboSTANDBY_LOG.SBYN_HOST_NAME']}"/>
                                                            </webuijsf:tableColumn>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <webuijsf:tableColumn binding="#{standby$Standby_Log.tableColumn17}" headerText="NAME"
                                                                id="tableColumn17" sort="dboSTANDBY_LOG.APPL_SYSTEMS_PROP_INNUMBER" width="40">
                                                                <webuijsf:staticText binding="#{standby$Standby_Log.staticText18}" id="staticText18" text="#{currentRow.value['dboSTANDBY_LOG.APPL_SYSTEMS_PROP_INNUMBER']}"/>
                                                            </webuijsf:tableColumn>
                                                        </c:otherwise>
                                                    </c:choose>
    but the app server fails on building the page saying :
    According to the TLD, the attribute test is not a deferred-value or deferred-method, but the specified value contains a #-expression
    Now as far as i now, JSTL 1.2 should be included in J5EE, which is in glassfish already, correct?
    and JSTL 1.2 supports using deferred expressions, correct?
    So why for the love of my sanity is this not working?
    aaaaaa.
    Thanks
    D

    I haven't actually used/tried this myself, and I am not a JSF expert, this error looks similar to the error message attribute xxx does not support runtime expressions.
    I think you are reading the error message wrong.
    You have supplied a deferred expression. No question of that.
    I think the error is saying that the 'test' attribute of the <c:when> tag does not support deferred evaluation. - ie you cant use #{expr} with the <c:when> tag.
    According to the JSTL1.2 spec, it seems that "deferred expressions" are only supported by the looping tags (<c:forEach> and <c:forTokens>) and the <c:set> tag.
    I think the JSF equivalent would be the rendered attribute. Can you use the rendered attribute with the webuijsf:tablecolumn tag? Or another JSF container type tag?

  • Deployment of JSF Trinidad application on Tomcat 6

    I have a JSF application made using Trinidad components. What is the minimum hardware configuration required for a good performance as I found that the performance of this application is very poor when compared to a struts 1.2 application. The response times are simply too high.
    Edited by: CPGupte on 17 Apr, 2008 12:25 AM

    No problem.
    Make sure your resources are set at the proper location. Could be that tje jni.jar is under a 'lib' folder?
    Normally you don't have to worry about deployment a lot if you are using like Netbeans 7.2 or higher.
    When you press 'Clean and build' it creates your deployed files in the 'dist' folder.
    You can change specification by adapting the build.xml file.
    Of course lot of different possibilities are available for deployment!
    You can find lot of info here:
    [http://docs.oracle.com/javafx/2/deployment/jfxpub-deployment.htm|http://docs.oracle.com/javafx/2/deployment/jfxpub-deployment.htm]
    Important to know is if you want to work with
    - a standalone application (self-contained or not)
    - with webstart
    - or with applets
    (In my case I'm using webstart, but also Self-Contained Application Packaging (jre is also installed!)

  • Mixing JSF and JSTL

    Hi group,
    I need some help with the following. I'd want to make use of a JSF managed bean (request scope) within a JSTL tag. This is not possible unless the JSF managed bean was accessed before within a JSF tag. That time the bean will be initialized.
    How can I make sure the JSF managed bean is properly initialized so I can use it within my JSTL tags?
    Thanks!

    I'm using IBM Websphere portal (V6). Right now I have no access to the code and cannot provide you with a sample. However, I'm sure the code is fine as when I move the JSTL code to after the JSF code (so that the managed bean gets initialized by the JSF tag) it all works without problems...
    Regards,

  • JSF and JSTL fmt:message

    I have the following JSP:
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
    <html>
    Language: <fmt:message key="test.language"/>
    </html>When I run this without faces (http://localhost:8080/myapp/test.jsp), it works fine, the language for the message is choosen by the browsers language setting. If I run this thru faces servlet (http://localhost:8080/myapp/faces/test.jsp) the message is english always and the browser setting is ignored (english is the default language of the VM running tomcat).
    It may be a problem in JSTL because request.getLocale() returns the correct locale in both cases.
    Any ideas?
    I tried JSTL 1.0.5, Tomat 4.1.30 and 5.0.19
    Thanks a lot
    Andreas

    JSF sets the locale for the view to the locale specified by the Accept-Language request header (i.e., the user's browser language setting) that is the best match for the locales defined as the default or supported locales in faces-config.xml, or to the JVM default locale if none of them matches. The selected locale is made available for JSTL i18n actions (when you use JSP for the view), so as long as you define all locales you support in faces-config.xml, your page shouldwork fine.

  • JSTL taglib declarations

    In new JSP 2.0 pages, I found there are two different types declarations:
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    What's the difference between them? Thanks!

    <%@ taglib prefix="c" > uri="http://java.sun.com/jstl/core_rt" %>Supports JSP Scripting
    <%@ taglib prefix="c" > uri="http://java.sun.com/jsp/jstl/core" %>Supports Expression Language
    see http://java.sun.com/developer/technicalArticles/javaserverpages/faster

  • JSF (Trinidad) passing parameters visibly on URL

    Hi,
    I can pass parameters with managed beans, but i they are not visible on url and i want some parameters to be visible so that user can copy-paste and share with someone else..
    How can i handle it? For example:
    user/userinfo.xhtml?id=123456
    Thanks
    Edited by: oak on Nov 30, 2008 1:47 PM
    Edited by: oak on Nov 30, 2008 2:02 PM

    Hi,
    if your attribute is on a input component (hidden or otherwise) it will be passes to the next page when the page is submitted.
    If you want the parameter to be appended to the URL/I then you need to change the form method to GET rather than POST.
    To operate on the parameter on the target page you can create an invoke action on the target pages page definition to do something in the model with the passed value.
    in PageDef of target page:
    Params section:
    <parameters>
        <parameter id="id"/>
      </parameters>in Bindings section:
    <methodAction id="findEmpById"
                      InstanceName="HRServiceDataControl.dataProvider"
                      DataControl="HRServiceDataControl" RequiresUpdateModel="true"
                      Action="invokeMethod" MethodName="findEmpById"
                      IsViewObjectMethod="false">
          <NamedData NDName="num" NDValue="${param.id}" NDType="java.lang.String"/>Invoke action in executables section to call the method above only if param id is passed:
    <executables>
        <invokeAction Binds="findEmpById" id="invokeFindByID" Refresh="ifNeeded"
                      RefreshCondition="${param.id != null}"/>
      </executables>AM method to do something with the param:
        public void findEmpById(String num){
            if (num != null){
                System.out.println("ID is: " + num);   
            }else {
                System.out.println("ID is: null");
        }Brenden

  • Problem in OHW I5

    Hi,
    I am new to Oracle Help and working on a POC as part of my requirement, I have successfully created POC in OHW 2.0 but now I need to work on latest version to avail advanced search features. After exploring, I found ohwrcf_i5.ear and I have followed the instructions given in the installation guide " OHW RC Release Note I5" to set it up in Standalone OC4J 11. when I try to deploy the application, I am ending up with ADFLogger exception and according to some web-references, its a known versioning issue and it works if deployed in the embedded OC4J with JDeveloper Studio Edition Version 11.1.1.0.0.
    I am using JDeveloper Studio Edition Version 11.1.1.0.0, I did imported the ear file ohwrcf_i5.ear, added the required JSF and JSTL taglibs, and build was successful. But when I try running main.jspx, I am getting a blank page with the message "No config parameter specified in the url or invalid config parameter. Please contact your administrator for more information."
    The log message in Embedded OC4J console is below:
    Target URL -- http://127.0.0.1:8988/ohwrcf/faces/helppages/main.jspx
    Apr 17, 2008 2:57:22 PM oracle.classloader.util.ClassLoadLogger log
    WARNING: Code-source C:\JDeveloper\mywork\ohwrcf_i5\ohwrcf\public_html\WEB-INF\lib\share.jar (from WEB-INF/lib/ directory in C:\JDeveloper\mywork\ohwrcf_i5\ohwrcf\public_html\WEB-INF\lib) has the same filename but is not identical to /D:/Program Files/jdevstudio1111/jlib/share.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in D:\Program Files\jdevstudio1111\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.ohwrcf:0.0.0.
    Apr 17, 2008 2:57:30 PM oracle.help.web.rich.OHWFilter doFilter
    WARNING: Cannot find Global Configuration with url: http://127.0.0.1:8988/ohwrcf/faces/helppages/main.jspx
    I have also tried the same on IE7 as well but the same message is displayed.
    Can you please help me in resolving this issue.
    Thanks in Adv
    Raza

    It got it solved by myself when I tried with config=OHW+Servlet+1.
    Regards
    Raza

Maybe you are looking for

  • Error while downloading file with Firefox 33

    Hello, in our company we all use firefox (different versions) to use our CRM (SugarCRM). Since some of the PC (with windows 7) updated to Firefox version 33 (64bit) we started getting the following problem while downloading PDF: "C:\Users\[user]\AppD

  • Firefox closes itself. I have uninstalled and reinstalled five times in 2 months. What can I do?

    When I click on the icon, it does not open but when I try to open it, I get the message that another version is open. I can't open it to shut it down. I have to restart my computer. This has been ongoing for months. I have uninstalled and reinstalled

  • Can't copy and paste from table to table

    Just upgraded all my clients to CS 6.5 and now no one can copy and paste from table to table.  It locks up every time.  I have already dumped the program preferences and still can't do it.  This is a HUGE problem with my users.  Any help would be app

  • Button background fill "Linear - to top" not showing after save.

    I've made the proper edits to make these buttons look very "cool" having the background filled to a gradient look which is called "Linear to top", but once I save this form and open the PDF the button color is solid rather then gradient or "linear to

  • Calling PROVIDE .....  ENDPROVIDE

    Hi guru, My script below is not working : sort l_T_POS_TXT_1 by OBJID BEGDA ENDDA. sort l_T_POS_TXT_2 by OBJID BEGDA ENDDA.     PROVIDE FIELDS  * FROM l_T_POS_TXT_1 INTO l_t_POS_WA1                                          VALID flag1