GNU JSP does not support taglib directive

2002-05-07 Thread vtr

Hi every one,

When I am trying to use taglib I get an error message saying that the
taglib directive is not supported by GNUJSP
and when read the documentations came to know the taglib is set optionally
if anyone is conversant with it please let me know.

regards

vtr

===
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



MAIL USING JSP

2002-05-07 Thread vtr

Hi this is the mail servlet converted into a JSP.  It works fine for me , u can try 
this



/*Mail.jsp/

htmlhead
titleMail using SMTP/title/head
%@ page language=java import=java.sql.*, java.io.*, java.util.*, 
javax.servlet.http.*%
%@ page import=javax.servlet.*, javax.mail.*, javax.mail.internet.*%
%@ page session=true buffer=12kb autoFlush=true errorPage=Error.jsp 
isErrorPage=false sThreadSafe=true%
body bgcolor=DAF0FE
%
String host=request.getParameter(host);
String from=request.getParameter(from);
String to=request.getParameter(to);
String name=request.getParameter(name);
String subject=request.getParameter(sub);
String body=request.getParameter(body);
if (host==null)
host=request.getServerName();
if (from==null)
from=[EMAIL PROTECTED];
if (next==null)
next=../ic/bot.html;
if (to==null)
to =[EMAIL PROTECTED];
if (name==null)
name =user;
if (subject==null)
subject=Club;
if (body==null)
body=Hello +name+,\n Thank your for visiting the site, keep visiting ...\n-club 
site;
body=body+\n(Please do not reply this mail, This is an automatic service);
Properties  props = new Properties();
props.put(mail.smtp.host, host);
Session mailsess = Session.getDefaultInstance(props, null);
StringTokenizer st = new StringTokenizer(to,  ,;);
int length = st.countTokens();
InternetAddress[] toAddresses = new InternetAddress[length];
for (int i = 0; st.hasMoreTokens(); i++) 
{
 toAddresses[i] = new InternetAddress(st.nextToken());
} 

Message msg = new MimeMessage(mailsess);
msg.setFrom(new InternetAddress(from));
msg.setSubject(subject);
msg.setRecipients(Message.RecipientType.TO, toAddresses);
msg.setContent(body, text/plain);

// send
Transport.send(msg);
%
Your mail has been sent successfully
/body
/html


//

But i would recoment you to use the mailer taglib available in apache site.



VTR
èº{.nÇ+‰·¦j)m¢X¬¶Ç«¾6¯j˧r‰°ŠØ[¡Ü¬Šè}òRƒSLZ+v(²ÙšŠ[h–+-±êڲéÜ¢l¶èw+´” 
ÔÄDD“
„I4¨™êޕëڞÑ@BÊ'%#ÿIêï•ëlq©Ûyú.Ö­†Ûiÿö«r¯zÈÚ½«.Êþ;)Š{^­ë-†Ù¥†ÛiÿøÚ½«.Êþšèvç-³øì§÷Úªf–m§ÿðì¥êڞÚ(®
   óþ;)þ;)}ª£²˜m¶ŸÿÃ#‚êîr‰¿}ª¿Šw^Æ;)†Ûiÿü0Â;)Š{uêÜ¢


Apache/Tomcat

2002-05-07 Thread Mark Stray

Hi,

Could someone please tell me how I may make the following change.

Apache/Tomcat installed on OpenVMS operating system.


An alias name has been setup

intraapps.company.com

this equates to node.company.com

How may I disable users from accessing through
node.company.com and only use the alias name intraapps?


regards, Mark


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.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: determining invalidated session

2002-05-07 Thread Vikramjit Singh

in javadocs u wont find many things which work like
session.setMaxInactiveInterval(time), so is the same with session.isNew()
and if it returns true that means that either the user is just logged in or
his session is logged of.

Regards,
Vikramjit Singh,
Systems Engineer,
GTL Ltd.
Ph. 7612929-1031


-Original Message-
From: Dmitry Beransky [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 10:51 PM
To: [EMAIL PROTECTED]
Subject: Re: determining invalidated session


At 10:29 PM 5/6/2002, Vikramjit Singh wrote:
you can check with session.isNew() which returns boolean.

JavaDocs don't say anything about isNew() returning 'true' right after a
call to invalidate().   Here's there senario:

1. JSP makes a call to session.invalidate() (in response to a user logging
out of the application)
2. A filter doing generic per-request post-processing housekeeping needs
check if the session is still valid, otherwise a call to putAttribute()
will result in an IllegalStateException.

A work around I've just thought of is to catch the exception and simply
fall through if it's thrown.  Is this the best I can do?

Dmitry

===
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



sql Date

2002-05-07 Thread Emmanuel Eze

Hi all,

Can somebody pls tell me how I can insert a Date type into a database table
with a Date datatype?

I have the year, month, and day as integer values.  I need to convert these
values into an sql Date object so I can now insert the Date object into the
table, right?

I have the following code:
Calendar cbirthday = null;
java.util.sql birthday = null;
.
.
.
cbirthday = Calendar.getInstance();
cbirthday.set(Integer.parseInt(year), Integer.parseInt(month),
Integer.parseInt(day));
birthday = cbirthday.getTime();

This last statement throws a cast exception!  Even when I change it to:
birthday = (java.sql.Date) cbirthday.getTime();

Pls tell me what I'm doing wrongly.

Emma

===
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 Date

2002-05-07 Thread Bhushan_Bhangale

First of all:-

java.util.sql birthday = null;   should be   java.util.Date birthday = null;

as the Calendar.getTime() method returns a util date object.

-Original Message-
From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 1:34 PM
To: [EMAIL PROTECTED]
Subject: sql Date


Hi all,

Can somebody pls tell me how I can insert a Date type into a database table
with a Date datatype?

I have the year, month, and day as integer values.  I need to convert these
values into an sql Date object so I can now insert the Date object into the
table, right?

I have the following code:
Calendar cbirthday = null;
java.util.sql birthday = null;
.
.
.
cbirthday = Calendar.getInstance();
cbirthday.set(Integer.parseInt(year), Integer.parseInt(month),
Integer.parseInt(day));
birthday = cbirthday.getTime();

This last statement throws a cast exception!  Even when I change it to:
birthday = (java.sql.Date) cbirthday.getTime();

Pls tell me what I'm doing wrongly.

Emma

===
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: sql Date

2002-05-07 Thread Emmanuel Eze

Even if I do that, how do I then convert the java.util.Date to
java.sql.Date?


-Original Message-
From: Bhushan_Bhangale [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 11:05 AM
To: [EMAIL PROTECTED]
Subject: Re: sql Date


First of all:-

java.util.sql birthday = null;   should be   java.util.Date birthday = null;

as the Calendar.getTime() method returns a util date object.

-Original Message-
From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 1:34 PM
To: [EMAIL PROTECTED]
Subject: sql Date


Hi all,

Can somebody pls tell me how I can insert a Date type into a database table
with a Date datatype?

I have the year, month, and day as integer values.  I need to convert these
values into an sql Date object so I can now insert the Date object into the
table, right?

I have the following code:
Calendar cbirthday = null;
java.util.sql birthday = null;
.
.
.
cbirthday = Calendar.getInstance();
cbirthday.set(Integer.parseInt(year), Integer.parseInt(month),
Integer.parseInt(day));
birthday = cbirthday.getTime();

This last statement throws a cast exception!  Even when I change it to:
birthday = (java.sql.Date) cbirthday.getTime();

Pls tell me what I'm doing wrongly.

Emma

===
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

===
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 Date

2002-05-07 Thread Geert Van Damme

You cannot cast a java.util.Date to a java.sql.Date since the util.Date is
in fact the ancestor class.
The fact that there are so many different date types.
java.util.Date, java.sql.Date, java.sql.Timestamp, Calendar,...

It's a real mess.
Worst of all is that it's not always obvious to convert one into the other.

big tip: Most of them provide a getTime() function which returns the
millisecond time. and this can often be used to create another type.

In your case, you get a java.util.Date and you need a java.sql.Date.

java.sql.Date birthday = new java.sql.Date( cbirthday.getTime());


Geert Van Damme



 -Original Message-
 From: A mailing list about Java Server Pages specification and reference
 [mailto:[EMAIL PROTECTED]]On Behalf Of Emmanuel Eze
 Sent: dinsdag 7 mei 2002 10:04
 To: [EMAIL PROTECTED]
 Subject: sql Date


 Hi all,

 Can somebody pls tell me how I can insert a Date type into a
 database table
 with a Date datatype?

 I have the year, month, and day as integer values.  I need to
 convert these
 values into an sql Date object so I can now insert the Date
 object into the
 table, right?

 I have the following code:
 Calendar cbirthday = null;
 java.util.sql birthday = null;
 .
 .
 .
 cbirthday = Calendar.getInstance();
 cbirthday.set(Integer.parseInt(year), Integer.parseInt(month),
 Integer.parseInt(day));
 birthday = cbirthday.getTime();

 This last statement throws a cast exception!  Even when I change it to:
 birthday = (java.sql.Date) cbirthday.getTime();

 Pls tell me what I'm doing wrongly.

 Emma

 ==
 =
 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: sql Date

2002-05-07 Thread Bhushan_Bhangale

You cannot cast a java.util.Date to a java.sql.Date since the util.Date is
the parent class of sql Date.

-Original Message-
From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 1:46 PM
To: [EMAIL PROTECTED]
Subject: Re: sql Date


Even if I do that, how do I then convert the java.util.Date to
java.sql.Date?


-Original Message-
From: Bhushan_Bhangale [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 11:05 AM
To: [EMAIL PROTECTED]
Subject: Re: sql Date


First of all:-

java.util.sql birthday = null;   should be   java.util.Date birthday = null;

as the Calendar.getTime() method returns a util date object.

-Original Message-
From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 1:34 PM
To: [EMAIL PROTECTED]
Subject: sql Date


Hi all,

Can somebody pls tell me how I can insert a Date type into a database table
with a Date datatype?

I have the year, month, and day as integer values.  I need to convert these
values into an sql Date object so I can now insert the Date object into the
table, right?

I have the following code:
Calendar cbirthday = null;
java.util.sql birthday = null;
.
.
.
cbirthday = Calendar.getInstance();
cbirthday.set(Integer.parseInt(year), Integer.parseInt(month),
Integer.parseInt(day));
birthday = cbirthday.getTime();

This last statement throws a cast exception!  Even when I change it to:
birthday = (java.sql.Date) cbirthday.getTime();

Pls tell me what I'm doing wrongly.

Emma

===
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

===
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: sql Date

2002-05-07 Thread G.Nagarajan

hi,

for inserting a date into the database, i use the following code.

 Calendar cal; // The date to be inserted
String colValue = ;
colValue =
'+(cal.get(Calendar.MONTH)+1)+/+cal.get(Calendar.DAY_OF_MONTH)+/+cal.g
et(Calendar.YEAR)
+ +cal.get(Calendar.HOUR_OF_DAY) + 
:+cal.get(Calendar.MINUTE)+';

 then..

 String sql = Insert into table(...) values ('aa', + colValue + )

 then use sql for inserting the record.


hth,
Nagarajan.

 -Original Message-
 From: A mailing list about Java Server Pages specification and reference
 [mailto:[EMAIL PROTECTED]]On Behalf Of Bhushan_Bhangale
 Sent: Tuesday, May 07, 2002 11:14 AM
 To: [EMAIL PROTECTED]
 Subject: Re: sql Date


 You cannot cast a java.util.Date to a java.sql.Date since the util.Date is
 the parent class of sql Date.

 -Original Message-
 From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 07, 2002 1:46 PM
 To: [EMAIL PROTECTED]
 Subject: Re: sql Date


 Even if I do that, how do I then convert the java.util.Date to
 java.sql.Date?


 -Original Message-
 From: Bhushan_Bhangale [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 07, 2002 11:05 AM
 To: [EMAIL PROTECTED]
 Subject: Re: sql Date


 First of all:-

 java.util.sql birthday = null;   should be   java.util.Date
 birthday = null;

 as the Calendar.getTime() method returns a util date object.

 -Original Message-
 From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 07, 2002 1:34 PM
 To: [EMAIL PROTECTED]
 Subject: sql Date


 Hi all,

 Can somebody pls tell me how I can insert a Date type into a
 database table
 with a Date datatype?

 I have the year, month, and day as integer values.  I need to
 convert these
 values into an sql Date object so I can now insert the Date
 object into the
 table, right?

 I have the following code:
 Calendar cbirthday = null;
 java.util.sql birthday = null;
 .
 .
 .
 cbirthday = Calendar.getInstance();
 cbirthday.set(Integer.parseInt(year), Integer.parseInt(month),
 Integer.parseInt(day));
 birthday = cbirthday.getTime();

 This last statement throws a cast exception!  Even when I change it to:
 birthday = (java.sql.Date) cbirthday.getTime();

 Pls tell me what I'm doing wrongly.

 Emma

 ==
 =
 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

 ==
 =
 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

===
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 Date

2002-05-07 Thread Kesav, Ramesh

just make that as explicit casting like what have you done is correct.

use preparedstatement and then use setObject method.

Regards

Ramesh Kesavanarayanan
[EMAIL PROTECTED]
Off : 8113801 ext 2333
Res : 2265360
Mob : 98412 73573


 -Original Message-
 From: Emmanuel Eze [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, May 07, 2002 1:46 PM
 To:   [EMAIL PROTECTED]
 Subject:  Re: sql Date

 Even if I do that, how do I then convert the java.util.Date to
 java.sql.Date?


 -Original Message-
 From: Bhushan_Bhangale [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 07, 2002 11:05 AM
 To: [EMAIL PROTECTED]
 Subject: Re: sql Date


 First of all:-

 java.util.sql birthday = null;   should be   java.util.Date birthday =
 null;

 as the Calendar.getTime() method returns a util date object.

 -Original Message-
 From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 07, 2002 1:34 PM
 To: [EMAIL PROTECTED]
 Subject: sql Date


 Hi all,

 Can somebody pls tell me how I can insert a Date type into a database
 table
 with a Date datatype?

 I have the year, month, and day as integer values.  I need to convert
 these
 values into an sql Date object so I can now insert the Date object into
 the
 table, right?

 I have the following code:
 Calendar cbirthday = null;
 java.util.sql birthday = null;
 .
 .
 .
 cbirthday = Calendar.getInstance();
 cbirthday.set(Integer.parseInt(year), Integer.parseInt(month),
 Integer.parseInt(day));
 birthday = cbirthday.getTime();

 This last statement throws a cast exception!  Even when I change it to:
 birthday = (java.sql.Date) cbirthday.getTime();

 Pls tell me what I'm doing wrongly.

 Emma

 ==
 =
 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

 ==
 =
 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: sql Date

2002-05-07 Thread Kesav, Ramesh

make the following correction

Calendar cbirthday = null;
java.util.sql birthday = null;
as
java.sql.Date birthday =null;
.
.
.
cbirthday = Calendar.getInstance();
cbirthday.set(Integer.parseInt(year), Integer.parseInt(month),
Integer.parseInt(day));
birthday = cbirthday.getTime();

This last statement throws a cast exception!  Even when I change it
to:
birthday = (java.sql.Date) cbirthday.getTime();



Regards

Ramesh Kesavanarayanan
[EMAIL PROTECTED]
Off : 8113801 ext 2333
Res : 2265360
Mob : 98412 73573

===
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 Date

2002-05-07 Thread Adrian Janssen

Hi,

That' pretty dangerous, what if the DB is expecting day then month (UK
standard) instead of month then day (US Standard) ? From my experience that
is a common issue with dates and DB's.

It may be poossible to use SQL functions to build the date up.

Cheers
Adrian

 -Original Message-
 From: G.Nagarajan [SMTP:[EMAIL PROTECTED]]
 Sent: 07 May 2002 11:29
 To:   [EMAIL PROTECTED]
 Subject:  Re: sql Date

 hi,

 for inserting a date into the database, i use the following code.

  Calendar cal; // The date to be inserted
 String colValue = ;
 colValue =
 '+(cal.get(Calendar.MONTH)+1)+/+cal.get(Calendar.DAY_OF_MONTH)+/+cal
 .g
 et(Calendar.YEAR)
 + +cal.get(Calendar.HOUR_OF_DAY) +
 :+cal.get(Calendar.MINUTE)+';

  then..

  String sql = Insert into table(...) values ('aa', + colValue + )

  then use sql for inserting the record.


 hth,
 Nagarajan.

  -Original Message-
  From: A mailing list about Java Server Pages specification and reference
  [mailto:[EMAIL PROTECTED]]On Behalf Of Bhushan_Bhangale
  Sent: Tuesday, May 07, 2002 11:14 AM
  To: [EMAIL PROTECTED]
  Subject: Re: sql Date
 
 
  You cannot cast a java.util.Date to a java.sql.Date since the util.Date
 is
  the parent class of sql Date.
 
  -Original Message-
  From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 1:46 PM
  To: [EMAIL PROTECTED]
  Subject: Re: sql Date
 
 
  Even if I do that, how do I then convert the java.util.Date to
  java.sql.Date?
 
 
  -Original Message-
  From: Bhushan_Bhangale [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 11:05 AM
  To: [EMAIL PROTECTED]
  Subject: Re: sql Date
 
 
  First of all:-
 
  java.util.sql birthday = null;   should be   java.util.Date
  birthday = null;
 
  as the Calendar.getTime() method returns a util date object.
 
  -Original Message-
  From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 1:34 PM
  To: [EMAIL PROTECTED]
  Subject: sql Date
 
 
  Hi all,
 
  Can somebody pls tell me how I can insert a Date type into a
  database table
  with a Date datatype?
 
  I have the year, month, and day as integer values.  I need to
  convert these
  values into an sql Date object so I can now insert the Date
  object into the
  table, right?
 
  I have the following code:
  Calendar cbirthday = null;
  java.util.sql birthday = null;
  .
  .
  .
  cbirthday = Calendar.getInstance();
  cbirthday.set(Integer.parseInt(year), Integer.parseInt(month),
  Integer.parseInt(day));
  birthday = cbirthday.getTime();
 
  This last statement throws a cast exception!  Even when I change it to:
  birthday = (java.sql.Date) cbirthday.getTime();
 
  Pls tell me what I'm doing wrongly.
 
  Emma
 
  ==
  =
  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
 
  ==
  =
  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

 ==
 =
 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:

  

Re: sql Date

2002-05-07 Thread Emmanuel Eze

how do I acheive explicit casting because that is what the compiler
complained about?
I thought the following line should be ok but it rejects it.

birthday = (java.sql.Date) cbirthday.getTime();



-Original Message-
From: Kesav, Ramesh [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 11:17 AM
To: [EMAIL PROTECTED]
Subject: Re: sql Date


just make that as explicit casting like what have you done is correct.

use preparedstatement and then use setObject method.

Regards

Ramesh Kesavanarayanan
[EMAIL PROTECTED]
Off : 8113801 ext 2333
Res : 2265360
Mob : 98412 73573


 -Original Message-
 From: Emmanuel Eze [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, May 07, 2002 1:46 PM
 To:   [EMAIL PROTECTED]
 Subject:  Re: sql Date

 Even if I do that, how do I then convert the java.util.Date to
 java.sql.Date?


 -Original Message-
 From: Bhushan_Bhangale [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 07, 2002 11:05 AM
 To: [EMAIL PROTECTED]
 Subject: Re: sql Date


 First of all:-

 java.util.sql birthday = null;   should be   java.util.Date birthday =
 null;

 as the Calendar.getTime() method returns a util date object.

 -Original Message-
 From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 07, 2002 1:34 PM
 To: [EMAIL PROTECTED]
 Subject: sql Date


 Hi all,

 Can somebody pls tell me how I can insert a Date type into a database
 table
 with a Date datatype?

 I have the year, month, and day as integer values.  I need to convert
 these
 values into an sql Date object so I can now insert the Date object into
 the
 table, right?

 I have the following code:
 Calendar cbirthday = null;
 java.util.sql birthday = null;
 .
 .
 .
 cbirthday = Calendar.getInstance();
 cbirthday.set(Integer.parseInt(year), Integer.parseInt(month),
 Integer.parseInt(day));
 birthday = cbirthday.getTime();

 This last statement throws a cast exception!  Even when I change it to:
 birthday = (java.sql.Date) cbirthday.getTime();

 Pls tell me what I'm doing wrongly.

 Emma

 ==
 =
 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

 ==
 =
 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

===
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 Date

2002-05-07 Thread Chris Knowles

I agree dates, databases and locales can be horrible,

I tend to convert dates into strings of known format then explicitly cast
them from Strings into datetimes using SQL. I then always know exactly what
I'm doing all the time.

Chris



-Original Message-
From: Adrian Janssen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 10:39 AM
To: [EMAIL PROTECTED]
Subject: Re: sql Date


Hi,

That' pretty dangerous, what if the DB is expecting day then month (UK
standard) instead of month then day (US Standard) ? From my experience that
is a common issue with dates and DB's.

It may be poossible to use SQL functions to build the date up.

Cheers
Adrian

 -Original Message-
 From: G.Nagarajan [SMTP:[EMAIL PROTECTED]]
 Sent: 07 May 2002 11:29
 To:   [EMAIL PROTECTED]
 Subject:  Re: sql Date

 hi,

 for inserting a date into the database, i use the following code.

  Calendar cal; // The date to be inserted
 String colValue = ;
 colValue =
 '+(cal.get(Calendar.MONTH)+1)+/+cal.get(Calendar.DAY_OF_MONTH)+/+cal
 .g
 et(Calendar.YEAR)
 + +cal.get(Calendar.HOUR_OF_DAY) +
 :+cal.get(Calendar.MINUTE)+';

  then..

  String sql = Insert into table(...) values ('aa', + colValue + )

  then use sql for inserting the record.


 hth,
 Nagarajan.

  -Original Message-
  From: A mailing list about Java Server Pages specification and reference
  [mailto:[EMAIL PROTECTED]]On Behalf Of Bhushan_Bhangale
  Sent: Tuesday, May 07, 2002 11:14 AM
  To: [EMAIL PROTECTED]
  Subject: Re: sql Date
 
 
  You cannot cast a java.util.Date to a java.sql.Date since the util.Date
 is
  the parent class of sql Date.
 
  -Original Message-
  From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 1:46 PM
  To: [EMAIL PROTECTED]
  Subject: Re: sql Date
 
 
  Even if I do that, how do I then convert the java.util.Date to
  java.sql.Date?
 
 
  -Original Message-
  From: Bhushan_Bhangale [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 11:05 AM
  To: [EMAIL PROTECTED]
  Subject: Re: sql Date
 
 
  First of all:-
 
  java.util.sql birthday = null;   should be   java.util.Date
  birthday = null;
 
  as the Calendar.getTime() method returns a util date object.
 
  -Original Message-
  From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 1:34 PM
  To: [EMAIL PROTECTED]
  Subject: sql Date
 
 
  Hi all,
 
  Can somebody pls tell me how I can insert a Date type into a
  database table
  with a Date datatype?
 
  I have the year, month, and day as integer values.  I need to
  convert these
  values into an sql Date object so I can now insert the Date
  object into the
  table, right?
 
  I have the following code:
  Calendar cbirthday = null;
  java.util.sql birthday = null;
  .
  .
  .
  cbirthday = Calendar.getInstance();
  cbirthday.set(Integer.parseInt(year), Integer.parseInt(month),
  Integer.parseInt(day));
  birthday = cbirthday.getTime();
 
  This last statement throws a cast exception!  Even when I change it to:
  birthday = (java.sql.Date) cbirthday.getTime();
 
  Pls tell me what I'm doing wrongly.
 
  Emma
 
  ==
  =
  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
 
  ==
  =
  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
   

Re: sql Date

2002-05-07 Thread Geert Van Damme

That's baaad!

You should use a PreparedStatement.

Geert Van Damme

 -Original Message-
 From: A mailing list about Java Server Pages specification and reference
 [mailto:[EMAIL PROTECTED]]On Behalf Of G.Nagarajan
 Sent: dinsdag 7 mei 2002 11:29
 To: [EMAIL PROTECTED]
 Subject: Re: sql Date


 hi,

 for inserting a date into the database, i use the following code.

  Calendar cal; // The date to be inserted
 String colValue = ;
 colValue =
 '+(cal.get(Calendar.MONTH)+1)+/+cal.get(Calendar.DAY_OF_MONTH)
 +/+cal.g
 et(Calendar.YEAR)
 +
 +cal.get(Calendar.HOUR_OF_DAY) + :+cal.get(Calendar.MINUTE)+';

  then..

  String sql = Insert into table(...) values ('aa', + colValue + )

  then use sql for inserting the record.


 hth,
 Nagarajan.

  -Original Message-
  From: A mailing list about Java Server Pages specification and reference
  [mailto:[EMAIL PROTECTED]]On Behalf Of Bhushan_Bhangale
  Sent: Tuesday, May 07, 2002 11:14 AM
  To: [EMAIL PROTECTED]
  Subject: Re: sql Date
 
 
  You cannot cast a java.util.Date to a java.sql.Date since the
 util.Date is
  the parent class of sql Date.
 
  -Original Message-
  From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 1:46 PM
  To: [EMAIL PROTECTED]
  Subject: Re: sql Date
 
 
  Even if I do that, how do I then convert the java.util.Date to
  java.sql.Date?
 
 
  -Original Message-
  From: Bhushan_Bhangale [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 11:05 AM
  To: [EMAIL PROTECTED]
  Subject: Re: sql Date
 
 
  First of all:-
 
  java.util.sql birthday = null;   should be   java.util.Date
  birthday = null;
 
  as the Calendar.getTime() method returns a util date object.
 
  -Original Message-
  From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 1:34 PM
  To: [EMAIL PROTECTED]
  Subject: sql Date
 
 
  Hi all,
 
  Can somebody pls tell me how I can insert a Date type into a
  database table
  with a Date datatype?
 
  I have the year, month, and day as integer values.  I need to
  convert these
  values into an sql Date object so I can now insert the Date
  object into the
  table, right?
 
  I have the following code:
  Calendar cbirthday = null;
  java.util.sql birthday = null;
  .
  .
  .
  cbirthday = Calendar.getInstance();
  cbirthday.set(Integer.parseInt(year), Integer.parseInt(month),
  Integer.parseInt(day));
  birthday = cbirthday.getTime();
 
  This last statement throws a cast exception!  Even when I change it to:
  birthday = (java.sql.Date) cbirthday.getTime();
 
  Pls tell me what I'm doing wrongly.
 
  Emma
 
  ==
  =
  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
 
  ==
  =
  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

 ==
 =
 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
  

Setting the useBean class value from a sesssion variable?

2002-05-07 Thread Brian Moynihan

Hi there,

Can the useBean class value be set using a variable?

Our application requires that an initial servlet sets the JavaBean to be
used by the JSP files as a session variable. The JSP files then get the
value of this session variable and then call the bean using the jsp:useBean
class=VARIABLE_NAME ... /

I have searched the archives and found very little to help. Does anyone know
1). if this can be done and 2). how this can be done?

Thanks for your help 


**
Privileged, confidential and/or copyright information may be contained
in this e-mail. This e-mail is for the use only of the intended
addressee. If you are not the intended addressee, or the person
responsible for delivering it to the intended addressee, you may not
copy, forward, disclose or otherwise use it or any part of it in any
way whatsoever. To do so is prohibited and may be unlawful.

If you receive this e-mail by mistake please advise the sender
immediately by using the reply facility in your e-mail software.

Orygen (Ireland) Limited may monitor the content of e-mails sent and
received via its network for the purposes of ensuring compliance with
its policies and procedures.

This message is subject to and does not create or vary any contractual
relationship between Orygen (Ireland) Limited and you.
**

===
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 Date

2002-05-07 Thread Adrian Janssen

cbirthday.getTime() returns a long - which cannot be cast to any type of
Date. Change your code to:

birthday = new java.sql.Date ( cbirthday.getTime() );


 -Original Message-
 From: Emmanuel Eze [SMTP:[EMAIL PROTECTED]]
 Sent: 07 May 2002 10:50
 To:   [EMAIL PROTECTED]
 Subject:  Re: sql Date

 how do I acheive explicit casting because that is what the compiler
 complained about?
 I thought the following line should be ok but it rejects it.

 birthday = (java.sql.Date) cbirthday.getTime();



 -Original Message-
 From: Kesav, Ramesh [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 07, 2002 11:17 AM
 To: [EMAIL PROTECTED]
 Subject: Re: sql Date


 just make that as explicit casting like what have you done is correct.

 use preparedstatement and then use setObject method.

 Regards

 Ramesh Kesavanarayanan
 [EMAIL PROTECTED]
 Off : 8113801 ext 2333
 Res : 2265360
 Mob : 98412 73573


  -Original Message-
  From: Emmanuel Eze [SMTP:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 1:46 PM
  To:   [EMAIL PROTECTED]
  Subject:  Re: sql Date
 
  Even if I do that, how do I then convert the java.util.Date to
  java.sql.Date?
 
 
  -Original Message-
  From: Bhushan_Bhangale [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 11:05 AM
  To: [EMAIL PROTECTED]
  Subject: Re: sql Date
 
 
  First of all:-
 
  java.util.sql birthday = null;   should be   java.util.Date birthday =
  null;
 
  as the Calendar.getTime() method returns a util date object.
 
  -Original Message-
  From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 1:34 PM
  To: [EMAIL PROTECTED]
  Subject: sql Date
 
 
  Hi all,
 
  Can somebody pls tell me how I can insert a Date type into a database
  table
  with a Date datatype?
 
  I have the year, month, and day as integer values.  I need to convert
  these
  values into an sql Date object so I can now insert the Date object into
  the
  table, right?
 
  I have the following code:
  Calendar cbirthday = null;
  java.util.sql birthday = null;
  .
  .
  .
  cbirthday = Calendar.getInstance();
  cbirthday.set(Integer.parseInt(year), Integer.parseInt(month),
  Integer.parseInt(day));
  birthday = cbirthday.getTime();
 
  This last statement throws a cast exception!  Even when I change it to:
  birthday = (java.sql.Date) cbirthday.getTime();
 
  Pls tell me what I'm doing wrongly.
 
  Emma
 
 
 ==
  =
  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
 
 
 ==
  =
  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

 ==
 =
 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

--
**
The Truworths e-mail 

Re: sql Date

2002-05-07 Thread Bhushan_Bhangale

It returns java.util.Date and not long.

By the Emmanuel Eze have you found the solution for your problem yet or not?

-Original Message-
From: Adrian Janssen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 3:25 PM
To: [EMAIL PROTECTED]
Subject: Re: sql Date


cbirthday.getTime() returns a long - which cannot be cast to any type of
Date. Change your code to:

birthday = new java.sql.Date ( cbirthday.getTime() );


 -Original Message-
 From: Emmanuel Eze [SMTP:[EMAIL PROTECTED]]
 Sent: 07 May 2002 10:50
 To:   [EMAIL PROTECTED]
 Subject:  Re: sql Date

 how do I acheive explicit casting because that is what the compiler
 complained about?
 I thought the following line should be ok but it rejects it.

 birthday = (java.sql.Date) cbirthday.getTime();



 -Original Message-
 From: Kesav, Ramesh [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 07, 2002 11:17 AM
 To: [EMAIL PROTECTED]
 Subject: Re: sql Date


 just make that as explicit casting like what have you done is correct.

 use preparedstatement and then use setObject method.

 Regards

 Ramesh Kesavanarayanan
 [EMAIL PROTECTED]
 Off : 8113801 ext 2333
 Res : 2265360
 Mob : 98412 73573


  -Original Message-
  From: Emmanuel Eze [SMTP:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 1:46 PM
  To:   [EMAIL PROTECTED]
  Subject:  Re: sql Date
 
  Even if I do that, how do I then convert the java.util.Date to
  java.sql.Date?
 
 
  -Original Message-
  From: Bhushan_Bhangale [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 11:05 AM
  To: [EMAIL PROTECTED]
  Subject: Re: sql Date
 
 
  First of all:-
 
  java.util.sql birthday = null;   should be   java.util.Date birthday =
  null;
 
  as the Calendar.getTime() method returns a util date object.
 
  -Original Message-
  From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 1:34 PM
  To: [EMAIL PROTECTED]
  Subject: sql Date
 
 
  Hi all,
 
  Can somebody pls tell me how I can insert a Date type into a database
  table
  with a Date datatype?
 
  I have the year, month, and day as integer values.  I need to convert
  these
  values into an sql Date object so I can now insert the Date object into
  the
  table, right?
 
  I have the following code:
  Calendar cbirthday = null;
  java.util.sql birthday = null;
  .
  .
  .
  cbirthday = Calendar.getInstance();
  cbirthday.set(Integer.parseInt(year), Integer.parseInt(month),
  Integer.parseInt(day));
  birthday = cbirthday.getTime();
 
  This last statement throws a cast exception!  Even when I change it to:
  birthday = (java.sql.Date) cbirthday.getTime();
 
  Pls tell me what I'm doing wrongly.
 
  Emma
 
 
 ==
  =
  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
 
 
 ==
  =
  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

 ==
 =
 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:

  

Re: sql Date

2002-05-07 Thread Emmanuel Eze

Yes I have.

-Original Message-
From: Bhushan_Bhangale [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 12:12 PM
To: [EMAIL PROTECTED]
Subject: Re: sql Date


It returns java.util.Date and not long.

By the Emmanuel Eze have you found the solution for your problem yet or not?

-Original Message-
From: Adrian Janssen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 3:25 PM
To: [EMAIL PROTECTED]
Subject: Re: sql Date


cbirthday.getTime() returns a long - which cannot be cast to any type of
Date. Change your code to:

birthday = new java.sql.Date ( cbirthday.getTime() );


 -Original Message-
 From: Emmanuel Eze [SMTP:[EMAIL PROTECTED]]
 Sent: 07 May 2002 10:50
 To:   [EMAIL PROTECTED]
 Subject:  Re: sql Date

 how do I acheive explicit casting because that is what the compiler
 complained about?
 I thought the following line should be ok but it rejects it.

 birthday = (java.sql.Date) cbirthday.getTime();



 -Original Message-
 From: Kesav, Ramesh [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 07, 2002 11:17 AM
 To: [EMAIL PROTECTED]
 Subject: Re: sql Date


 just make that as explicit casting like what have you done is correct.

 use preparedstatement and then use setObject method.

 Regards

 Ramesh Kesavanarayanan
 [EMAIL PROTECTED]
 Off : 8113801 ext 2333
 Res : 2265360
 Mob : 98412 73573


  -Original Message-
  From: Emmanuel Eze [SMTP:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 1:46 PM
  To:   [EMAIL PROTECTED]
  Subject:  Re: sql Date
 
  Even if I do that, how do I then convert the java.util.Date to
  java.sql.Date?
 
 
  -Original Message-
  From: Bhushan_Bhangale [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 11:05 AM
  To: [EMAIL PROTECTED]
  Subject: Re: sql Date
 
 
  First of all:-
 
  java.util.sql birthday = null;   should be   java.util.Date birthday =
  null;
 
  as the Calendar.getTime() method returns a util date object.
 
  -Original Message-
  From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 1:34 PM
  To: [EMAIL PROTECTED]
  Subject: sql Date
 
 
  Hi all,
 
  Can somebody pls tell me how I can insert a Date type into a database
  table
  with a Date datatype?
 
  I have the year, month, and day as integer values.  I need to convert
  these
  values into an sql Date object so I can now insert the Date object into
  the
  table, right?
 
  I have the following code:
  Calendar cbirthday = null;
  java.util.sql birthday = null;
  .
  .
  .
  cbirthday = Calendar.getInstance();
  cbirthday.set(Integer.parseInt(year), Integer.parseInt(month),
  Integer.parseInt(day));
  birthday = cbirthday.getTime();
 
  This last statement throws a cast exception!  Even when I change it to:
  birthday = (java.sql.Date) cbirthday.getTime();
 
  Pls tell me what I'm doing wrongly.
 
  Emma
 
 
 ==
  =
  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
 
 
 ==
  =
  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

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: 

Re: sql Date

2002-05-07 Thread Emmanuel Eze

NO!.  cbirthday.getTime() returns a java.util.Date.  Remember that
cbirthday is a Calendar object.


-Original Message-
From: Adrian Janssen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 11:55 AM
To: [EMAIL PROTECTED]
Subject: Re: sql Date


cbirthday.getTime() returns a long - which cannot be cast to any type of
Date. Change your code to:

birthday = new java.sql.Date ( cbirthday.getTime() );


 -Original Message-
 From: Emmanuel Eze [SMTP:[EMAIL PROTECTED]]
 Sent: 07 May 2002 10:50
 To:   [EMAIL PROTECTED]
 Subject:  Re: sql Date

 how do I acheive explicit casting because that is what the compiler
 complained about?
 I thought the following line should be ok but it rejects it.

 birthday = (java.sql.Date) cbirthday.getTime();



 -Original Message-
 From: Kesav, Ramesh [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 07, 2002 11:17 AM
 To: [EMAIL PROTECTED]
 Subject: Re: sql Date


 just make that as explicit casting like what have you done is correct.

 use preparedstatement and then use setObject method.

 Regards

 Ramesh Kesavanarayanan
 [EMAIL PROTECTED]
 Off : 8113801 ext 2333
 Res : 2265360
 Mob : 98412 73573


  -Original Message-
  From: Emmanuel Eze [SMTP:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 1:46 PM
  To:   [EMAIL PROTECTED]
  Subject:  Re: sql Date
 
  Even if I do that, how do I then convert the java.util.Date to
  java.sql.Date?
 
 
  -Original Message-
  From: Bhushan_Bhangale [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 11:05 AM
  To: [EMAIL PROTECTED]
  Subject: Re: sql Date
 
 
  First of all:-
 
  java.util.sql birthday = null;   should be   java.util.Date birthday =
  null;
 
  as the Calendar.getTime() method returns a util date object.
 
  -Original Message-
  From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 1:34 PM
  To: [EMAIL PROTECTED]
  Subject: sql Date
 
 
  Hi all,
 
  Can somebody pls tell me how I can insert a Date type into a database
  table
  with a Date datatype?
 
  I have the year, month, and day as integer values.  I need to convert
  these
  values into an sql Date object so I can now insert the Date object into
  the
  table, right?
 
  I have the following code:
  Calendar cbirthday = null;
  java.util.sql birthday = null;
  .
  .
  .
  cbirthday = Calendar.getInstance();
  cbirthday.set(Integer.parseInt(year), Integer.parseInt(month),
  Integer.parseInt(day));
  birthday = cbirthday.getTime();
 
  This last statement throws a cast exception!  Even when I change it to:
  birthday = (java.sql.Date) cbirthday.getTime();
 
  Pls tell me what I'm doing wrongly.
 
  Emma
 
 
 ==
  =
  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
 
 
 ==
  =
  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

 ==
 =
 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:

  

jar files in web-inf/lib dir

2002-05-07 Thread Ashwani Kalra

Hi,

I have two different jar files say a.jar and b.jar  in the WEB-INF/lib dir.
There is one common(also same package) file which is present in both the
jars. I am accessing this class from say servlet. Then which of the jar file
will be used for this class. Basically I want to know the sequence in which
these jar file will be placed ?

TIA
Ashwani

===
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 Date

2002-05-07 Thread Adrian Janssen

oops! Was reading javadocs for java.util.Date.getTime() instead of
Calender.getTime().

 -Original Message-
 From: Bhushan_Bhangale [SMTP:[EMAIL PROTECTED]]
 Sent: 07 May 2002 12:12
 To:   [EMAIL PROTECTED]
 Subject:  Re: sql Date

 It returns java.util.Date and not long.

 By the Emmanuel Eze have you found the solution for your problem yet or
 not?

 -Original Message-
 From: Adrian Janssen [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 07, 2002 3:25 PM
 To: [EMAIL PROTECTED]
 Subject: Re: sql Date


 cbirthday.getTime() returns a long - which cannot be cast to any type of
 Date. Change your code to:

 birthday = new java.sql.Date ( cbirthday.getTime() );


  -Original Message-
  From: Emmanuel Eze [SMTP:[EMAIL PROTECTED]]
  Sent: 07 May 2002 10:50
  To:   [EMAIL PROTECTED]
  Subject:  Re: sql Date
 
  how do I acheive explicit casting because that is what the compiler
  complained about?
  I thought the following line should be ok but it rejects it.
 
  birthday = (java.sql.Date) cbirthday.getTime();
 
 
 
  -Original Message-
  From: Kesav, Ramesh [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 07, 2002 11:17 AM
  To: [EMAIL PROTECTED]
  Subject: Re: sql Date
 
 
  just make that as explicit casting like what have you done is correct.
 
  use preparedstatement and then use setObject method.
 
  Regards
 
  Ramesh Kesavanarayanan
  [EMAIL PROTECTED]
  Off : 8113801 ext 2333
  Res : 2265360
  Mob : 98412 73573
 
 
   -Original Message-
   From: Emmanuel Eze [SMTP:[EMAIL PROTECTED]]
   Sent: Tuesday, May 07, 2002 1:46 PM
   To:   [EMAIL PROTECTED]
   Subject:  Re: sql Date
  
   Even if I do that, how do I then convert the java.util.Date to
   java.sql.Date?
  
  
   -Original Message-
   From: Bhushan_Bhangale [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, May 07, 2002 11:05 AM
   To: [EMAIL PROTECTED]
   Subject: Re: sql Date
  
  
   First of all:-
  
   java.util.sql birthday = null;   should be   java.util.Date birthday =
   null;
  
   as the Calendar.getTime() method returns a util date object.
  
   -Original Message-
   From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, May 07, 2002 1:34 PM
   To: [EMAIL PROTECTED]
   Subject: sql Date
  
  
   Hi all,
  
   Can somebody pls tell me how I can insert a Date type into a database
   table
   with a Date datatype?
  
   I have the year, month, and day as integer values.  I need to convert
   these
   values into an sql Date object so I can now insert the Date object
 into
   the
   table, right?
  
   I have the following code:
   Calendar cbirthday = null;
   java.util.sql birthday = null;
   .
   .
   .
   cbirthday = Calendar.getInstance();
   cbirthday.set(Integer.parseInt(year), Integer.parseInt(month),
   Integer.parseInt(day));
   birthday = cbirthday.getTime();
  
   This last statement throws a cast exception!  Even when I change it
 to:
   birthday = (java.sql.Date) cbirthday.getTime();
  
   Pls tell me what I'm doing wrongly.
  
   Emma
  
  
 
 ==
   =
   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
  
  
 
 ==
   =
   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
   

how to know what is there in jar file?

2002-05-07 Thread [Vaishali S. Pandya]

hi  all

somebody sent me a jar file
i don't know what is there in that jar file
how to know?

Vaishali

===
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: how to know what is there in jar file?

2002-05-07 Thread Francisco Manuel Martínez Suárez

You can view it using WinZip as it were a zip file. Probably you'll find
classes.

Regards


 -Mensaje original-
 De:   [Vaishali S. Pandya] [SMTP:[EMAIL PROTECTED]]
 Enviado el:   martes 7 de mayo de 2002 12:24
 Para: [EMAIL PROTECTED]
 Asunto:   how to know what is there in jar file?

 hi  all

 somebody sent me a jar file
 i don't know what is there in that jar file
 how to know?

 Vaishali

 ==
 =
 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: how to know what is there in jar file?

2002-05-07 Thread [Vaishali S. Pandya]

thank you
well i did it unzip and i got a list of classes and java files with size of
0 bite (no content)
as i think, using winzip u can know which classes are there in that
particuler jar file
but u can't know what the classes or java files have.

Regards
Vaishali




You can view it using WinZip as it were a zip file. Probably you'll find
classes.

Regards


 -Mensaje original-
 De:   [Vaishali S. Pandya] [SMTP:[EMAIL PROTECTED]]
 Enviado el:   martes 7 de mayo de 2002 12:24
 Para: [EMAIL PROTECTED]
 Asunto:   how to know what is there in jar file?

 hi  all

 somebody sent me a jar file
 i don't know what is there in that jar file
 how to know?

 Vaishali


==
 =
 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

===
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: how to know what is there in jar file?

2002-05-07 Thread Francisco Manuel Martínez Suárez

No, I think you're wrong. I can see the classes and I can extract them too.
They have their correct size.

See it again

Fran


 -Mensaje original-
 De:   [Vaishali S. Pandya] [SMTP:[EMAIL PROTECTED]]
 Enviado el:   martes 7 de mayo de 2002 13:07
 Para: [EMAIL PROTECTED]
 Asunto:   Re: how to know what is there in jar file?

 thank you
 well i did it unzip and i got a list of classes and java files with size
 of
 0 bite (no content)
 as i think, using winzip u can know which classes are there in that
 particuler jar file
 but u can't know what the classes or java files have.

 Regards
 Vaishali




 You can view it using WinZip as it were a zip file. Probably you'll find
 classes.

 Regards


  -Mensaje original-
  De:   [Vaishali S. Pandya] [SMTP:[EMAIL PROTECTED]]
  Enviado el:   martes 7 de mayo de 2002 12:24
  Para: [EMAIL PROTECTED]
  Asunto:   how to know what is there in jar file?
 
  hi  all
 
  somebody sent me a jar file
  i don't know what is there in that jar file
  how to know?
 
  Vaishali
 
 
 ==
  =
  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

 ==
 =
 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



PreparedStatement Error

2002-05-07 Thread Emmanuel Eze

I get the following error message when i call the setDate() method of the
PreparedStatement:
[Microsoft][ODBC SQL Server Driver]Optional feature not implemented

I am connecting to an MS SQL Server 2000 using JDBC-ODBC brige.

Does anyone know a fix?

Emma

===
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: PreparedStatement Error

2002-05-07 Thread Greg Dunn

JDBC-ODBC bridge doesn't support setDate.  Lame.

You can either generate a SQL string instead of using a PreparedSatement.
Pass the 'quoted' java.sql.Date.

ex: UPDATE theTable SET theDate = ' + javaSqlDateObject + ';

Or you could get a JDBC driver specifically for SQL Server.

Greg



-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Emmanuel Eze
Sent: Tuesday, May 07, 2002 7:25 AM
To: [EMAIL PROTECTED]
Subject: PreparedStatement Error


I get the following error message when i call the setDate() method of the
PreparedStatement:
[Microsoft][ODBC SQL Server Driver]Optional feature not implemented

I am connecting to an MS SQL Server 2000 using JDBC-ODBC brige.

Does anyone know a fix?

Emma

===
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: Files upload without form

2002-05-07 Thread Alireza Nahavandi

Thank you everybody for replying to my request. I am researching about this
and once I get a good result, I'll post it on this forum for
public use

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Smita Kotnis
Sent: Monday, May 06, 2002 10:13 AM
To: [EMAIL PROTECTED]
Subject: Re: Files upload without form


Hi,
You can achive this using Java Applets. Can write the code On Select
event. I am aware of a commercially avilable applet for this. We had used
for our earlier project. You can upload multiple files, upload a directory
or even can download multiple files to your hard drive. But, I am not aware
of any such applet avialable freely.

Smita..

Gading [EMAIL PROTECTED]:

 At 06:37 PM 5/4/2002 -0400, you wrote:
 Hi All,
 Is there any way to upload a bunch of files at one shot. This is not
 like
 uploading a single file which we use multipart/form-data
 for that. That's a group of files sitting on a NT server and should be
 uploaded to a Sun server without any form submission

 Using ftp??


 Thank you,
 Alireza.


===
 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


-
Sify Mail - now with Anti-virus protection powered by Trend Micro, USA.
Know more at http://mail.sify.com

Take the shortest route to success!
Click here to know how http://education.sify.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

===
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



Tomcat to Websphere?

2002-05-07 Thread Zachary Roberts

Hello-

I have been developing JSP/Database applications using Notepad and Tomcat and this has 
been working out great.  But, if I want to move an application to a Websphere 
environment, is it very difficult?  Is it just a matter of moving my database, .htm, 
.jsp and .class files to a certain location in Websphere or is it far more complicated 
than this?

Thanks-
Zac 

==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: Tomcat to Websphere?

2002-05-07 Thread Andrew E. Young

Hey!

The tutorials and descriptions are very comprehensive as is the online
support.

Moreove, I would suggest that you get yourself and an IDE.  I would recommend
Forte CE v3.x for Java from Sun:

http://wwws.sun.com/software/Developer-products/

There are some great UML add-ons available e.g. Poseidon

Regards,

Andrew

In a message dated 07/05/2002 16:14:05 GMT Daylight Time,
[EMAIL PROTECTED] writes:


 Hello-

 I have been developing JSP/Database applications using Notepad and Tomcat
 and this has been working out great.  But, if I want to move an application
 to a Websphere environment, is it very difficult?  Is it just a matter of
 moving my database, .htm, .jsp and .class files to a certain location in
 Websphere or is it far more complicated than this?

 Thanks-
 Zac

===
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