wood burning stoves 2.0*
The moose likes JSF and the fly likes Basic  doubt in the JSF 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 "Basic  doubt in the JSF" Watch "Basic  doubt in the JSF" New topic
Author

Basic doubt in the JSF

suneel kumar
Ranch Hand

Joined: Jan 08, 2007
Posts: 46
Hi,
i have a doubt regarding JSF.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<HTML>
<BODY>
<f:view>
<hutputText value="Hello, world!!!"/>
</f:view>
</BODY>
</HTML>

this is the first program which i am trying to do in the JSF .
my doubt is -- is it mandatory to include the first two lines like

<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
even for simple program.
is there any way to do this program..
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Yes, you have to include those so that when the servlet container compiles your JSP it can find the taglibs.


GenRocket - Experts at Building Test Data
John Blanco
Greenhorn

Joined: Jan 13, 2005
Posts: 20
You might be disgusted with having to put those lines in, but if you use a powerful editor, like Eclipse or NetBeans, you can make a template and not worry about retyping it.

If you're going to do any kind of serious JSF work, you'll want a powerful editor anyway.
 
wood burning stoves
 
subject: Basic doubt in the JSF
 
Similar Threads
.jsp or .jsf
actionlistener for selectBooleanCheckbox doubt?
[noob] trying to follow jsf example, having problems
Form Being Rendered Outside of the Page
unable to instantiate tag f:view