Using JSF in jsp segment page..

Hello
Is it possible to use JSF components in a JSP segment page(.jspf) ? I couldn't achive that..Let me explain:
I created a .jspf file and inserted these lines into it:
<f:view>
    <h:form id="loginform">
        <h:panelGrid columns="2">
            <h:outputLabel value="User:"/><h:inputText id="username_email"/>
            <h:outputLabel value="Password:"/><h:inputText id="password"/>
        </h:panelGrid>
    </h:form>
</f:view>after that i included this .jspf file to a jsp file. When I run the application,I get this error:
Stacktrace:
     org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
root cause
javax.servlet.ServletException: Cannot find FacesContext
     org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
     org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
     org.apache.jsp.index_jsp._jspService(index_jsp.java:181)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
root cause
javax.servlet.jsp.JspException: Cannot find FacesContext
     javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:405)
     com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105)
     org.apache.jsp.index_jsp._jspx_meth_f_view_0(index_jsp.java:196)
     org.apache.jsp.index_jsp._jspService(index_jsp.java:113)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.

I have tried both:
logincontrol.jspf (1)
<f:subview id="sv">
    <h:form id="loginform">
        <h:panelGrid columns="2">
            <h:outputLabel value="User:"/><h:inputText id="username_email"/>
            <h:outputLabel value="Pass:"/><h:inputText id="password"/>
        </h:panelGrid>
    </h:form>
</f:subview>
logincontrol.jspf (2)
<f:view>
    <h:form id="loginform">
        <h:panelGrid columns="2">
            <h:outputLabel value="User:"/><h:inputText id="username_email"/>
            <h:outputLabel value="Pass:"/><h:inputText id="password"/>
        </h:panelGrid>
    </h:form>
</f:view>but nothing changes... i added this line, in the .jsp file:
<%@ include file="WEB-INF/jspf/logincontrol.jspf" %>   by the way, is it good to write a .jspf file for login process and include it to the pages?

