aspose file tools
The moose likes JSF and the fly likes Query regarding xhtml page run in JSF1.2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Query regarding xhtml page run in JSF1.2" Watch "Query regarding xhtml page run in JSF1.2" New topic

Query regarding xhtml page run in JSF1.2

ujwwala tem
Ranch Hand

Joined: Feb 10, 2010
Posts: 87

I created a simple jsf application ,I am trying to run .xhtml file without bean,
<code>My xtml file is

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html lang="en" xmlns="" xmlns:f=""
xmlns:h="" xmlns:ui="">

<title>Insert title here</title>
<f:view contentType="text/html">
<hutputText value="Hello World"></hutputText>


and I want to know what can be the navigation rule for this for the same page and I am trying to run it but its asking do you want to open or save the file,

Please reply
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16540

There is no navigation rule for that page because you have no form or associated action that would trigger and direct navigation.

If you get a "open or save file" dialog, it usually means that you didn't set up your WEB-INF/web.xml file to direct JSF requests to the FacesServlet OR that you are requesting the View by its Resource path (xxx.xhtml) when you should be requesting the view by its URL (xxx.jsf)

Your code tags didn't work. We handle them by a non-HTML processor and their delimiters are square bracket characters, not the angle brackets that HTML uses.

Customer surveys are for companies who didn't pay proper attention to begin with.
ujwwala tem
Ranch Hand

Joined: Feb 10, 2010
Posts: 87
Thanks for the reply but still its not working,

When I am doing as http://localhost:8080/jsf2/faces/index.xhtml

Now the error is as:Caused by:
java.lang.NullPointerException - context
java.lang.NullPointerException: context
at javax.faces.component.UIComponentBase.getRenderer(
at javax.faces.component.UIComponentBase.getRendersChildren(
at javax.faces.component.UIComponent.encodeAll(

My Index.xhtml is <code>

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns=""

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />


<hutputLabel for="input" value="Enter your name: " />
<h:inputText id="input" value="#{}" required="true" />
<br />
<br />
<h:commandButton value="Go" action="#{welcomeBean.sayHello}" />
<h:messages />



The project works fine with .jsp but not working with .xhml,

Also I wanted to know basically how to create .xhtml pages in eclipse juno, I copied from google sample page and given .xhtml page but there is not showing properties ctrl_space in tags its saying no default propsal,

Please Reply,

Have you tried LearnNowOnline?
subject: Query regarding xhtml page run in JSF1.2