suvitha_raj 0 Newbie Poster

add taglibraries in WEB-INF folder.It will work correctly

suvitha_raj 0 Newbie Poster

Hi all,
i did code in jsp for "change password" when user want to change his password he have to enter his old password and then new password.
if he enter wrong password there will be error msg display "sorry you have entered wrong password, and if he enter correct password msg will display "your password has successfully change", this is the code:

<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[URL]http://www.w3.org/TR/html4/loose.dtd[/URL]">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {font-size: 16px;
 font-weight: bold;
 font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style15 {font-family: "Cooper Black"}
.style16 {font-size: 12px; font-weight: bold; }
.style3 {font-size: 18px}
-->
</style>
</head>
<body>

<table width="700" height="735" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
  <tr>
    <td height="132" colspan="4"><img src="images/simple_01.gif" width="700" height="132" alt=""></td>
  </tr>
  <tr>
    <td height="51" colspan="4"><img src="images/simple_02.gif" width="700" height="51" alt=""></td>
  </tr>
  <tr>
    <td height="233" colspan="2" background="images/simple_03.gif"><table width="185" border="0" align="center">
        <tr>
          <td><form name="form1" method="post" action="LogInPage.jsp">
              <table width="189" height="177" border="0" align="center">
                <tr>
                  <td><div align="right"></div>
                      <div align="right"><span class="style1">Log In</span></div></td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td width="100"><div align="right"><span class="style16">User Name:</span></div></td>
                  <td width="90" align="right"><div align="left">
                      <input name="txtUserName" type="text" id="txtUserName" size="10">
                  </div></td>
                </tr>
                <tr>
                  <td><div align="right"><span class="style16">Password:</span></div></td>
                  <td><input name="txtPass" type="password" id="txtPass" size="10"></td>
                </tr>
                <tr>
                  <td colspan="2"><div align="right">
                      <input type="submit" name="Submit" value="Log In">
                      <input type="reset" name="Reset" value="Reset">
                  </div></td>
                </tr>
                <tr>
                  <td height="43" colspan="2"><div align="center"><a href="ChangePassword.htm">ChangePassword</a></div></td>
                </tr>
              </table>
          </form></td>
        </tr>
    </table></td>
    <td rowspan="2" background="images/simple_04.gif"><table width="445" border="0">
        <tr>
          <td width="439"><div align="center">
              <p>

              <p>
            <%

   Connection conn;
   Statement stm = null;
            String r …
suvitha_raj 0 Newbie Poster

hi.visit this link for working servlets in eclipse.

http://www.laliluna.de/first-java-servlets-jsp-tutorial.html

suvitha_raj 0 Newbie Poster

whats the difference between page and pageContext in jsp?