My Code
jsf
%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<f:view>
<h:form>
<t:outputText value="Username" />
<t:inputText value="#{loginBean.name}" />
<t:outputText value="Password"/>
<h:inputSecret value="#{loginBean.pass}"></h:inputSecret>
<h:commandButton value="Submit" >
</h:commandButton>
<h:outputText value = "#{loginBean.name}" />
</h:form>
</f:view>
</body>
</html>
Bean
public class LoginBean {
public
String name;
public String pass;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPass() {
return pass;
}
public void setPass(String pass) {
this.pass = pass;
}
Error
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Base is null: loginBean
javax.faces.webapp.FacesServlet.service(FacesServlet.java:218)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
root cause
javax.faces.el.PropertyNotFoundException: Base is null: loginBean
org.apache.myfaces.el.ValueBindingImpl.resolveToBaseAndProperty(ValueBindingImpl.java:463)
org.apache.myfaces.el.ValueBindingImpl.getType(ValueBindingImpl.java:175)
org.apache.myfaces.shared_tomahawk.renderkit._SharedRendererUtils.findUIOutputConverter(_SharedRendererUtils.java:58)
org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.findUIOutputConverter(RendererUtils.java:311)
org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.getConvertedUIOutputValue(RendererUtils.java:606)
org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlTextRendererBase.getConvertedValue(HtmlTextRendererBase.java:191)
javax.faces.component.UIInput.getConvertedValue(UIInput.java:733)
javax.faces.component.UIInput.validate(UIInput.java:658)
javax.faces.component.UIInput.executeValidate(UIInput.java:869)
javax.faces.component.UIInput.processValidators(UIInput.java:432)
javax.faces.component.UIForm.processValidators(UIForm.java:190)
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:932)
javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:362)
org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:32)
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)