*
The moose likes JSF and the fly likes JSF and HTML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF and HTML" Watch "JSF and HTML" New topic
Author

JSF and HTML

vinutha
Greenhorn

Joined: Nov 29, 2006
Posts: 29
When we design a page using JSF components like this,
<h:inputText id="userName" required="true" />

and when we deploy a page using tomcat, the JSF component is converting into HTML component (when i view the source of that page) like this,
<input id="_id2:userName" name="_id2:userName" type="text" value="" />

How this is happening, ie. how JSF components are converting into HTML components.

Thanks,
Vinutha.
Anupam Narkhede
Greenhorn

Joined: Nov 25, 2006
Posts: 5
IE or any browser can not understand JSF/JSP tag. Thus it is (browser) converts all JSP/JSF tags into HTML tags.
Anupam Narkhede
Greenhorn

Joined: Nov 25, 2006
Posts: 5
IE or any browser can not understand JSF/JSP tag. Thus it is (browser) converts all JSP/JSF tags into HTML tags.
Anupam Narkhede
Greenhorn

Joined: Nov 25, 2006
Posts: 5
IE or any browser can not understand JSF/JSP tag. Thus it is (browser) converts all JSP/JSF tags into HTML tags.
vinutha
Greenhorn

Joined: Nov 29, 2006
Posts: 29
Can you expalin in detail how browser converts JSF into HTML.
because not only in JSF, If we create web pages using any technology.
all those pages will convert into HTML before going to server, and after recieving response from server again the page will be HTML.
so, can you expalin in steps with some pratical example.

Thanks,
Vinutha.
Bruno Souza
Greenhorn

Joined: Apr 26, 2004
Posts: 17
Vinutha,

In the truth, the language that you use to build your web application (JSP, JSF, PHP,...) is converted to HTML by the server. But you can encode your response (the result of your client request) in another language as well, for example, you can encode your pages with JSF and use a JSF RenderKit to build WML output.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15952
    
  19

Bruno is correct. The user's browser ONLY understands HTML tags. Not JSP, JSF or even Microsoft ASP. PHP or Cold Fusion likewise.

The J2EE platform supports the definition of a special type of JavaBean that provides the services needed to convert a custom tag into its HTML equivalents, as well as perform any other server-side actions that might be appropriate. So you code JSF tags which are generally pretty simple and more task-related than straight HTML would be. The JSF/JEE server infrastructure then invokes these tag libraries to produce the actual HTML that will be sent to the user's browser.


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

Joined: Oct 25, 2004
Posts: 77
Check this folder in your tomcat Installation

\\Tomcat5.5\work\Catalina\localhost\<<YOUR_APPLICATION_CONTEXT>>\org\apache\

You will see all your compiled JSP with .java and .class file. If you know Servlet technology than it will be more easy for you to understand.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
JSF is converted into HTML by the HTML render kit.

Download the JSF source here (not the binary), unpack the zip and navigate to \jsf-ri\src\com\sun\faces\renderkit\html_basic\. Those are classes which renders the HTML.
vinutha
Greenhorn

Joined: Nov 29, 2006
Posts: 29
Hi,

Thanks for your reply........

Vinutha.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF and HTML
 
Similar Threads
How do javascript refer to Jsf input field ID
cc.parent in component compositions not working
How to work JSF with iframe
Good or evil , Mixing JSF components with HTML elements ?
Questions about JavaServer Face