- This topic has 2 replies, 2 voices, and was last updated 17 years, 6 months ago by Kevin.Hamrick.
-
AuthorPosts
-
Kevin.HamrickMemberI completed the demo but I noticed what I thought was a problem when I tried it. The problem was that eclipse did not act like it knew what any of the JSF tags were. What I am talking about here is when I type something like ‘<f: ‘ and I am expecting some type of auto complete to come on but nothing.
The real problem however is that when I try to run the app I don’t get any of the output labels or text values…not even a button.
Here is my main login jsp.
All that shows up is the ‘Login Page’ Text
———————————————————————–
<%@ page language=”java” import=”java.util.*” pageEncoding=”ISO-8859-1″%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+”://”+request.getServerName()+”:”+request.getServerPort()+path+”/”;
%><!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<base href=”<%=basePath%>”><title>My JSP ‘welcome.jsp’ starting page</title>
<meta http-equiv=”pragma” content=”no-cache”>
<meta http-equiv=”cache-control” content=”no-cache”>
<meta http-equiv=”expires” content=”0″>
<meta http-equiv=”keywords” content=”keyword1,keyword2,keyword3″>
<meta http-equiv=”description” content=”This is my page”>
<!–
<link rel=”stylesheet” type=”text/css” href=”styles.css”>
–></head>
<body>
Login Page <br>
<f:view><f:loadBundle basename=”com.demo_Properties.MessageBundle” var=”bundle”/>
<h:form rendered=”true” id=”LoginForm”>
<h:outputLabel value=”#{bundle.user_name_label}” for=”useName” rendered=”true”><br></h:outputLabel>
<h:inputText value=”#{UserBean.userName}” rendered=”true” required=”true” id=”userName”/>
<br>
<h:outputLabel for=”password” rendered=”true” value=”#{bundle.user_password_label}”></h:outputLabel>
<h:inputSecret id=”password” redisplay=”false” required=”true” rendered=”true” value=”#{UserBean.password}”></h:inputSecret>
<br>
<h:commandButton value=”#{bundle.login_button_label}” rendered=”true” action=”#{UserBean.loginUser}” id=”submit”/>
</h:form>
</f:view>
</body>
</html>
Loyal WaterMemberAdd these at the top.
<%@ taglib uri=”http://java.sun.com/jsf/html” prefix=”h” %>
<%@ taglib uri=”http://java.sun.com/jsf/core” prefix=”f” %>You didnt use the JSF template to create the page I guess.
Kevin.HamrickMemberYes, that was it. Thank You. I did not know about a jsf template. I am following the demo so either it is not a step in there are I missed it which is very possible as now I am having problems getting the error message to appear using FacesContext. I am thinking I must have missed a step in there somewhere. I’ll do it over again.
-
AuthorPosts