aspose file tools*
The moose likes JSF and the fly likes JSF Components does not appear on the browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF Components does not appear on the browser" Watch "JSF Components does not appear on the browser" New topic
Author

JSF Components does not appear on the browser

baris deniz
Greenhorn

Joined: Oct 16, 2008
Posts: 7
Hello, I am using JSF 1.2 mojarra IR, Eclipse Galileo and Tomcat 6.0.
When I start web server and request the jsp page including jsf components, JSF components like does not appear on the browser. However, I see HTML code like
.

I don't understand why. Because same code works correctly on my other computer. Is there s.one who has an idea on this issue?
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Is it embedded with a JSF view tag?

-Cameron McKenzie
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

If you mean that you don't see the JSF tags when you use the View Page Source command in your browser, that's because web browsers don't understand JSF.

Part of JSF is a layer known as the rendering layer. Its responsibility is to render the JSF tags in a way that the client can understand. Most commonly, the client is a web browser, and what web browsers understand is HTML. So the JSF HTML renderers are employed to do the translation.


Customer surveys are for companies who didn't pay proper attention to begin with.
baris deniz
Greenhorn

Joined: Oct 16, 2008
Posts: 7
-Yes, it is embedded in f:view tag . But the thing is that the same code works very well on my other computer and it does not work at this one. By the way, my current computer OS is VISTA, the other one was XP. The problem can be in the configurations of the OS. However, I am not sure.

-No, I don't mean the view source code; I know JSF translation issue. But thanks anyway.

A simple example that doesn't work:
Smitha H Rao
Ranch Hand

Joined: Oct 20, 2007
Posts: 50
The jsf displaying is not dependent on the Operating system as its based on java.
Make sure you have configured the Faces Servlet in the web.xml and defined the servlet mapping properly. Something like below:

<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</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>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>


Thanks

Free Mock tests Interview questions
Dennis Zandvliet
Ranch Hand

Joined: Jun 19, 2008
Posts: 60
baris deniz wrote:Hello, I am using JSF 1.2 mojarra IR, Eclipse Galileo and Tomcat 6.0.


Maybe you're jsf implementation of jsf (JSF 1.2 mojarra IR) is nog compatible with

-> xmlns:h="http://java.sun.com/jsf/html" version="2.0"
Babu Subburathinam
Greenhorn

Joined: Sep 03, 2009
Posts: 7
Everything seems to be all right.

Would you please do a view source on the browser and copy paste the contents here.
Priya Vit
Greenhorn

Joined: Nov 13, 2009
Posts: 1
I am having the same issue...please let me know if you had any progress with this.

Regards
 
 
subject: JSF Components does not appear on the browser