SlideShare una empresa de Scribd logo
1 de 28
SiteHome.html
<html>
<head>
<title>URL Rewriting Example</title>
</head>
<body>
This is the Home page for the example to demonstrate how
to use <BR>
URL Rewriting and Hidden form fields to mantain the client
state. <BR><BR>
<a href="Login.html">Login</a>
</body>
</html>
Login.html
<html>
<head>
<title>URL Rewriting Example</title>
</head>
<body>
<form name="loginform" action="login" method="post">
<table border="0">
<tr>
<td>UserName:</td>
<td><input type="text" name="uname"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="password"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit"></td>
</tr>
</table>
</form>
</body>
</html>
• Once you click on submit button
• Post method is executed, data is submitted
into server in the form of request object
• Later LoginServlet program gets executed
because of <form action=“login”> whose url
pattern servlet name is “LoginServlet” (see
web.xml file)
LoginServlet.java
package com.rajendra.servlets;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.*;
import javax.servlet.http.*;
public class LoginServlet extends HttpServlet {
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String uname=request.getParameter("uname");
String pass=request.getParameter("password");
LoginServlet.java
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<HTML>");
out.println(" <HEAD><TITLE>A
Servlet</TITLE></HEAD>");
out.println(" <BODY>");
LoginServlet.java
if (uname==null||uname.equals("")){
out.println("<b><i>Username Cannot be empty</i></b>");
RequestDispatcher rd=request.getRequestDispatcher("/Login.html");
rd.include(request, response);
return;
}
if (pass==null||pass.equals("")){
out.println("<b><i>Password Cannot be empty</i></b>");
RequestDispatcher rd=request.getRequestDispatcher("/Login.html");
rd.include(request, response);
return;
}
UserDAO ud=new UserDAO();
LoginServlet.java
if(ud.validate(uname,pass)){
out.println("<table width=98% height=95% border=1><tr>");
out.println("<td height=45 colspan=2 align=center><font size=5>My Email
Site</font></td>");
out.println("</tr><tr>");
out.println("<td width=12% height=545 align=center valign=top>");
out.println("<p>&nbsp;</p><p><font size=4>");
out.println("<a href='inbox?uname="+uname+"'>InBox</a>");
out.println("</font></p>");
out.println("<p><font size=4>Bulk Mail</font></p>");
out.println("<p><font size=4>Sent Items</font></p>");
out.println("<p><font size=4>Write Mail</font></p>");
out.println("<p><font size=4><a href='Login.html'>Logout</a></font></p>");
out.println("<p>&nbsp;</p></td>");
out.println("<td width=88% align=left valign=top><p>&nbsp;</p>");
out.println("<p><font size=4>Welcome, "+uname+"</font></p></td>");
out.println("</tr><tr align=center>");
out.println("<td colspan=2><div align=center>@Copyrights 2001-08</div></td>");
out.println("</tr></table>");
LoginServlet.java
}//if
else{
out.println("<b><i>Username or Password given are not valid</i></b>");
RequestDispatcher rd=request.getRequestDispatcher("/Login.html");
rd.include(request, response);
return;
}
out.println(" </BODY>");
out.println("</HTML>");
out.flush();
out.close();
}
}
• Now servlet container calls the public service()
and which intern calls the protected service()
method
• Protected service() calls doPost() method
• Now if() conditions becomes false, (server side
validation for username and password).
• Now UserDao object is created to call
validate() method
LoginServlet.java
if(ud.validate(uname,pass))
• if(ud.validate(uname,pass))
• if(ud.validate(rajendra,raj)) method calling
• Now control goes to validate () method in
UserDao class
UserDAO.java
package com.rajendra.servlets;
import java.sql.*;
public class UserDAO {
public boolean validate(String uname, String pass){
try {
Connection con=DriverConnection.getConnection();
Statement st=con.createStatement();
ResultSet rs=st.executeQuery(
"select count(*) from userdetails where
uname='"+uname+"' and pass='"+pass+"'");
return rs.next();
}//try
catch(Exception e){
e.printStackTrace();
}
return false;
}
}
• return rs.next();
• return true;//it returns true as resultset
contains next element
• Now control come back to the
LoginServlet.java
if(ud.validate(uname,pass)){ //if condition becomes true
out.println("<table width=98% height=95% border=1><tr>");
out.println("<td height=45 colspan=2 align=center><font size=5>My Email
Site</font></td>");
out.println("</tr><tr>");
out.println("<td width=12% height=545 align=center valign=top>");
out.println("<p>&nbsp;</p><p><font size=4>");
out.println("<a href='inbox?uname="+uname+"'>InBox</a>");
out.println("</font></p>");
out.println("<p><font size=4>Bulk Mail</font></p>");
out.println("<p><font size=4>Sent Items</font></p>");
out.println("<p><font size=4>Write Mail</font></p>");
out.println("<p><font size=4><a href='Login.html'>Logout</a></font></p>");
out.println("<p>&nbsp;</p></td>");
out.println("<td width=88% align=left valign=top><p>&nbsp;</p>");
out.println("<p><font size=4>Welcome, "+uname+"</font></p></td>");
out.println("</tr><tr align=center>");
out.println("<td colspan=2><div align=center>@Copyrights 2001-08</div></td>");
out.println("</tr></table>");
Sessionex1

Más contenido relacionado

La actualidad más candente

Form Processing In Php
Form Processing In PhpForm Processing In Php
Form Processing In Php
Harit Kothari
 
Web Developement Workshop (Oct 2009 -Day 1)
Web Developement Workshop (Oct 2009 -Day 1)Web Developement Workshop (Oct 2009 -Day 1)
Web Developement Workshop (Oct 2009 -Day 1)
Linux User's Group
 
HTML 5 Tables and Forms
HTML 5 Tables and FormsHTML 5 Tables and Forms
HTML 5 Tables and Forms
Doncho Minkov
 
HTML Powerpoint-Jeffrey C. Johnson III
HTML Powerpoint-Jeffrey C. Johnson IIIHTML Powerpoint-Jeffrey C. Johnson III
HTML Powerpoint-Jeffrey C. Johnson III
jeffcarlj
 

La actualidad más candente (19)

Rounded Shaped Box Example 1
Rounded Shaped Box Example 1Rounded Shaped Box Example 1
Rounded Shaped Box Example 1
 
Getting Information through HTML Forms
Getting Information through HTML FormsGetting Information through HTML Forms
Getting Information through HTML Forms
 
HTML5 Web Forms
HTML5 Web FormsHTML5 Web Forms
HTML5 Web Forms
 
HTML 4.0
HTML 4.0HTML 4.0
HTML 4.0
 
Html 5 Forms
Html 5 FormsHtml 5 Forms
Html 5 Forms
 
Html Table
Html TableHtml Table
Html Table
 
Html tag list
Html tag listHtml tag list
Html tag list
 
Html 5 tags
Html  5 tagsHtml  5 tags
Html 5 tags
 
Form Processing In Php
Form Processing In PhpForm Processing In Php
Form Processing In Php
 
html-table
html-tablehtml-table
html-table
 
Web Developement Workshop (Oct 2009 -Day 1)
Web Developement Workshop (Oct 2009 -Day 1)Web Developement Workshop (Oct 2009 -Day 1)
Web Developement Workshop (Oct 2009 -Day 1)
 
HTML frames and HTML forms
HTML frames and HTML formsHTML frames and HTML forms
HTML frames and HTML forms
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
 
Html tags describe in bangla
Html tags describe in banglaHtml tags describe in bangla
Html tags describe in bangla
 
Html table tags
Html table tagsHtml table tags
Html table tags
 
Chapter 07 php forms handling
Chapter 07   php forms handlingChapter 07   php forms handling
Chapter 07 php forms handling
 
HTML 5 Tables and Forms
HTML 5 Tables and FormsHTML 5 Tables and Forms
HTML 5 Tables and Forms
 
5.1 html lec 5
5.1 html lec 55.1 html lec 5
5.1 html lec 5
 
HTML Powerpoint-Jeffrey C. Johnson III
HTML Powerpoint-Jeffrey C. Johnson IIIHTML Powerpoint-Jeffrey C. Johnson III
HTML Powerpoint-Jeffrey C. Johnson III
 

Destacado (8)

Class
ClassClass
Class
 
Exceptions
ExceptionsExceptions
Exceptions
 
Class
ClassClass
Class
 
Get data
Get dataGet data
Get data
 
Interface connection
Interface connectionInterface connection
Interface connection
 
Different waysconnect
Different waysconnectDifferent waysconnect
Different waysconnect
 
1 introduction to html
1 introduction to html1 introduction to html
1 introduction to html
 
2. attributes
2. attributes2. attributes
2. attributes
 

Similar a Sessionex1

Caracteristicas Basicas De Htlm
Caracteristicas Basicas De HtlmCaracteristicas Basicas De Htlm
Caracteristicas Basicas De Htlm
Maria S Rivera
 
Ex[1].3 php db connectivity
Ex[1].3 php db connectivityEx[1].3 php db connectivity
Ex[1].3 php db connectivity
Mouli Chandira
 
data insert in codeigniter.pptx
data insert in codeigniter.pptxdata insert in codeigniter.pptx
data insert in codeigniter.pptx
feesfesfesf
 
sri_ITSD325_IP3Code-ShoppingAbout UsfrmAboutus.aspx@ Page.docx
sri_ITSD325_IP3Code-ShoppingAbout UsfrmAboutus.aspx@ Page.docxsri_ITSD325_IP3Code-ShoppingAbout UsfrmAboutus.aspx@ Page.docx
sri_ITSD325_IP3Code-ShoppingAbout UsfrmAboutus.aspx@ Page.docx
whitneyleman54422
 
Your Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages SuckYour Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages Suck
Anthony Montalbano
 
Form & frame
Form & frameForm & frame
Form & frame
aminsir
 

Similar a Sessionex1 (20)

Lab final
Lab finalLab final
Lab final
 
Caracteristicas Basicas De Htlm
Caracteristicas Basicas De HtlmCaracteristicas Basicas De Htlm
Caracteristicas Basicas De Htlm
 
Ex[1].3 php db connectivity
Ex[1].3 php db connectivityEx[1].3 php db connectivity
Ex[1].3 php db connectivity
 
Delete statement in PHP
Delete statement in PHPDelete statement in PHP
Delete statement in PHP
 
Lect# 1 html part ii
Lect# 1 html part iiLect# 1 html part ii
Lect# 1 html part ii
 
Update statement in PHP
Update statement in PHPUpdate statement in PHP
Update statement in PHP
 
data insert in codeigniter.pptx
data insert in codeigniter.pptxdata insert in codeigniter.pptx
data insert in codeigniter.pptx
 
Practicals it
Practicals itPracticals it
Practicals it
 
sri_ITSD325_IP3Code-ShoppingAbout UsfrmAboutus.aspx@ Page.docx
sri_ITSD325_IP3Code-ShoppingAbout UsfrmAboutus.aspx@ Page.docxsri_ITSD325_IP3Code-ShoppingAbout UsfrmAboutus.aspx@ Page.docx
sri_ITSD325_IP3Code-ShoppingAbout UsfrmAboutus.aspx@ Page.docx
 
Your Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages SuckYour Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages Suck
 
INTRODUCTION TO HTML & CSS .pptx
INTRODUCTION TO HTML & CSS .pptxINTRODUCTION TO HTML & CSS .pptx
INTRODUCTION TO HTML & CSS .pptx
 
1cst
1cst1cst
1cst
 
HTML SERVER CONTROL - ASP.NET WITH C#
HTML SERVER CONTROL  - ASP.NET WITH C#HTML SERVER CONTROL  - ASP.NET WITH C#
HTML SERVER CONTROL - ASP.NET WITH C#
 
Html server control - ASP. NET with c#
Html server control - ASP. NET with c#Html server control - ASP. NET with c#
Html server control - ASP. NET with c#
 
Intodcution to Html
Intodcution to HtmlIntodcution to Html
Intodcution to Html
 
Form & frame
Form & frameForm & frame
Form & frame
 
Unit 1wt
Unit 1wtUnit 1wt
Unit 1wt
 
Unit 1wt
Unit 1wtUnit 1wt
Unit 1wt
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to Bootstrap
 
Practical PHP by example Jan Leth-Kjaer
Practical PHP by example   Jan Leth-KjaerPractical PHP by example   Jan Leth-Kjaer
Practical PHP by example Jan Leth-Kjaer
 

Más de myrajendra (20)

Fundamentals
FundamentalsFundamentals
Fundamentals
 
Data type
Data typeData type
Data type
 
Hibernate example1
Hibernate example1Hibernate example1
Hibernate example1
 
Jdbc workflow
Jdbc workflowJdbc workflow
Jdbc workflow
 
2 jdbc drivers
2 jdbc drivers2 jdbc drivers
2 jdbc drivers
 
3 jdbc api
3 jdbc api3 jdbc api
3 jdbc api
 
4 jdbc step1
4 jdbc step14 jdbc step1
4 jdbc step1
 
Dao example
Dao exampleDao example
Dao example
 
Internal
InternalInternal
Internal
 
3. elements
3. elements3. elements
3. elements
 
Headings
HeadingsHeadings
Headings
 
Forms
FormsForms
Forms
 
Css
CssCss
Css
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Starting jdbc
Starting jdbcStarting jdbc
Starting jdbc
 
Properties
PropertiesProperties
Properties
 
Java.sql package
Java.sql packageJava.sql package
Java.sql package
 
Interface callable statement
Interface callable statementInterface callable statement
Interface callable statement
 

Último

Último (20)

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 

Sessionex1

  • 1.
  • 2. SiteHome.html <html> <head> <title>URL Rewriting Example</title> </head> <body> This is the Home page for the example to demonstrate how to use <BR> URL Rewriting and Hidden form fields to mantain the client state. <BR><BR> <a href="Login.html">Login</a> </body> </html>
  • 3.
  • 4. Login.html <html> <head> <title>URL Rewriting Example</title> </head> <body> <form name="loginform" action="login" method="post"> <table border="0"> <tr> <td>UserName:</td> <td><input type="text" name="uname"></td> </tr> <tr> <td>Password:</td> <td><input type="password" name="password"></td> </tr> <tr> <td colspan="2" align="center"><input type="submit"></td> </tr> </table> </form> </body> </html>
  • 5.
  • 6.
  • 7.
  • 8. • Once you click on submit button • Post method is executed, data is submitted into server in the form of request object • Later LoginServlet program gets executed because of <form action=“login”> whose url pattern servlet name is “LoginServlet” (see web.xml file)
  • 9. LoginServlet.java package com.rajendra.servlets; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.*; import javax.servlet.http.*; public class LoginServlet extends HttpServlet { public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String uname=request.getParameter("uname"); String pass=request.getParameter("password");
  • 10. LoginServlet.java response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("<HTML>"); out.println(" <HEAD><TITLE>A Servlet</TITLE></HEAD>"); out.println(" <BODY>");
  • 11. LoginServlet.java if (uname==null||uname.equals("")){ out.println("<b><i>Username Cannot be empty</i></b>"); RequestDispatcher rd=request.getRequestDispatcher("/Login.html"); rd.include(request, response); return; } if (pass==null||pass.equals("")){ out.println("<b><i>Password Cannot be empty</i></b>"); RequestDispatcher rd=request.getRequestDispatcher("/Login.html"); rd.include(request, response); return; } UserDAO ud=new UserDAO();
  • 12. LoginServlet.java if(ud.validate(uname,pass)){ out.println("<table width=98% height=95% border=1><tr>"); out.println("<td height=45 colspan=2 align=center><font size=5>My Email Site</font></td>"); out.println("</tr><tr>"); out.println("<td width=12% height=545 align=center valign=top>"); out.println("<p>&nbsp;</p><p><font size=4>"); out.println("<a href='inbox?uname="+uname+"'>InBox</a>"); out.println("</font></p>"); out.println("<p><font size=4>Bulk Mail</font></p>"); out.println("<p><font size=4>Sent Items</font></p>"); out.println("<p><font size=4>Write Mail</font></p>"); out.println("<p><font size=4><a href='Login.html'>Logout</a></font></p>"); out.println("<p>&nbsp;</p></td>"); out.println("<td width=88% align=left valign=top><p>&nbsp;</p>"); out.println("<p><font size=4>Welcome, "+uname+"</font></p></td>"); out.println("</tr><tr align=center>"); out.println("<td colspan=2><div align=center>@Copyrights 2001-08</div></td>"); out.println("</tr></table>");
  • 13. LoginServlet.java }//if else{ out.println("<b><i>Username or Password given are not valid</i></b>"); RequestDispatcher rd=request.getRequestDispatcher("/Login.html"); rd.include(request, response); return; } out.println(" </BODY>"); out.println("</HTML>"); out.flush(); out.close(); } }
  • 14. • Now servlet container calls the public service() and which intern calls the protected service() method • Protected service() calls doPost() method
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. • Now if() conditions becomes false, (server side validation for username and password). • Now UserDao object is created to call validate() method
  • 21. if(ud.validate(uname,pass)) • if(ud.validate(uname,pass)) • if(ud.validate(rajendra,raj)) method calling • Now control goes to validate () method in UserDao class
  • 22. UserDAO.java package com.rajendra.servlets; import java.sql.*; public class UserDAO { public boolean validate(String uname, String pass){ try { Connection con=DriverConnection.getConnection(); Statement st=con.createStatement(); ResultSet rs=st.executeQuery( "select count(*) from userdetails where uname='"+uname+"' and pass='"+pass+"'"); return rs.next(); }//try catch(Exception e){ e.printStackTrace(); } return false; } }
  • 23.
  • 24.
  • 25.
  • 26. • return rs.next(); • return true;//it returns true as resultset contains next element • Now control come back to the LoginServlet.java
  • 27. if(ud.validate(uname,pass)){ //if condition becomes true out.println("<table width=98% height=95% border=1><tr>"); out.println("<td height=45 colspan=2 align=center><font size=5>My Email Site</font></td>"); out.println("</tr><tr>"); out.println("<td width=12% height=545 align=center valign=top>"); out.println("<p>&nbsp;</p><p><font size=4>"); out.println("<a href='inbox?uname="+uname+"'>InBox</a>"); out.println("</font></p>"); out.println("<p><font size=4>Bulk Mail</font></p>"); out.println("<p><font size=4>Sent Items</font></p>"); out.println("<p><font size=4>Write Mail</font></p>"); out.println("<p><font size=4><a href='Login.html'>Logout</a></font></p>"); out.println("<p>&nbsp;</p></td>"); out.println("<td width=88% align=left valign=top><p>&nbsp;</p>"); out.println("<p><font size=4>Welcome, "+uname+"</font></p></td>"); out.println("</tr><tr align=center>"); out.println("<td colspan=2><div align=center>@Copyrights 2001-08</div></td>"); out.println("</tr></table>");

Notas del editor

  1. LoginServlet.java
  2. Stringuname=request.getParameter(“uname”);String pass=request.getParameter(“pass”);
  3. LoginServlet.java