Thanks david for pointing the connection and statement problem which would be return to connection pool before getting result.
cameron, Session problem is very strange to me.If I enter 10 reports then in 2 I got this problem of values in session get lost.So user complain that his values are null sometimes.
I am giving sample code of one of my process which set values
<%@ page import="java.util.*,report.Report1"%>
<jsp:useBean id="report1" scope="session" class="report.Report1" > </jsp:useBean>
<jsp:setProperty name="report1" property="reset" value=" " />
<jsp:setProperty name="report1" property="*"/>
<% if(session.getAttribute("logon.isDone")==null){
response.sendRedirect("/report/relogin.jsp");}%>
<%
String sitename=""; %>
<% sitename=(String)session.getAttribute("logon.isDone"); %>
<% if(sitename.equalsIgnoreCase("Bombay")) {%>
<% sitename="mumbai"; %>
<% } %>
<% String entersite=""; %>
<% entersite=report1.getSite(); %>
<% if(entersite.equals(sitename)) { %>
<% if (report1.validate()) { %>
<jsp:forward page="/report/report2.jsp"/>
<% } else { %>
<jsp:forward page="/report/report1.jsp"/>
<% } %>
<% } else { %>
<jsp:forward page="/report/please.jsp"/>
<% } %>
detail of my app is
I am making an online reporting site .I am asking user to fill 3 page
report one by one .I am keeping all value in session.Here Also checking at
every servlet and jsp whether user is valid or not as guest can see the
report but can not fill the report.
A valid user can upload database and only administrator can download
database files.
There are also other simple report to be filled on the site.
These all report are to filled fortnightly and if user miss then he should be
emailed from the server .
I had made this in servlets,jsp,javabeans(with set and get methods only)
Problem I always facing that my session value get lost very easly and
user is sent back to login page . An example
I am using tomcat 3.1
In my login page my session value get lost frequently.I am using
session.setAttribute("logon.isDone", name); in servlets and In every jsp's
I am checking as
I have taken all initiative to build this site.I am the only programmer
working here so all decision is up to me.
thanks in advance
payal sharma