i am developing a jsf web application with netbeans.
<fieldset>
<div>
<h:inputText id="firstname" value="#{loginCtrl.customer.name}" label="Name">
<f:validateLength minimum="3" maximum="8"/>
</h:inputText>
<div>
...
I wrote that code but when I deploy it to the apache tomcat server, there is no field shown? Why? h:input has no visibility element?
greetings and thx in advance
PS.: my web.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<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>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/register.jsf</welcome-file>
</welcome-file-list>
</web-app>
Make sure that the request URL as you see in browser’s address bar matches the URL pattern of the
FacesServletas specified inweb.xml. You can verify this by rightclicking the page in browser and viewing the generated HTML source. If the<h:inputText>is still there, then it means that theFacesServletisn’t been invoked at all.If you open the page by
/page.xhtml, then theFacesServletis apparently not mapped on*.xhtml, but on*.jsfor something else. You’d need to change the URL in browser’s address bar accordingly to match exactly the specified URL pattern, or to fix the mapping accordingly.