Similar Messages

  • Problem displaying error page of web.xml when using JSF, Ajax4jsf

    Hi,
    My application is using MyFaces, RichFaces and Ajax4jsf. When i try to display error page configured in web.xml, i am getting exception "Error while processing error page".
    my web.xml contents are as follows:
    <?xml version="1.0"?>
    <web-app version="2.4" 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">
    <filter>
    <display-name>RichFaces Filter</display-name>
    <filter-name>richfaces</filter-name>
    <filter-class>org.ajax4jsf.Filter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>richfaces</filter-name>
    <servlet-name>faces</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>
    <filter>
    <filter-name>extensionsFilter</filter-name>
    <filter-class>
    org.apache.myfaces.webapp.filter.ExtensionsFilter
    </filter-class>
    <init-param>
    <description>
    set the size limit for uploaded files. Format: 10 - 10 bytes 10k
    - 10 KB 10m - 10 MB 1g - 1 GB
    </description>
    <param-name>uploadMaxFileSize</param-name>
    <param-value>100m</param-value>
    </init-param>
    <init-param>
    <description>
    Set the threshold size - files below this limit are stored in
    memory, files above this limit are stored on disk.
    Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
    </description>
    <param-name>uploadThresholdSize</param-name>
    <param-value>100k</param-value>
    </init-param>
    </filter>
    <filter>
    <filter-name>Seam Redirect Filter</filter-name>
    <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
    </filter>
    <filter>
    <filter-name>KTServletFilter</filter-name>
    <filter-class>com.kenexa.core.system.KTServletFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>extensionsFilter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>extensionsFilter</filter-name>
    <url-pattern>/faces/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>Seam Redirect Filter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>KTServletFilter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <!-- seam Listeners -->
    <listener>
    <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
    </listener>
    <listener>
    <listener-class>com.kenexa.kr.web.KRServletListener</listener-class>
    </listener>
    <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>/rc/systemError.jsf</location>
    </error-page>
    </web-app>
    As per the configuration, when exception is thrown out of the application, container tries to display systemError.jsp page. If we want to include the JSF tags in systemError.jsp page, the request should pass through FacesServlet, so in the <error-page> <location> tag systemError page is specified with the extention systemError.jsf though it's actual extention is .jsp
    When exception is thrown from the application container invoke the error page but, while rendering systemError.jsf page exception is thrown saying "Exception processing error page "systemError.jsp" "
    To solve this problem i've gone through several forums, materials.
    In one forum a guy said, JSF1.1 spec has some problem in displaying error pages. To solve this don't write <f:view> tags in the error page, use <f:subview> intstead. By reading this, i again changed the contents of systemError.jsp page replacing <f:view> by <f:subview>. But the error is still repeating.
    Finally what i found is, when we use Ajax4jsf in the application, its AjaxViewRender class is throwing exception while rendering error pages configured through web.xml.
    So what i did is i changed error page extention from .jsf to .jsp in the <location> tag. Now jsf won't come in the picture and remove JSF related tags from the systemError.jsp page.
    <error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>/rc/systemError.jsp</location>
    </error-page>
    Any comments are welcome----------------------------------------------------------------

    I too iam facing the same problem could you advise if you have found any solutions
              -Ram

  • Message bundles accessed from JSF and JSP pages

    Hello, everybody!
    I'm developing a localized JSF application. It is working pretty well until now.
    These are my message files:
    mensagens.properties
    mensagens_en_US.propertiesThis is how they're configured in faces-config.xml:
    <application>
        <resource-bundle>
            <base-name>br.urca.www.biblioteca.web.mensagens</base-name>
            <var>msg</var>
        </resource-bundle>
    </application>And this is how I access the messages in a page:
    <h:outputText value="#{msg.titulo}" />Nothing new until now. But now there was a need for me to have a raw jsp page in
    my web application. This page is displaying ok but I also need to access the
    message bundles as I'm able to access in the normal jsp with the JSF components.
    As you should know I can't use something like the above code with an +<h:outputText>+
    to access the messages because this is a JSF component and I'll not be able to use
    JSF components with this raw jsp page.
    So, my question is: how do I access my localized messages from a raw jsp page? I
    suppose there should be a way to do this, but unfortunately I started programming
    to the web world in Java with JSF, not JSP, so I don't know how to do this with
    JSP.
    Thank you very much.
    Marcos

    BalusC wrote:
    Just include [jstl-1.2.jar|https://maven-repository.dev.java.net/repository/jstl/jars/] in your classpath and define the fmt taglib in your JSP. Nothing more is needed.
    Hello, BalusC. Thank you for your help. We're almost there. After I have included the jstl-1.2.jar you provided me I can use the fmt tag and access message bundles from my raw jsp page (even though I had to provide other message bundles instead of the ones that I use in the other jsf pages, but it's better than nothing).
    Now there just on problem to be fixed. The jsp page is not aware when I change the locale of my application. I change this locale in a jsf page.
    I have this component:
    <h:selectOneMenu value="#{pesquisaAcervo.idiomaAplicacao}"
        valueChangeListener="# {pesquisaAcervo.idiomaAplicacaoMudado}" onchange="submit();">
        <f:selectItems value="#{pesquisaAcervo.idiomasAplicacao}" />
    </h:selectOneMenu>that calls this event in my backing bean class:
    public void idiomaAplicacaoMudado(ValueChangeEvent e)
        fIdiomaAplicacao.liberarItens();
        Idioma idioma = Idioma.deString(e.getNewValue().toString());
        // This line is for JSF
        FacesContext.getCurrentInstance().getViewRoot().setLocale(idioma.localidade());
        // This line is for Tiles
        FacesContext.getCurrentInstance().getExternalContext().getSessionMap().
            put(org.apache.tiles.locale.impl.DefaultLocaleResolver.LOCALE_KEY, idioma.localidade());
    }So, do I have to include another line in the idiomaAplicacaoMudado event above in order for the jsp page load the correct resource bundle? Or what else do I have to do?
    Thank you.
    Marcos

  • How we can use jsf tags in included jsp enclosed in subview tags

    Hello everybody,
    I am developing web app by using jsf. I am including a jsp page "header.jsp" into another jsp page "main.jsp". The header.jsp page is enclosed in jsf subview tag on main.jsp page. The header.jsp contains some static html code and some jsf tags like "outputText". When i added tag library url in header.jsp then my app was not even not initiating and i was getting following exception
    ERROR [UIComponentTag] Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml.
    16:22:16,890 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
    java.lang.NullPointerException
    at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929)
    at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)
    ....Now i removed jsf tag library url from included jsp "header.jsp" so now my app is running but only static html data is being displayed but the value in the jsf tag "outputText" is not being printed in the browser
    kindly help me. i would be very thankful....

    Your question has nothing to do with Sun Java System Directory Server.
    Please use the right forum(s).
    Thanks

  • Passing parameters to included JSP files using JSF

    I have included JSP, which I use in many other JSP files. I want to display message in this included JSP which depends on the information in JSP files which include this JSP. How can I do this without using scriptlets?
    Message was edited by:
    cheltsov

    I have one included page in one jsp page(mother page). I have included it by jsp:include tag. The included page consists of two inputText. I need to pass the parameters of the mother page together with the parameters in the included page in the backingBean of the mother page. Hope this one is clearer.
    The code snippet in the mother page looks like this
    <jsp:include page="/pages/ps/sample_rep2.jsp"/>.
    In the sample_rep2.jsp, I have two inputText. How can I pass this in the backingBean of the motherpage.
    The sample_rep2.jsp is the included page here. The sample_rep2.jsp looks like this:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <af:panelBox>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <af:panelBox>
    <af:inputText label="User ID" id="userid" value="CDOUGLAS"/>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <af:panelBox>
    <af:inputText label="User ID" id="userid" />
    <af:inputText label="Age" id="age"/>
    </af:panelBox>

  • How to Develop Static page using JSF/Creator

    Hi,
    I am a newbie trying to understand how one develops static pages in JSF. I fear I am going to require a hybrid development environment; that is, I will need two IDE's. For example, Dreamweaver AND Creator.
    I'd like to just use one as it is more convenient, and the static pages will be configured as necessary as fully integrated pages. But I'm not sure how to use JSF/Creator to develop "plain vanilla" HTML/JSP pages.
    I appreciate any feedback and "education". :-)
    Sam

    I dont use it much, but im pretty sure there is a tabbed pane allowing you to swith between a HTML/JSF code view and a visual view, a little like dreamweaver. I currently hand code my JSF pages in a standard IDE, its not too tricky once you understand the tags, and it gives you flexible control which I like. Maybe this approach will work for you

  • Is it possible to use JSF file as as error page.

    I am using jsf file as an error page.It is working in fine in websphere. But if i am using that only the exception is raised it is not going to error page.
    In Web.XML file,
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <error-page>
    <error-code>403</error-code>          <location>/faces/unauthorized.jsp</location>
    </error-page>
    jsf codings are placed under *.jsp files. In the time submitting form data to server a method throws NumberFormatException. This exception information is displayed in console. but blankpage is coming . It is not redirected to error.jsp fle which is under faces/error.jsp.
    If i am directly giving /error.jsp then it is giving Faces context is not created error.
    So i tried use simple jsp(pure jsp) file wihtin the folder and i set path like /pages/foo.jsp. It is working.
    Tell me is it possible to use jsf as error page.

    What would you hope to do with the reference?  The Mathscript node doesn't have a file reading capability.  You need to read the file and pass the data into the Mathscript node.
    EDIT: I stand corrected.  You need to use the fopen and fclose functions inside of the MathScript node to be able to read a file inside of it.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Unable to display Popup page while using JSF Tiles

    Hi All,
    I am using JSF Tiles. In the body page i am trying to open a pop up page through java script. bt i got the 500 internal server error. The popup open properly when there is no html or core jsf tags. can anyone help me abt this problem.
    Thanks.

    For future JSP/Servlet related questions please use the JSP/JSTL forum or the Servlet forum. There are more experts.
    As to your problem: did you read a basic JSP/Servlet book/tutorial? Did you read the [Tomcat documentation|http://tomcat.apache.org/tomcat-6.0-doc/index.html]? Your problem more sounds like you missed something trivial.

  • Oracle portal using JSF, JSP, Struts framework

    Hi ,
    Can anyone tell me how to build an oracle portal using JSF,Jsp and Struts Framework.
    Also please provide any manual or documentation for developing oracle portal.
    Thanks in Advance,
    Raghav

    At present, i think the best thing to do is to look at the example provided with the struts-faces integration taglib. I don't know any documentation about it.
    http://cvs.apache.org/builds/jakarta-struts/nightly/struts-faces/

  • How to dynamically include jsp files using jsf el in include tag ?

    Hi,
    I'm trying to get the jsp file name from my backing bean to use it in an include tag but I can't make it work
    When using this piece of code I can get the generated path
             <h:outputText value="/_partial/#{myBean.jspName}.jsp"/>whereas in this code the jsf el is not replaced by this value.
            <%@ include file="/_partial/#{myBean.jspName}.jsp" %> Have you any idea of how to solve this ? I'm currently developing for J2EE 1.4 platform.     
    Thanks for your help,
    Regards.

    If you're using JSF 1.2 and JSTL 1.2 at a JSP 2.1 environment, then you can just use <jsp:include> with unified EL.
    If you're using JSF 1.1, then you may find this article useful [http://balusc.blogspot.com/2007/01/dynamic-jsf-subviews.html]

  • Error on running the .portal on the weblogic portal server 10.3.2 using jsf

    Hi,
    This are the below file that i have included in the project
    login.jspx
    <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:ice="http://www.icesoft.com/icefaces/component">
    <jsp:directive.page contentType="text/html;charset=utf-8" />
    <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>ICEfaces,Login Portlet</title>
    <link rel="stylesheet" type="text/css"
    href="./xmlhttp/css/rime/rime.css" />
    </head>
    <body>
    <ice:portlet>
    <ice:outputText value="Welcome to ICEfaces." />
    <ice:form>
    <ice:outputText value="Username" />
    <ice:inputText id="name_t" value="#{Login.userName}"></ice:inputText>
    <ice:outputText value="Password"/>
    <ice:inputText id="password_t" value="#{Login.password}"></ice:inputText>
    <ice:commandButton action="#{Login.checkUserPass}" value="OK"></ice:commandButton>
    </ice:form>
    </ice:portlet>
    </body>
    </html>
    </f:view>
    </jsp:root>
    faces-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <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>
    <view-handler>
    com.icesoft.faces.facelets.D2DFaceletViewHandler
    </view-handler>
    <locale-config>
    <supported-locale>de</supported-locale>
    <supported-locale>en</supported-locale>
    </locale-config>
    </application>
    <managed-bean>
    <managed-bean-name>Login</managed-bean-name>
    <managed-bean-class>com.pack.login.Login</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>userName</property-name>
    <property-class>java.lang.String</property-class>
    <value></value>
    </managed-property>
    <managed-property>
    <property-name>password</property-name>
    <property-class>java.lang.String</property-class>
    <value></value>
    </managed-property>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/login.jspx</from-view-id>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/success.iface</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>failure</from-outcome>
    <to-view-id>/failure.iface</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    portlet.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <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>
    <view-handler>
    com.icesoft.faces.facelets.D2DFaceletViewHandler
    </view-handler>
    <locale-config>
    <supported-locale>de</supported-locale>
    <supported-locale>en</supported-locale>
    </locale-config>
    </application>
    <managed-bean>
    <managed-bean-name>Login</managed-bean-name>
    <managed-bean-class>com.pack.login.Login</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>userName</property-name>
    <property-class>java.lang.String</property-class>
    <value></value>
    </managed-property>
    <managed-property>
    <property-name>password</property-name>
    <property-class>java.lang.String</property-class>
    <value></value>
    </managed-property>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/login.jspx</from-view-id>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/success.iface</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>failure</from-outcome>
    <to-view-id>/failure.iface</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    Login.java
    package com.pack.login;
    import javax.faces.application.FacesMessage;
    import javax.faces.context.FacesContext;
    public class Login {
    public String getUserName() {
    return userName;
    public void setUserName(String userName) {
    this.userName = userName;
    public String getPassword() {
    return password;
    public void setPassword(String password) {
    this.password = password;
    private String userName;
    private String password;
    public String checkUserPass(){
    FacesContext facesContext = FacesContext.getCurrentInstance();
    if("icefaces".equals(getUserName()) && "icefaces".equals(getPassword())) {
    return"success";
    FacesMessage facesMessage = new FacesMessage(
    "You have entered an invalid user name and/or password");
    facesContext.addMessage("Login", facesMessage);
    return "failure";
    What are the classes or interfaces that we need to use to render the content and to the process the action in jsf-portlet + icefaces libraris + weblogic portal server 10.3.2
    I have created the .portal file and i have included the instance of the .portlet file in the portal page. When i run .portal file on the server it will throw the below exception.
    <Warning> <netuix> <BEA-423319> <A default JSP response character encoding was not found for webapp [Portal]. Defaulting to [UTF-8]. You can override this default response character encoding for all portals in netuix-config.xml or for each portal or desktop in each portal or desktop definition.>
    12, 2010 9:57:05 AM com.sun.faces.lifecycle.Phase doPhase
    SEVERE: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /login.jspx) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@18fddac]
    <Error> <netuix> <BEA-423405> <An exception [java.lang.NullPointerException] was thrown while rendering the content at [login.jspx].
    javax.faces.FacesException: java.lang.NullPointerException
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:128)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    at com.bea.portlet.adapter.faces.FacesContentStubImpl.render(FacesContentStubImpl.java:354)
    at com.bea.netuix.servlets.controls.content.FacesContent.beginRender(FacesContent.java:424)
    at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:485)
    Truncated. see log file for complete stacktrace
    Caused By: java.lang.NullPointerException
    at com.sun.faces.renderkit.RenderKitImpl.createResponseWriter(RenderKitImpl.java:188)
    at com.icesoft.faces.renderkit.D2DRenderKit.createResponseWriter(D2DRenderKit.java:87)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:194)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    at org.apache.myfaces.portlet.faces.application.PortletViewHandlerImpl.renderView(PortletViewHandlerImpl.java:257)
    Truncated. see log file for complete stacktrace
    >
    <Error> <netuix> <BEA-423137> <There was an error loading the requested URI /login.jspx.>
    Login Error opening /login.jspx.
    The source of this error is:
    javax.faces.FacesException: java.lang.NullPointerException
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:128)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    at com.bea.portlet.adapter.faces.FacesContentStubImpl.render(FacesContentStubImpl.java:354)
    at com.bea.netuix.servlets.controls.content.FacesContent.beginRender(FacesContent.java:424)
    at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:485)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:399)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
    at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326)
    at com.bea.netuix.nf.UIControl.render(UIControl.java:582)
    at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:488)
    at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:152)
    at com.bea.netuix.servlets.jsp.taglib.skeleton.Child.doTag(Child.java:63)
    at jsp_servlet._framework._skeletons._bighorn.__flowlayout._jspService(__flowlayout.java:175)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:502)
    at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:429)
    at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:148)
    at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72)
    at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65)
    at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:399)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
    at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:208)
    at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:168)
    at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:465)
    at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:291)
    at com.bea.netuix.servlets.manager.UIServlet.doGet(UIServlet.java:231)
    at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:216)
    at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:275)
    at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:719)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:336)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at com.bea.content.manager.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:178)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.NullPointerException
    at com.sun.faces.renderkit.RenderKitImpl.createResponseWriter(RenderKitImpl.java:188)
    at com.icesoft.faces.renderkit.D2DRenderKit.createResponseWriter(D2DRenderKit.java:87)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:194)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    at org.apache.myfaces.portlet.faces.application.PortletViewHandlerImpl.renderView(PortletViewHandlerImpl.java:257)
    at com.bea.portlet.adapter.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:77)
    at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:151)
    at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:151)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
    ... 71 more
    I have created the .portal file and i have included the instance of the .portlet file in the portal page. When i run .portal file on the server it will throw the below exception.
    <Warning> <netuix> <BEA-423319> <A default JSP response character encoding was not found for webapp [Portal]. Defaulting to [UTF-8]. You can override this default response character encoding for all portals in netuix-config.xml or for each portal or desktop in each portal or desktop definition.>
    12, 2010 9:57:05 AM com.sun.faces.lifecycle.Phase doPhase
    SEVERE: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /login.jspx) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@18fddac]
    <Error> <netuix> <BEA-423405> <An exception [java.lang.NullPointerException] was thrown while rendering the content at [login.jspx].
    javax.faces.FacesException: java.lang.NullPointerException
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:128)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    at com.bea.portlet.adapter.faces.FacesContentStubImpl.render(FacesContentStubImpl.java:354)
    at com.bea.netuix.servlets.controls.content.FacesContent.beginRender(FacesContent.java:424)
    at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:485)
    Truncated. see log file for complete stacktrace
    Caused By: java.lang.NullPointerException
    at com.sun.faces.renderkit.RenderKitImpl.createResponseWriter(RenderKitImpl.java:188)
    at com.icesoft.faces.renderkit.D2DRenderKit.createResponseWriter(D2DRenderKit.java:87)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:194)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    at org.apache.myfaces.portlet.faces.application.PortletViewHandlerImpl.renderView(PortletViewHandlerImpl.java:257)
    Truncated. see log file for complete stacktrace
    >
    <Error> <netuix> <BEA-423137> <There was an error loading the requested URI /login.jspx.>
    Login Error opening /login.jspx.
    The source of this error is:
    javax.faces.FacesException: java.lang.NullPointerException
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:128)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    at com.bea.portlet.adapter.faces.FacesContentStubImpl.render(FacesContentStubImpl.java:354)
    at com.bea.netuix.servlets.controls.content.FacesContent.beginRender(FacesContent.java:424)
    at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:485)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:399)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
    at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326)
    at com.bea.netuix.nf.UIControl.render(UIControl.java:582)
    at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:488)
    at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:152)
    at com.bea.netuix.servlets.jsp.taglib.skeleton.Child.doTag(Child.java:63)
    at jsp_servlet._framework._skeletons._bighorn.__flowlayout._jspService(__flowlayout.java:175)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:502)
    at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:429)
    at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:148)
    at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72)
    at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65)
    at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
    at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:399)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
    at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:208)
    at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:168)
    at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:465)
    at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:291)
    at com.bea.netuix.servlets.manager.UIServlet.doGet(UIServlet.java:231)
    at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:216)
    at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:275)
    at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:719)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:336)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at com.bea.content.manager.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:178)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.NullPointerException
    at com.sun.faces.renderkit.RenderKitImpl.createResponseWriter(RenderKitImpl.java:188)
    at com.icesoft.faces.renderkit.D2DRenderKit.createResponseWriter(D2DRenderKit.java:87)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:194)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    at org.apache.myfaces.portlet.faces.application.PortletViewHandlerImpl.renderView(PortletViewHandlerImpl.java:257)
    at com.bea.portlet.adapter.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:77)
    at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:151)
    at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:151)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
    ... 71 more
    Thanks in advance.

    First you install a JDK6 version after which you can install your WebLogic and Forms, Reports...
    A step-by-step example is presented here: http://middlewaremagic.com/weblogic/?p=7265
    Look in the 'Install WebLogic' section. Note that you probably do not have to create a separate user,
    also you can use HotSpot instead of JRockit.

  • Navigation issue using jsf, tiles, tomahawk  :loosing faces context

    Hi all,
    I enhanced my webapp using tomahawks jscookmenu.
    Triggering 1 menuItem the wanted pages displays correctly but the next click anywhere in the application shows this error:
    org.apache.jasper.JasperException: javax.faces.FacesException: Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml configuration fileand if you are accessing your jsf-pages through the correct mapping. E.g.: if your FacesServlet is mapped to  *.jsf (with the <servlet-mapping>-element), you need to access your pages as 'sample.jsf'. If you tried to access 'sample.jsp', you'd get this error-message.The web config is like that:
    <?xml version="1.0"?>
    <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>
              <description>Tiles MyFaces Config</description>
              <param-name>tiles-definitions</param-name>
              <param-value>/WEB-INF/tiles.xml</param-value>
         </context-param>
         <context-param> 
              <param-name>javax.faces.DEFAULT_SUFFIX</param-name> 
              <param-value>.jsp</param-value>
         </context-param>
         <context-param>
              <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
              <param-value>server</param-value>
         </context-param>
         <context-param>
              <param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name>
              <param-value>off</param-value>
         </context-param>
         <!-- context-params mafaces -->
         <context-param>
              <param-name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.RENDER_VIEWSTATE_ID</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.STRICT_XHTML_LINKS</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.CONFIG_REFRESH_PERIOD</param-name>
              <param-value>this is a bug in myfaces</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
              <param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name>
              <param-value>/faces/myFacesExtensionResource</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
              <param-value>false</param-value>
         </context-param>
         <!-- StartupServletContextListener -->
         <listener>
              <listener-class>
                   org.apache.myfaces.webapp.StartupServletContextListener
              </listener-class>
         </listener>
         <!-- Faces MyFacesExtensionsFilter -->
         <filter>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <filter-class>
                   org.apache.myfaces.webapp.filter.ExtensionsFilter
              </filter-class>
              <init-param>
                   <param-name>uploadMaxFileSize</param-name>
                   <param-value>1m</param-value>
              </init-param>
         </filter>
         <filter-mapping>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <url-pattern>/faces/*</url-pattern>
         </filter-mapping>
         <filter-mapping>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <url-pattern>*.jsf</url-pattern>
         </filter-mapping>
         <!-- Faces Servlet -->
         <servlet>
              <servlet-name>Faces Servlet</servlet-name>
              <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
              <load-on-startup>1</load-on-startup>
         </servlet>
         <!-- Faces Servlet Mapping -->
         <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>*.jsf</url-pattern>
         </servlet-mapping>
         <welcome-file-list>
              <welcome-file>index.jsp</welcome-file>
         </welcome-file-list>
         <servlet>
              <servlet-name>imageServlet</servlet-name>
              <servlet-class>my.com.xplorer.gui.v.ImageServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>imageServlet</servlet-name>
              <url-pattern>/image/*</url-pattern>
         </servlet-mapping>
    </web-app>So I lost the faces context using the jscookmenu, I believe.
    My webapp uses tiles, and there is 2 navigation possibilities: tomahawaks jscookmenu and tomahawaks commandNavigation.
    Latter one runs ok, I do use
    <t:panelNavigation id="nav" styleClass="navigation"
         itemClass="navitem" separatorClass="navseparator" 
         activeItemClass="navitem_active" openItemClass="navitem_open">
         <t:commandNavigation action="#{newsHandler.userRequest}" value="#{newsHandler.rss_source_name[0]}">
              <f:param name="navigator"  value="/jsf/news.jsp" />
         </t:commandNavigation>
    </t:panelNavigation>for this kind of navigation I do not use any navigation rules in faces config. To dynamically include the desired faces page I do that:
    <%
         String s = (String)request.getParameter("navigator");
         if (s == null || s.length() == 0 ) {
              s =  "/jsf/explorer.jsp";
    %>
    <jsp:include page="<%=s %>" />That does work.
    Now like I said I did enhance the app by adding tomahawks jscookmenu.
    Therefore I use the following in another tile:
    <t:jscookMenu layout="hbr" theme="ThemeOffice" styleLocation="resources/css">
              <%/* Availaible jscookMenu themes: ThemeIE, ThemeMiniBlack, ThemeOffice, ThemePanel
                 Availaible jscookMenu layout: hbr, hbl, hur, hul, vbr, vbl, vur, vul
                 respect to Heng Yuan http://www.cs.ucla.edu/~heng/JSCookMenu
            */%>
      <t:navigationMenuItem id="nav_0" itemLabel="#{localz.Xplorer}" action="Xplorer" />
    </t:jscookMenu>For this kind of navigation I tried to use navigation rules and the following show the config:
         <navigation-rule>
           <from-view-id>/jsf/*</from-view-id>
            <navigation-case>
                <from-outcome>Xplorer</from-outcome>
                <to-view-id>/jsf/tileMain.jsp?navigator=/jsf/explorer.jsp</to-view-id>
            </navigation-case>
            <navigation-case>
                <from-outcome>Tabs</from-outcome>
                <to-view-id>/jsf/tileMain.jsp?navigator=/jsf/tab.jsp</to-view-id>
            </navigation-case>
         </navigation-rule>That works for the first click. The desired page is shown. The nect click anywhere in the app then show the mentioned error.
    Using tiles I use this view-handler
    <view-handler>org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl</view-handler>One question is: can I use another view-handler on top of the above one? So I could extend com.sun.facelets.FaceletViewHandler and try my luck with this? Or is the solution pointed out just a millisecond from being ok, I just don�t see it?
    Maybe you need to know a bit more on how I use tiles:
    That is the page I start with. It inserts the tile shown underneath.
    <f:view locale="#{userLocale}">
         <f:loadBundle var="localz" basename="my.com.xplorer.gui.v.Lokalization" />
         <f:loadBundle var="bundle" basename="my.com.xplorer.gui.v.messages" />
         <f:subview id="tileMain">
              <h:form id="myJsfForm" styleClass="standard">
                        <tiles:insert definition="template" flush="false" />
              </h:form>
         </f:subview>
         <h:messages />
    </f:view>
    </html>The foolowing is the tile structure.
    The bodi tile is the dynamic part. Above you see that I dynamically load the pages into it.
    <t:htmlTag value="div" styleClass="pageLayout">
         <h:panelGrid columns="2" align="center" styleClass="pageContent">
              <f:facet name="header">
                   <f:subview id="header">
                        <tiles:insert attribute="header" flush="false" />
                   </f:subview>
              </f:facet>
              <t:htmlTag value="div" styleClass="pageMenu">
                   <f:subview id="menu">
                        <tiles:insert attribute="menu" flush="false" />
                   </f:subview>
              </t:htmlTag>
              <t:htmlTag value="div" styleClass="pageContentWoMenu">
                   <f:subview id="bodi">
                        <tiles:insert attribute="bodi" flush="false" />
                   </f:subview>
              </t:htmlTag>
              <f:facet name="footer">
                   <f:subview id="footer">
                        <tiles:insert attribute="footer" flush="false" />
                   </f:subview>
              </f:facet>
         </h:panelGrid>
    </t:htmlTag>Maybe you also need to know the tiles config?
    <tiles-definitions>
       <definition name="template" path="/jsf/tileTemplate.jsp">
              <put name="header"  value="/jsf/header.jsp"/>
          <put name="menu"    value="/jsf/menu.jsp"/>
          <put name="bodi"    value="/jsf/bodi.jsp"/>
          <put name="footer"    value="/jsf/footer.jsp"/>
       </definition>
       <definition name="/jsf/news.tiles" extends="template">
              <put name="bodi"  value="/jsf/news.jsp"/>
       </definition>
       <definition name="/jsf/explorer.tiles" extends="template">
              <put name="bodi"  value="/jsf/explorer.jsp"/>
       </definition>
       <definition name="/jsf/tab.tiles" extends="template">
              <put name="bodi"  value="/jsf/tab.jsp"/>
       </definition>If you have read until here: thanks very much.
    There seems to be a sort of gap regarding jsf navigation documentation.
    I mean the ordinary way is covered everywhere (the book I have covers that too), but jscookmenu seems not to fit in too good. I also tried it with an actionslistener in the jscookmenu but that failed, too. So a link to documents telling the truth on jsf navigation I would appreciate very much.
    Kind regards
    Belle Ile En Mer

    This is the error i am getting into now..
    exception
    org.apache.jasper.JasperException: An exception occurred processing JSP page /welcomeJSF.jsp at line 19
    16: This file is an entry point for JavaServer Faces application.
    17: --%>
    18: <body>
    19: <f:view>
    20: <h3><h:outputText value="CHOULTRY'S IN BANGALORE" /></h3>
    21: <h:form>
    22: <table border="0">
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    root cause
    java.lang.RuntimeException: Cannot find FacesContext
         javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1811)
         javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1628)
         org.apache.jsp.welcomeJSF_jsp._jspx_meth_f_005fview_005f0(welcomeJSF_jsp.java:112)
         org.apache.jsp.welcomeJSF_jsp._jspService(welcomeJSF_jsp.java:86)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

  • Issues in using JSF UI:Tree tag

    Hi,
    I am trying to work with Tree Structure using JSF UI tags. In Studio Creator i just created a JSP page and designed a Tree with two nodes under it. This is what i have in the body of my jsp.
    <ui:body binding="#{Page1.body1}" id="body1" style="-rave-layout: grid">
    <ui:form binding="#{Page1.form1}" id="form1">
    <ui:tree binding="#{Page1.tree1}" id="tree1" style="left: 48px; top: 48px; position: absolute" text="L3">
    <ui:treeNode binding="#{Page1.treeNode1}" expanded="true" id="treeNode1" style="width: 408px" text="Tree Node 1">
    <f:facet name="image">
    <ui:image binding="#{Page1.image1}" icon="TREE_DOCUMENT" id="image1"/>
    </f:facet>
    </ui:treeNode>
    <ui:treeNode binding="#{Page1.treeNode2}" expanded="true" id="treeNode2" text="Tree Node 2">
    <f:facet name="image">
    <ui:image binding="#{Page1.image2}" icon="TREE_DOCUMENT" id="image2"/>
    </f:facet>
    </ui:treeNode>
    </ui:tree>
    </ui:form>
    </ui:body>
    But when i am trying to launch the jsp page from browser i am getting the below exception.
    com.sun.rave.web.ui.appbase.ApplicationException
    Caused by: java.lang.NullPointerException at java.io.File.(File.java:194) at com.sun.rave.web.ui.renderer.template.xml.XMLLayoutDefinitionManager.getLayoutDefinition(XMLLayoutDefinitionManager.java:142) at com.sun.rave.web.ui.component.TemplateComponentBase.getLayoutDefinition(TemplateComponentBase.java:150) at com.sun.rave.web.ui.renderer.template.TemplateRenderer.encodeBegin(TemplateRenderer.java:73) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
    Any suggestion to solve this issue would be greatly helpful.

    Now with Unified EL - JSTL and JSF tags are supposed to work on one page.
    If you want to use Unified EL you need
    1) A container that is built on Servlet 2.5 / JSP 2.1 , and example of such a container is Tomcat 6.x
    2) Probably need to upgrade to JSTL 1.2 , and JSF 1.2
    3) If you're upgrading the container to Servlet 2.5 then web.xml should conform to Servlet 2.5 version.
    4) Use correct taglib URIs for JSTL 1.2 and JSF 1.2
    Read here: Summary of new features in JSP 2.1
    http://java.sun.com/developer/technicalArticles/J2EE/jsp_21/index.html
    JSP 2.1 Technology and JSF 1.2 Technology
    http://java.sun.com/developer/community/chat/JavaLive/2004/jl1207.html
    http://java.sun.com/products/jsp/index.jsp
    Message was edited by:
    appy77

  • JSF & JDev error: The page cannot be displayed

    I'm trying to use JSF with JDeveloper. When I make my project no errors are reported, when I run it a browser opens up with an error. I added 'faces/' to the url and refreshed but still get same error message i.e. 'The page cannot be displayed'
    Here is the url:
    http://localhost:8988/jsf_app1-jsftest2-context-root/faces/hellojsp.jsp
    Here is the web.xml code:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!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>
    <description>Empty web.xml file for Web Application</description>
    <!-- Faces Servlet -->
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup> 1 </load-on-startup>
    </servlet>
    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>35</session-timeout>
    </session-config>
    <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>
    <taglib>
    <taglib-uri>http://java.sun.com/jsf/core</taglib-uri>
    <taglib-location>/WEB-INF/jsf_core.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://java.sun.com/jsf/html</taglib-uri>
    <taglib-location>/WEB-INF/html_basic.tld</taglib-location>
    </taglib>
    </web-app>
    Here is the faces-config.xml code:
    <?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>
    </faces-config>
    Here is the hellojsp.jsp code:
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>untitled</title>
    </head>
    <body>
    <h:form>
    <h:outputText/>
    </h:form>
    </body>
    </html>
    </f:view>
    Please let me know what i'm missing here. Why can I not see the page?

    When I make my project no errors are reported, when I run it a browser opens up with an error. I added 'faces/' to the url and refreshed but still get same error .
    Does the url which is invoked with Run not include a /faces/ url pattern?

  • Using JSF and IFRAMEs

    I have a basic JSF app that takes some input, does a request and creates a table on output. What I need to do with it now is to have the query "page" and results "page" in two iframes on the same page. Before the query has been run the second iframe should just be blank (or with some default text). After the query that frame should be populated but the query frame needs to still be there. I've managed to do part of this. The "search" page and the "results" page are in separate iframes:
    <%@ page session="true" %>
    <html>
    <head>
      <title>Frames</title>
    </head>
    <body>
    <table>
      <tr>
        <td width="100%" colspan="2">
          <iframe title="Synonyms Search" src="search.jsf"
              width="800" height="200">
          Alternate search content...
          </iframe>
         </td>
      </tr>
      <tr>
      <td width="100%">
        <iframe src="results.jsp" title="Results"
          width="800" height="800">
          Results....
        </iframe>
      </td>
      </tr>
    </table>
    </body>
    </html>The reason this page is not using jsf tags is that the iframes will need to contain other pages that themselves are not jsf (mostly servlets) and I wasn't sure I could make that work. Currently the problem is that previously the search page had a QueryBean that the results page accessed to create it's table of results. Now in iframes the results.jsp frame just has a jsp processing exception and running the query does nothing. I'm new to JSF so I'm sure there's parts I'm missing, these do work if I pull them outside the frames and write navigation rules in the faces-context.xml file.
    Thanks,
    Sarah

    nigeldeakin wrote:
    The first thing to ask is whether you are sure that
         @Resource(name = "jms/QueueConnectionFactory",mappedName = "queueConnectionFactory")
         private ConnectionFactory connectionFactory;is valid. Does it work when you use it in other places?No it is not working still giving me NullPointerException for it. I'm using JBoss AS and having hard times deploying a jms queue on it i used an xml file to configure the queue and here is the file
    <?xml version="1.0" encoding="UTF-8"?>
    <server>
         <mbean code="org.jboss.jms.server.destination.QueueService"
              name="jboss.messaging.destination:service=Queue,name=StockHistoryQueue"
              xmbean-dd="xmdesc/Queue-xmbean.xml">
              <depends optional-attribute-name="ServerPeer">
                   jboss.messaging:service=ServerPeer
             </depends>
              <depends>jboss.messaging:service=PostOffice</depends>
         </mbean>
    </server>i think it's not working because i have this null exception for queue factory.

Maybe you are looking for

  • HT4356 How can I AirPrint in a Kodak printer?

    How can I AirPrint in a Kodak printer?

  • Windows 7 not starting with 2nd HDD

    Having lots of fun with this one. Have a Mid 2012 MBP Classic. Recently purchased a HDD caddy for a second hard drive and a SSD (Crucial M500 480GB). My intention is to run OS X Mountain Lion on a 400GB partition on the SSD, Boot Camp Windows 7 on th

  • C# WPF read a .txt file line by line and store it to listview with GridViewColumn

    I have a .txt file with text in the following format: Name Pid CPU Thd Hnd Priv CPU Time Elapsed Time Idle 0 99 8 0 0 203:18:16.647 26:02:53.315 I want to store it in a listview with a GridViewColumn. Name is one GridViewColumn and in this I want to

  • Online Store In Flex

    Hi all... Am currently in the process of building an online store, the database is a MySQL database, and I originally was going to do the whole thing in PHP... But have started to look into building it in Flex as an option... I have posted on a heap

  • User experience question for High Availability

    Hi Experters, Not sure whether this is right forum to post this message. If anybody has already captured user experience for the failover environment, will appreciate their help on this. I will give overview of environment. Using PowerHA for ASCS/SCS