Hello everybody,
Since i am new to
JSF, i am facing syntax and using wrong tags, if you people help me, it will be very greatfull for me.
here my code
************************************************************************************
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page errorPage="/errors/errorpage.jsp" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@page import="com.sis.dataprod.login.Login"%>
<%@page import="java.util.StringTokenizer"%>
<%@page import="javax.faces.context.FacesContext"%>
<%@page import="java.util.Locale"%>
<%@page import="com.sis.dataprod.helper.LoginHelper"%>
<f:view>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript">
function check_The_Password(){
var pswd1 = document.getElementById('firstpswd');
var pswd2 = document.getElementById('secondpswd');
if((pswd1.value != "") && (pswd2.value != "") && (pswd1.value == pswd2.value)){
alert("Password has been changed");
}
else if((pswd1.value == "")){
alert("Please enter the new password");
document.getElementById("firstpswd").focus();
return false;
}
else if((pswd2.value == "")){
alert("Please confirm the password");
document.getElementById("secondpswd").focus();
return false;
}
}
</script>
</head>
<body>
<FORM NAME="confirmPassword" ACTION="personalreport" onsubmit="return check_The_Password();">
<div id="container">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="col1">Enter New Password </td>
<td class="col2">
<h:inputSecret id="firstpswd" value="" size="20" />
</td>
</tr>
<tr>
<td class="col1">Confirm The Password </td>
<td class="col2">
<h:inputSecret id="secondpswd" value="" size="20" />
</td>
</tr>
</table>
<h:commandButton id="Submit" value="Submit" action="ResetPassword.changeThePswd();"/>
<div id="footer">
<
jsp:include page="/application/common/footer.jsp"></jsp:include></div>
</div>
</FORM>
</body>
</html>
</f:view>
*********************************************************************************************
and in browser i am getting like this
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find FacesContext
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:694)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:665)
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:806)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.application.myprofile.ResetPassword_jsp._jspService(ResetPassword_jsp.java:84)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find FacesContext
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.errors.errorpage_jsp._jspService(errorpage_jsp.java:71)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:694)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:665)
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:806)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.application.myprofile.ResetPassword_jsp._jspService(ResetPassword_jsp.java:84)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
javax.servlet.jsp.JspException: Cannot find FacesContext
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:405)
com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105)
org.apache.jsp.errors.errorpage_jsp._jspx_meth_f_005fview_005f0(errorpage_jsp.java:88)
org.apache.jsp.errors.errorpage_jsp._jspService(errorpage_jsp.java:64)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:694)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:665)
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:806)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.application.myprofile.ResetPassword_jsp._jspService(ResetPassword_jsp.java:84)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs.