Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF and HTML

 
vinutha
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IE or any browser can not understand JSF/JSP tag. Thus it is (browser) converts all JSP/JSF tags into HTML tags.
 
vinutha
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18027
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sajan Patel
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

Vinutha.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic