The problem was that the JSF page did not contain the tags

<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>

at the top.  When I added those the page rendered fine. - Dave



Leonardo Uribe wrote:
> 
> On Thu, Sep 11, 2008 at 5:12 PM, Leonardo Uribe <[EMAIL PROTECTED]> wrote:
> 
>>
>>
>> On Thu, Sep 11, 2008 at 5:03 PM, laredotornado
>> <[EMAIL PROTECTED]>wrote:
>>
>>>
>>> Thanks for your reply.  So am I reading that I should not be following
>>> the
>>> JSF instructions on the wiki page?  Since I already embarked on that
>>> path,
>>> I'll ask another question.  Right now, when the error page is getting
>>> invoked, the JSF is not getting rendered -- i.e what is sent to my
>>> browser
>>> is exactly the JSF code:
>>>
>>>
>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>>> <f:subview id="error"
>>>    xmlns:f="http://java.sun.com/jsf/core";
>>>    xmlns:t="http://myfaces.apache.org/tomahawk";
>>>    xmlns:h="http://java.sun.com/jsf/html";>
>>>
>>> <html>
>>> <head>
>>>        <meta content="no-cache" http-equiv="Cache-Control" />
>>>        <meta content="no-cache" http-equiv="Pragma" />
>>>        <title>NPS Config GUI - Error</title>
>>>        </head>
>>>        <body>
>>>        <h:form>
>>>           :
>>>           : set up the normal view
>>>           :
>>>           <h:outputText styleClass="infoMessage" escape="false"
>>> value="#{ErrorDisplay.infoMessage}" />
>>>           <t:htmlTag value="br" />
>>>           <h:inputTextarea style="width: 99%;" rows="10" readonly="true"
>>> value="#{ErrorDisplay.stackTrace}" />
>>>           :
>>>           : more view stuff
>>>           :
>>>        </h:form>
>>>    </body>
>>> </html>
>>> </f:subview>
>>>
>>>
>>> Below is my web.xml file, error definition is at the end:
>>>
>>>
>>> <?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">
>>>
>>>        <filter>
>>>
>>>        <filter-name>SSOFilter</filter-name>
>>>
>>> <filter-class>com.comcast.nps.im.plugin.NPSIMIntercepter</filter-class>
>>>        <init-param>
>>>                <param-name>filter_conf_file</param-name>
>>>
>>>
>>> <param-value>/export/third-party/etsbea/application_conf/wls_9.2.2/nps_config_gui_conf/nps_im_plugIn.properties</param-value>
>>>        </init-param>
>>>        </filter>
>>>
>>>        <filter-mapping>
>>>            <filter-name>SSOFilter</filter-name>
>>>            <url-pattern>/*</url-pattern>
>>>        </filter-mapping>
>>>
>>>  <!-- Faces Servlet
>>>       Marty Hall: changed .jsf back to standard of .faces -->
>>>  <servlet>
>>>     <servlet-name>Faces Servlet</servlet-name>
>>>     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>>>     <load-on-startup>1</load-on-startup>
>>>  </servlet>
>>>  <servlet>
>>>     <servlet-name>Log4JServlet</servlet-name>
>>>
>>> <servlet-class>com.comcast.npsconfig.servlet.Log4JServlet</servlet-class>
>>>     <load-on-startup>1</load-on-startup>
>>>  </servlet>
>>>  <servlet>
>>>        <description>
>>>        </description>
>>>        <display-name>
>>>        LoginSuccessServlet</display-name>
>>>        <servlet-name>LoginSuccessServlet</servlet-name>
>>>        <servlet-class>
>>>
>>> com.comcast.npsconfig.jsf.controllers.LoginSuccessServlet</servlet-class>
>>>     <load-on-startup>1</load-on-startup>
>>>  </servlet>
>>>  <servlet-mapping>
>>>     <servlet-name>Faces Servlet</servlet-name>
>>>     <url-pattern>*.jsf</url-pattern>
>>>  </servlet-mapping>
>>>  <servlet-mapping>
>>>        <servlet-name>LoginSuccessServlet</servlet-name>
>>>        <url-pattern>/LoginSuccessServlet</url-pattern>
>>>  </servlet-mapping>
>>>  <servlet-mapping>
>>>        <servlet-name>Log4JServlet</servlet-name>
>>>        <url-pattern>/refresh</url-pattern>
>>>  </servlet-mapping>
>>>
>>>   <filter>
>>>        <filter-name>MyFacesExtensionsFilter</filter-name>
>>>
>>>
>>> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
>>>    <init-param>
>>>        <param-name>maxFileSize</param-name>
>>>        <param-value>20m</param-value>
>>>    </init-param>
>>>        </filter>
>>> <!-- extension mapping for adding <script/>, <link/>, and other resource
>>> tags to JSF-pages  -->
>>> <filter-mapping>
>>>    <filter-name>MyFacesExtensionsFilter</filter-name>
>>>    <!-- servlet-name must match the name of your
>>> javax.faces.webapp.FacesServlet entry -->
>>>    <servlet-name>Faces Servlet</servlet-name>
>>> </filter-mapping>
>>>
>>> <!-- extension mapping for serving page-independent resources
>>> (javascript,
>>> stylesheets, images, etc.)  -->
>>> <filter-mapping>
>>>    <filter-name>MyFacesExtensionsFilter</filter-name>
>>>    <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
>>> </filter-mapping>
>>>
>>> <filter-mapping>
>>>    <filter-name>MyFacesExtensionsFilter</filter-name>
>>>    <url-pattern>*.jsf</url-pattern>
>>> </filter-mapping>
>>>
>>>        <!-- global error page. -->
>>>        <error-page>
>>>                <error-code>500</error-code>
>>>                <location>/jsp/ErrorDisplay.jsf</location>
>>>        </error-page>
>>>
>>> </web-app>
>>>
>>>
>>>
>>> Thanks, - Dave
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Leonardo Uribe wrote:
>>> >
>>> > On Thu, Sep 11, 2008 at 4:27 PM, laredotornado
>>> > <[EMAIL PROTECTED]>wrote:
>>> >
>>> >>
>>> >> Hi,
>>> >>
>>> >> I'm trying to create a JSF error page to which 500 server errors are
>>> >> redirected.  I thought I'd use the MyFaces wiki --
>>> >> http://wiki.apache.org/myfaces/Handling_Server_Errors, but I have a
>>> >> couple
>>> >> of questions.  The page above does not list what changes, if any need
>>> to
>>> >> be
>>> >> made to faces-config.xml.  Also, it references classes,
>>> >> "cms.beans.framework.AbstractUIBean" and
>>> >> "com.c2gl.jsf.framework.ApplicationResource" that I don't see defined
>>> >> anywhere else on the page.
>>> >>
>>> >> Can someone help?  Does someone have a working example of a global
>>> JSF
>>> >> error
>>> >> handler?
>>> >>
>>> >
>>> > There are several ways to error handling:
>>> >
>>> > 1. Use the error handling feature of myfaces. On the wiki there are
>>> > instructions about how to enable and disable it. The error handler
>>> used
>>> to
>>> > do this is javax.faces.webapp._ErrorPageWriter
>>> > 2. Use jsp error handling (redirect errors to a jsp page). No need of
>>> > doing
>>> > changes on faces-config.xml, but you need to disable myfaces error
>>> > handling.
>>> > 3. Use sandbox error handling to redirect errors to a jsf error page
>>> > (faces-config.xml configuration required).
>>> >
>>> > I'll update this wiki page to add more information about it.
>>> >
>>> >
>>> >>
>>> >> Thanks, - Dave
>>> >>
>>> >>
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://www.nabble.com/Global-error-page-question-tp19445165p19445165.html
>>> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>> >>
>>> >>
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Global-error-page-question-tp19445165p19445715.html
>>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>>
>>>
>> In that way, you need to register the beans on faces-config.xml as
>> request
>> scope beans, so the page could be rendered correctly.
>>
> 
> updated wiki to latest enhancements.
> 
> 
>>
>> regards
>>
>> Leonardo Uribe
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Global-error-page-question-tp19445165p19457050.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to