Total members 11895 |It is currently Mon Dec 30, 2024 6:47 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





[description]hi, i am doing a project on j2ee. trying to track session from login page.
but here is a error on "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">"in login.jsp file..showing " reached end of the file while parsing"..i have uplded the jsp files and servlet blw.. plsss help me..
thanx..

java code
login.jsp


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title>Book Store</title>
<link rel="stylesheet" type="text/css" href="style.css" />

</head>
<body>
<%@ page import="mypack.*"%>
<%@ page import="java.sql.*" session="true"%>
<div id="wrap">

<div class="header">
<div class="logo"><a href="home.jsp"><img src="images/logo.gif" alt="" title="" border="0" /></a></div>
<form name="myhome" method="post" action="Login1" >
<div id="menu">
<ul>
<li class="selected"><a href="home.jsp">home</a></li>
<li><a href="about.jsp">about us</a></li>
<li><a href="category.jsp">books</a></li>
<li></li>
<li><a href="myaccount.jsp">my accout</a></li>
<li><a href="register.jsp">register</a></li>
<li></li>
<li><a href="contact.jsp">contact</a></li>
</ul>
<%

String uid2=(String)session.getAttribute("uid1");

String pwd2=(String)session.getAttribute("pwd1");
//session.removeAttribute("pwd1");
Connection con=MyConnection1.createConn();
Statement st=con.createStatement();
ResultSet rs1=st.executeQuery("select email,password from users where email='"+uid2+"' and password='"+pwd2+"'");
if(rs1.next())
{

if(rs1.getString(1)!=null && rs1.getString(2)!=null)
{

ResultSet rs=st.executeQuery(" select username from users where email='"+uid2+"'");
while(rs.next())
{

String name=rs.getString(1);
//String mname=rs.getString(2);
//String lname=rs.getString(3);



%>
<td><%=name%></td>

</div> </form>


</div>


<div class="center_content">
<div class="search">
<table width="899" border="0">
<tr>
<td width="419"><form id="form1" name="form1" method="post" action="">
<label>
<div align="center">search by name
<input type="text" name="textfield" />
<input type="submit" name="Submit" value="Go" />
</div>
</label>
</form>
</td>
<td width="470"><form id="form2" name="form2" method="post" action="">
<label>search by author
<input type="text" name="textfield2" />
</label>
<label>
<input type="submit" name="Submit2" value="Go" />
</label>
</form>
</td>
</tr>
</table>
</div>
<div class="left_content">

<div class="title"><span class="title_icon"><img src="images/bullet1.gif" alt="" title="" /></span>Featured books</div>

<div class="feat_prod_box">

<div class="prod_img"><a href="details.html"><img src="images/prod1.gif" alt="" title="" border="0" /></a></div>

<div class="prod_det_box">
<div class="box_top"></div>
<div class="box_center">
<div class="prod_title">Product name</div>
<p class="details">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.</p>
<a href="details.html" class="more">- more details -</a>
<div class="clear"></div>
</div>

<div class="box_bottom"></div>
</div>
<div class="clear"></div>
</div>


<div class="feat_prod_box">

<div class="prod_img"><a href="details.html"><img src="images/prod2.gif" alt="" title="" border="0" /></a></div>

<div class="prod_det_box">
<div class="box_top"></div>
<div class="box_center">
<div class="prod_title">Product name</div>
<p class="details">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.</p>
<a href="details.html" class="more">- more details -</a>
<div class="clear"></div>
</div>

<div class="box_bottom"></div>
</div>
<div class="clear"></div>
</div>



<div class="title"><span class="title_icon"><img src="images/bullet2.gif" alt="" title="" /></span>New books</div>

<div class="new_products">

<div class="new_prod_box">
<a href="details.html">product name</a>
<div class="new_prod_bg">
<span class="new_icon"><img src="images/new_icon.gif" alt="" title="" /></span>
<a href="details.html"><img src="images/thumb1.gif" alt="" title="" class="thumb" border="0" /></a>
</div>
</div>

<div class="new_prod_box">
<a href="details.html">product name</a>
<div class="new_prod_bg">
<span class="new_icon"><img src="images/new_icon.gif" alt="" title="" /></span>
<a href="details.html"><img src="images/thumb2.gif" alt="" title="" class="thumb" border="0" /></a>
</div>
</div>

<div class="new_prod_box">
<a href="details.html">product name</a>
<div class="new_prod_bg">
<span class="new_icon"><img src="images/new_icon.gif" alt="" title="" /></span>
<a href="details.html"><img src="images/thumb3.gif" alt="" title="" class="thumb" border="0" /></a>
</div>
</div>

</div>


<div class="clear"></div>
</div><!--end of left content-->

<div class="right_content">

<div class="title"><span class="title_icon"><img src="images/bullet3.gif" alt="" title="" /></span>About Our Store</div>
<div class="about">
<p>
<img src="images/about.gif" alt="" title="" class="right" />
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud.
</p>

</div>

<div class="right_box">

<div class="title"><span class="title_icon"><img src="images/bullet5.gif" alt="" title="" /></span>Categories</div>

<ul class="list">
<li><a href="#">accesories</a></li>
<li><a href="#">books gifts</a></li>
<li><a href="#">specials</a></li>
<li><a href="#">hollidays gifts</a></li>
<li><a href="#">accesories</a></li>
<li><a href="#">books gifts</a></li>
<li><a href="#">specials</a></li>
<li><a href="#">hollidays gifts</a></li>
<li><a href="#">accesories</a></li>
<li><a href="#">books gifts</a></li>
<li><a href="#">specials</a></li>
</ul>

<ul class="list">
<li></li>
</ul>
</div>


</div>
<!--end of right content-->




<div class="clear"></div>
</div><!--end of center content-->


<div class="footer">
<div class="right_footer">
<a href="#">home</a>
<a href="#">about us</a>
<a href="#">services</a>
<a href="#">privacy policy</a>
<a href="#">contact us</a>

</div>


</div>


</div>

</body>
</html>





Attachments:
login.zip [4.65 KiB]
Downloaded 781 times
Author:
Newbie
User avatar Posts: 1
Have thanks: 0 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : track session from login page-J2EE project
 develop a login page- login servlet - ServletContext     -  
 php login with session     -  
 Login using session with php and mysql     -  
 Login page using sessions and mysql in php     -  
 Can i track calls from mobile phones     -  
 queue of objects keep track of the front and rear     -  
 How to track clicks on hash links from Google analytic     -  
 Image Scroller-scrollbar-LINE_UP,LINE_DOWN-PAGE-UP-PAGE-DOWN     -  
 installing j2ee in linux     -  
 J2EE Leads/Architects     -  









Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com