Re: session timeout setting

2002-12-18 Thread Yong How
Hi,

Add the following to your web.xml file


  ...
  ...
  ...

  

  60

  







Best Regards,

Lim Yong How
Software Engineer
Ryeson Security International
180B Bencoolen Street #10-01/02 The Bencoolen Singapore 189648
www.ryeson.com <http://www.ryeson.com>




The information contained in this e-mail message is intended only for the
use of the person or entity to whom it is addressed and may contain
information that is CONFIDENTIAL and may be LEGALLY PRIVILEGED and exempt
from disclosure under applicable laws. If you read this message and are not
the addressee you are notified that use, dissemination, distribution, or
reproduction of this message is prohibited. If you have received this
message in error, please notify us immediately and delete the original
message.

__



-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Kenny G. Dubuisson, Jr.
Sent: Wednesday, 18 December, 2002 12:11 AM
To: [EMAIL PROTECTED]
Subject: session timeout setting


I have a site written in JSP that uses session info to validate user's
sessions.  I want to change the default timeout of the session from 60 mins
but I'm not sure what is controlling this or how/where to change it.  Here
is more info to help figure this out...if anyone has any ideas I would
greatly appreciate it.

My initial JSP page has a login which, when validated, sets a cookie that
stores the session ID.  Every page thereafter, upon initial load, checks the
current session ID against this cookie and if they don't match, the user is
directed to re-login.  My users want a longer timeout but I'm not sure where
to control this (maybe this question is for the Tomcat listI just don't
know).

Thanks,
Kenny

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: static initialization

2002-12-23 Thread Yong How
Hi,

How much data you expect from your select boxes ??
If it is a small amount, I would suggest that you store it in a Vector and
save it as a application attribute.
Then you static methods can "query" the Vector instead.
You only need to update the Vector if there is any changes to the these
select boxes' data (I presume that will not happen often)

HTH


Best Regards,

Lim Yong How
Software Engineer
Ryeson Security International
180B Bencoolen Street #10-01/02 The Bencoolen Singapore 189648
www.ryeson.com <http://www.ryeson.com>




The information contained in this e-mail message is intended only for the
use of the person or entity to whom it is addressed and may contain
information that is CONFIDENTIAL and may be LEGALLY PRIVILEGED and exempt
from disclosure under applicable laws. If you read this message and are not
the addressee you are notified that use, dissemination, distribution, or
reproduction of this message is prohibited. If you have received this
message in error, please notify us immediately and delete the original
message.

__



-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Kesavanarayanan, Ramesh
(Cognizant)
Sent: Friday, 20 December, 2002 12:56 PM
To: [EMAIL PROTECTED]
Subject: static initialization


Hi all,

 I have a Helper class which has several methods. Each method willspeak
overto the DB and get the values as ArrayList. These values will be loaded
in the HTML pages as option values of the select boxes.


Here is the sample code snippet i have used . I have made the OWNER_LIST as
private static.
  private   static  ArrayList distinctOwner(String tableName)  {
Connection conn = null;
PreparedStatement pstmt = null;
DBUtilities DBUtil = null;
   if(OWNER_LIST == null) {
try
  {
 OWNER_LIST = new ArrayList();
 DBUtil = new DBUtilities();
 conn.setAutoCommit(false);;
 String sql = "select distinct owner_name from "
+ tableName + " order by owner_name";
 ResultSet rs = DBUtil.doSelect(sql);
 while (rs != null && rs.next())
 {
OWNER_LIST.add(rs.getString(1));
 }
rs.close();
  } catch (Exception e) {
   System.err.println("Problem getting distinct
owner from " + tableName + " order by owner name");
}
finally {
try { pstmt.close(); } catch (Exception e) { }
try {
   DBUtil.closeConnection();
} catch (Exception e) { }
   }
 }
  return OWNER_LIST;
}
I have made all these ArrayList  as static so that they will be populated
only once in the server. Typically I amtrying to catch the records.

Some transaction during the application may change the DB records.

 In such scenario i have to call a Refresh such that this makes all the
values of the Helper class again to null so that when next time somebody
clicks on some item Helper class has to fetch the new values from the DB.

 My question is supposing that when a user clicks on the Refresh buton and
at the same time some other user is looping thru the ArrayList in their jsp
pages, it will surely thro an error.

 How to prevent this.

I thought of putting the ArrayList initialization as synchronized but in my
Helper class i have many methods (25). That means i will be having 25
Synchronized blocks which might become too overhead for the webserver.

 Any nice ideas and suggestions to resolve this ishighly appreciated.

 Regards

 Ramesh Kesavanarayanan
 [EMAIL PROTECTED]
 +91-44- 811 3063 ext 2232 VNet- 42425

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: sql server driver for win nt?

2002-12-25 Thread Yong How
Hi,

You might want to take a look at an OpenSource (Free) JDBC driver for M$SQL
at the following URL :
http://sourceforge.net/projects/jtds/

Best Regards,

Lim Yong How
Software Engineer
Ryeson Security International
180B Bencoolen Street #10-01/02 The Bencoolen Singapore 189648
www.ryeson.com <http://www.ryeson.com>




The information contained in this e-mail message is intended only for the
use of the person or entity to whom it is addressed and may contain
information that is CONFIDENTIAL and may be LEGALLY PRIVILEGED and exempt
from disclosure under applicable laws. If you read this message and are not
the addressee you are notified that use, dissemination, distribution, or
reproduction of this message is prohibited. If you have received this
message in error, please notify us immediately and delete the original
message.

__



-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Vikramjit Singh
Sent: Tuesday, 24 December, 2002 12:35 PM
To: [EMAIL PROTECTED]
Subject: sql server driver for win nt?


Hi,,

i have been looking for sql server jdbc driver for windows nt. i have gone
to microsofts site, but the driver's which are available do not work on win
nt platform. Could somebody give a link or clue as to where i can get the
driver.

Regards,
Vikramjit Singh,
GTL Ltd.,
Ph: (022)7612929 extn. 1059

Disclaimer: This e-mail message along with any attachments is intended only
for the addressee and may contain confidential and privileged information of
GTL Limited. If the reader of this message is not the intended recipient,
you are notified that any dissemination, distribution or copy of this
communication is strictly prohibited. If you have received this message by
error, please notify us immediately, return the original mail to the sender
and delete the message from your system.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com