Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JavaServer Faces » Page being rendered as XML
Page being rendered as XML [message #489102] Thu, 01 October 2009 13:58 Go to next message
Steve Whatmore is currently offline Steve WhatmoreFriend
Messages: 95
Registered: July 2009
Member
Good morning,

I am in the middle of upgrading to JSF 2.0 and am having problems getting my
very basic page to render as HTML in the embedded browser.

Here is the source of the page.

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<body bgcolor="white">

HELLO WORLD!

</body>
</html>

and this source is actually be displayed in the browser.

This seems to indicate to me that the page is not actually being executed by
the JSF engine.

Anyone seen this and can assist?

Whatty
Re: Page being rendered as XML [message #489151 is a reply to message #489102] Thu, 01 October 2009 15:51 Go to previous messageGo to next message
Yury Kats is currently offline Yury KatsFriend
Messages: 104
Registered: July 2009
Senior Member
What's your file's extension and is your jsf runtime configured to handle that extension?

On 10/1/2009 9:58 AM, Whatty wrote:
> Good morning,
>
> I am in the middle of upgrading to JSF 2.0 and am having problems getting my
> very basic page to render as HTML in the embedded browser.
>
> Here is the source of the page.
>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core">
> <body bgcolor="white">
>
> HELLO WORLD!
>
> </body>
> </html>
>
> and this source is actually be displayed in the browser.
>
> This seems to indicate to me that the page is not actually being executed by
> the JSF engine.
>
> Anyone seen this and can assist?
>
> Whatty
>
Re: Page being rendered as XML [message #489170 is a reply to message #489151] Thu, 01 October 2009 16:42 Go to previous message
Steve Whatmore is currently offline Steve WhatmoreFriend
Messages: 95
Registered: July 2009
Member
Well I believe so here is my web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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">

<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>

<context-param>
<description>
Set this flag to true if you want the JavaServer Faces Reference
Implementation to validate the XML in your faces-config.xml
resources
against the DTD. Default value is false.
</description>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>false</param-value>
</context-param>

<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/properties/log4j.properties</param-value >
</context-param>

<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>

<context-param>
<description>Special Debug Output for Development</description>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.faces</param-value>
</context-param>

<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class >
</listener>

<servlet>
<servlet-name>ConfigurationServlet</servlet-name>
<servlet-class>com.purefacts.web.util.ConfigurationServlet</servlet-class >
<init-param>
<param-name>configuration</param-name>
<param-value>/WEB-INF/properties/configuration.xml</param-value >
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet>
<servlet-name>StartupServlet</servlet-name>
<servlet-class>com.purefacts.web.util.StartupServlet</servlet-class >
<init-param>
<param-name>ApplicationName</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>

<servlet>
<servlet-name>FacesServlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class >
</servlet>

<servlet-mapping>
<servlet-name>FacesServlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>

<session-config>
<session-timeout>720</session-timeout>
</session-config>

<error-page>
<error-code>500</error-code>
<location>/jsf/errorPage.faces</location>
</error-page>

<error-page>
<error-code>404</error-code>
<location>/jsf/errorPage.faces</location>
</error-page>

<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/jsf/errorPage.faces</location>
</error-page>

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

</web-app>

I am receiving no errors on startup (see log below)

Oct 1, 2009 12:17:06 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
C:\DEV\Java\JDK\jdk1.6.0_10\bin;.;C:\Windows\Sun\Java\bin;C: \Windows\system32;C:\Windows;C:/DEV/Java/JDK/jre6/bin/client ;C:/DEV/Java/JDK/jre6/bin;C:\DEV\DB\Sybase\Client\DataAccess \ADONET\dll;C:\DEV\DB\Sybase\Client\DataAccess\OLEDB\dll;C:\ DEV\DB\Sybase\Client\DataAccess\ODBC\dll;C:\DEV\DB\Sybase\Cl ient\OCS-15_0\lib3p;C:\DEV\DB\Sybase\Client\OCS-15_0\dll;C:\ DEV\DB\Sybase\Client\OCS-15_0\bin;C:\Program
Files (x86)\Windows Resource Kits\Tools\;C:\Program Files (x86)\Common
Files\Microsoft Shared\Windows
Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem ;C:\Program
Files (x86)\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program
Files\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\Wave
Systems Corp\Gemalto\Access
Client\v5\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Pr ogram Files
(x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files
(x86)\TortoiseSVN\bin;C:\Program Files (x86)\Common Files\Roxio
Shared\9.0\DLLShared\;C:\Program Files\TortoiseSVN\bin;C:\Program
Files\Common Files\Microsoft Shared\Windows
Live;C:\DEV\DB\DB2\IBM\SQLLIB\BIN;C:\DEV\DB\DB2\IBM\SQLLIB\F UNCTION;C:\DEV\DB\DB2\IBM\SQLLIB\SAMPLES\REPL;C:\Program
Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft
SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL
Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL
Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft
SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft Visual Studio
9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Common Files\Roxio
Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio
Shared\9.0\DLLShared\;C:\Program Files
(x86)\QuickTime\QTSystem\;C:\DEV\DB\Sybase\Client\DBISQL\bin ;C:\Program
Files\Common Files\Microsoft Shared\Windows Live
Oct 1, 2009 12:17:06 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Oct 1, 2009 12:17:06 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 407 ms
Oct 1, 2009 12:17:06 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 1, 2009 12:17:06 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
Oct 1, 2009 12:17:07 PM com.sun.faces.config.ConfigureListener
contextInitialized
INFO: Initializing Mojarra 2.0.0 (RC b16) for context '/PF'
Oct 1, 2009 12:17:08 PM
com.sun.faces.config.ConfigureListener$WebConfigResourceMoni tor$Monitor
<init>
INFO: Monitoring jndi:/localhost/PF/WEB-INF/faces-config.xml for
modifications
Oct 1, 2009 12:17:08 PM org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'webapp.root' =
[C:\Projects-3.5\.metadata\.plugins\org.eclipse.wst.server.c ore\tmp0\wtpwebapps\PF\]
Oct 1, 2009 12:17:08 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing log4j from
[C:\Projects-3.5\.metadata\.plugins\org.eclipse.wst.server.c ore\tmp0\wtpwebapps\PF\WEB-INF\properties\log4j.properties]
2009-10-01 12:17:08,638 DEBUG com.purefacts.web.util.ConfigurationServlet
init - Loading configuration file: /WEB-INF/properties/configuration.xml
2009-10-01 12:17:08,677 DEBUG
org.apache.commons.configuration.ConfigurationUtils locate -
ConfigurationUtils.locate(): base is null, name is null
2009-10-01 12:17:08,680 DEBUG com.purefacts.util.AbstractConfiguration
debug - loadApplicationConfiguration
2009-10-01 12:17:08,691 DEBUG
org.apache.commons.configuration.ConfigurationUtils locate -
ConfigurationUtils.locate(): base is null, name is null
Oct 1, 2009 12:17:08 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 1, 2009 12:17:08 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Oct 1, 2009 12:17:08 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/20 config=null
Oct 1, 2009 12:17:08 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2662 ms





However, now I am running into the problem of how to setup JSF 2.0 in
"Yury Kats" <ykats@us.ibm.com> wrote in message
news:ha2j61$2f5$1@build.eclipse.org...
> What's your file's extension and is your jsf runtime configured to handle
> that extension?
>
> On 10/1/2009 9:58 AM, Whatty wrote:
>> Good morning,
>>
>> I am in the middle of upgrading to JSF 2.0 and am having problems getting
>> my
>> very basic page to render as HTML in the embedded browser.
>>
>> Here is the source of the page.
>>
>> <html xmlns="http://www.w3.org/1999/xhtml"
>> xmlns:ui="http://java.sun.com/jsf/facelets"
>> xmlns:h="http://java.sun.com/jsf/html"
>> xmlns:f="http://java.sun.com/jsf/core">
>> <body bgcolor="white">
>>
>> HELLO WORLD!
>>
>> </body>
>> </html>
>>
>> and this source is actually be displayed in the browser.
>>
>> This seems to indicate to me that the page is not actually being executed
>> by
>> the JSF engine.
>>
>> Anyone seen this and can assist?
>>
>> Whatty
>>
Re: Page being rendered as XML [message #620435 is a reply to message #489102] Thu, 01 October 2009 15:51 Go to previous message
Yury Kats is currently offline Yury KatsFriend
Messages: 104
Registered: July 2009
Senior Member
What's your file's extension and is your jsf runtime configured to handle that extension?

On 10/1/2009 9:58 AM, Whatty wrote:
> Good morning,
>
> I am in the middle of upgrading to JSF 2.0 and am having problems getting my
> very basic page to render as HTML in the embedded browser.
>
> Here is the source of the page.
>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core">
> <body bgcolor="white">
>
> HELLO WORLD!
>
> </body>
> </html>
>
> and this source is actually be displayed in the browser.
>
> This seems to indicate to me that the page is not actually being executed by
> the JSF engine.
>
> Anyone seen this and can assist?
>
> Whatty
>
Re: Page being rendered as XML [message #620438 is a reply to message #489151] Thu, 01 October 2009 16:42 Go to previous message
Steve Whatmore is currently offline Steve WhatmoreFriend
Messages: 95
Registered: July 2009
Member
Well I believe so here is my web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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">

<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>

<context-param>
<description>
Set this flag to true if you want the JavaServer Faces Reference
Implementation to validate the XML in your faces-config.xml
resources
against the DTD. Default value is false.
</description>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>false</param-value>
</context-param>

<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/properties/log4j.properties</param-value >
</context-param>

<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>

<context-param>
<description>Special Debug Output for Development</description>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.faces</param-value>
</context-param>

<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class >
</listener>

<servlet>
<servlet-name>ConfigurationServlet</servlet-name>
<servlet-class>com.purefacts.web.util.ConfigurationServlet</servlet-class >
<init-param>
<param-name>configuration</param-name>
<param-value>/WEB-INF/properties/configuration.xml</param-value >
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet>
<servlet-name>StartupServlet</servlet-name>
<servlet-class>com.purefacts.web.util.StartupServlet</servlet-class >
<init-param>
<param-name>ApplicationName</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>

<servlet>
<servlet-name>FacesServlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class >
</servlet>

<servlet-mapping>
<servlet-name>FacesServlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>

<session-config>
<session-timeout>720</session-timeout>
</session-config>

<error-page>
<error-code>500</error-code>
<location>/jsf/errorPage.faces</location>
</error-page>

<error-page>
<error-code>404</error-code>
<location>/jsf/errorPage.faces</location>
</error-page>

<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/jsf/errorPage.faces</location>
</error-page>

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

</web-app>

I am receiving no errors on startup (see log below)

Oct 1, 2009 12:17:06 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
C:\DEV\Java\JDK\jdk1.6.0_10\bin;.;C:\Windows\Sun\Java\bin;C: \Windows\system32;C:\Windows;C:/DEV/Java/JDK/jre6/bin/client ;C:/DEV/Java/JDK/jre6/bin;C:\DEV\DB\Sybase\Client\DataAccess \ADONET\dll;C:\DEV\DB\Sybase\Client\DataAccess\OLEDB\dll;C:\ DEV\DB\Sybase\Client\DataAccess\ODBC\dll;C:\DEV\DB\Sybase\Cl ient\OCS-15_0\lib3p;C:\DEV\DB\Sybase\Client\OCS-15_0\dll;C:\ DEV\DB\Sybase\Client\OCS-15_0\bin;C:\Program
Files (x86)\Windows Resource Kits\Tools\;C:\Program Files (x86)\Common
Files\Microsoft Shared\Windows
Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem ;C:\Program
Files (x86)\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program
Files\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\Wave
Systems Corp\Gemalto\Access
Client\v5\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Pr ogram Files
(x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files
(x86)\TortoiseSVN\bin;C:\Program Files (x86)\Common Files\Roxio
Shared\9.0\DLLShared\;C:\Program Files\TortoiseSVN\bin;C:\Program
Files\Common Files\Microsoft Shared\Windows
Live;C:\DEV\DB\DB2\IBM\SQLLIB\BIN;C:\DEV\DB\DB2\IBM\SQLLIB\F UNCTION;C:\DEV\DB\DB2\IBM\SQLLIB\SAMPLES\REPL;C:\Program
Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft
SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL
Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL
Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft
SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft Visual Studio
9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Common Files\Roxio
Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio
Shared\9.0\DLLShared\;C:\Program Files
(x86)\QuickTime\QTSystem\;C:\DEV\DB\Sybase\Client\DBISQL\bin ;C:\Program
Files\Common Files\Microsoft Shared\Windows Live
Oct 1, 2009 12:17:06 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Oct 1, 2009 12:17:06 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 407 ms
Oct 1, 2009 12:17:06 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 1, 2009 12:17:06 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
Oct 1, 2009 12:17:07 PM com.sun.faces.config.ConfigureListener
contextInitialized
INFO: Initializing Mojarra 2.0.0 (RC b16) for context '/PF'
Oct 1, 2009 12:17:08 PM
com.sun.faces.config.ConfigureListener$WebConfigResourceMoni tor$Monitor
<init>
INFO: Monitoring jndi:/localhost/PF/WEB-INF/faces-config.xml for
modifications
Oct 1, 2009 12:17:08 PM org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'webapp.root' =
[C:\Projects-3.5\.metadata\.plugins\org.eclipse.wst.server.c ore\tmp0\wtpwebapps\PF\]
Oct 1, 2009 12:17:08 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing log4j from
[C:\Projects-3.5\.metadata\.plugins\org.eclipse.wst.server.c ore\tmp0\wtpwebapps\PF\WEB-INF\properties\log4j.properties]
2009-10-01 12:17:08,638 DEBUG com.purefacts.web.util.ConfigurationServlet
init - Loading configuration file: /WEB-INF/properties/configuration.xml
2009-10-01 12:17:08,677 DEBUG
org.apache.commons.configuration.ConfigurationUtils locate -
ConfigurationUtils.locate(): base is null, name is null
2009-10-01 12:17:08,680 DEBUG com.purefacts.util.AbstractConfiguration
debug - loadApplicationConfiguration
2009-10-01 12:17:08,691 DEBUG
org.apache.commons.configuration.ConfigurationUtils locate -
ConfigurationUtils.locate(): base is null, name is null
Oct 1, 2009 12:17:08 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 1, 2009 12:17:08 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Oct 1, 2009 12:17:08 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/20 config=null
Oct 1, 2009 12:17:08 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2662 ms





However, now I am running into the problem of how to setup JSF 2.0 in
"Yury Kats" <ykats@us.ibm.com> wrote in message
news:ha2j61$2f5$1@build.eclipse.org...
> What's your file's extension and is your jsf runtime configured to handle
> that extension?
>
> On 10/1/2009 9:58 AM, Whatty wrote:
>> Good morning,
>>
>> I am in the middle of upgrading to JSF 2.0 and am having problems getting
>> my
>> very basic page to render as HTML in the embedded browser.
>>
>> Here is the source of the page.
>>
>> <html xmlns="http://www.w3.org/1999/xhtml"
>> xmlns:ui="http://java.sun.com/jsf/facelets"
>> xmlns:h="http://java.sun.com/jsf/html"
>> xmlns:f="http://java.sun.com/jsf/core">
>> <body bgcolor="white">
>>
>> HELLO WORLD!
>>
>> </body>
>> </html>
>>
>> and this source is actually be displayed in the browser.
>>
>> This seems to indicate to me that the page is not actually being executed
>> by
>> the JSF engine.
>>
>> Anyone seen this and can assist?
>>
>> Whatty
>>
Previous Topic:Page being rendered as XML
Next Topic:JSF Support in Galileo
Goto Forum:
  


Current Time: Tue Mar 19 04:25:52 GMT 2024

Powered by FUDForum. Page generated in 0.02299 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top