SSL

2002-01-02 Thread Law Kim Soon

I'm trying to implement SSL on win98 for my project and hope to get some useful links 
on how to create a certificate from this mailing list.Any recommendation?
Thanks



TQ

2002-01-02 Thread Law Kim Soon

Special thanks to Mr Guido Medina for ur kindness and not to forget Mr Lai Kok Cheong 
and Mr Micael Padraig Og for ur reply.



Java file bug

2001-12-28 Thread Law Kim Soon

Hi all,
I can't solve the problem in Lesson14.java.Hope to get some help here.

Error message
-
cannot resolve symbol
-basically,the errors are about the 
classes(DriverManager,ResultSet,PreparedStatement,Connection...)

I hope u guys can help me solve these bugs

 
 
Lesson14.java
 -
package rayexamples;

import java.sql.*;

import java.io.Serializable;


public class Lesson14 extends Object implements Serializable

{   

 public Lesson14() {}

 private String   deptId ;

  private String   deptName ;

  private String   deptEmpId ;



 /* THE SETTER METHOD FOR deptId - This is the key column,  it identifies the dept.*/

 public void setDeptId(String deptId) { this.deptId = deptId ; }

  

 /* THE SETTER METHOD FOR deptName. This is the name of the dept (accounting, etc.) */

 public void setDeptName(String deptName) { this.deptName = deptName; }



 /* THE SETTER METHOD FOR deptEmpId. This the employee ID of the department's 
manager.*/

 public void setDeptEmpId(String deptEmpId) { this.deptEmpId = deptEmpId ; }



 

 /* = = = = = = = = =   INSERT DEPTARTMENT= = = = = = = = = */

 public String insertDept () 

 {

 

   Connection sqlca = null;

   String lesson14_output = ;

   PreparedStatement lesson14_stmt= null;

   ResultSet lesson14_data= null;

   int myDeptId  = 0;

   int myDeptEmpId   = 0;

 

  /* = = = = = = = = =   CONNECT   = = = = = = = = = */

  try 

  { 

   /* Connection to the database */

   Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);

   String lesson14_database = jdbc:odbc:lesson14_database;
String usr=E-BookMall Admin;
   String pwd=peilengdh00677833811;
   sqlca = DriverManager.getConnection(lesson14_database,usr,pwd);

  }

  catch (Exception e)

  { 

   lesson14_output = brConnection Error #1: JDBC Class creation:  + 
e.getMessage()+brbr; 

  }





  /* = = = = = = = = =   INSERT   = = = = = = = = = */ 

  

  /* Convert deptId from a string to an integer. */

  try 

  {

   myDeptId = Integer.parseInt(deptId.trim());

  } 

  catch (NumberFormatException e)

  { lesson14_output =  brConvert Error #1 Number Format Exception:  + 
e.getMessage(); }



  catch (NullPointerException e) 

  { lesson14_output =  brConvert Error #2: NullPointerException:  + 
e.getMessage(); }

  

  

  /* Convert deptEmpId from a string to an integer. */  

  try 

  {

   myDeptEmpId = Integer.parseInt(deptEmpId.trim());

  } 

  catch (NumberFormatException e)

  { lesson14_output =  brConvert Error #3 Number Format Exception:  + 
e.getMessage(); }



  catch (NullPointerException e) 

  { lesson14_output =  brConvert Error #4: NullPointerException:  + 
e.getMessage(); }

  

  

  /* Create and execute the insert statement. */   

  try 

  { lesson14_stmt = sqlca.createStatement() ; 

  }

  catch (Exception e)

  { lesson14_output =  brInsert Error #1: SQL error of:  + e.getMessage(); 

  }



  try 

  { int rowsAffected = lesson14_stmt.executeUpdate(

insert into department  +

(dept_id, dept_name, dept_head_id)  +

values ( + myDeptId + , ' + deptName + ',  + myDeptEmpId +  ));

   

   if ( rowsAffected == 1 )

   { lesson14_output = Department WAS added.brbr;}

   else

   { lesson14_output = Department WAS NOT added.brbr;}

  }

  catch (Exception e)

  { lesson14_output += brDepartment was not added. +

brbrInsert Error #2: SQL error of:  + e.getMessage(); }

 

 

  /* = = = = = = = = =   DISPLAY DEPARTMENT   = = = = = = = = = */

  try 

  { 

   /* Build   execute the sql, positioning before the first row in the result set */

   lesson14_stmt  = sqlca.createStatement();  

   lesson14_data = lesson14_stmt.executeQuery(

select  +

 dept_id,  +

 dept_head_id,  +

 dept_name  +

from department  +

where dept_id =  + myDeptId ); 



   /* Construct the heading for the table */

   lesson14_output += 

brbrtable border=1 align=center width=75% +

captionibThe Current State Of Department  + 

 this.deptId + /b/i/caption ;

 /*   captionibThe Current State Of Department /b/i/caption ; */   



   /* Construct the column headings for the table */

   lesson14_output += 

ibth align=leftDept ID/th + 

thDept Name/th + 

thDept Manager/th/b/i ;



   /* Move to the first (and only) row and  add its contents to the html output */ 

   lesson14_data.next() ;

   { lesson14_output += TRTD + 

lesson14_data.getObject(dept_id).toString() + /TDTD + 

lesson14_data.getObject(dept_name).toString()+/TDTD +

lesson14_data.getObject(dept_head_id).toString() + /TD/TR ;

   }

   lesson14_stmt.close(); 

  }

  catch (Exception e)

  {

   lesson14_output +=  brDisplay Error #1: SQL error of:  + e.getMessage() ; 

  }

  catch (Exception e)

  { 

   lesson14_output +=  brDisplay Error #2: JDBC Class creation:  + e.getMessage(); 

  }

  lesson14_output += /tablebrbr ;

  

  

  /* = = = = = = = = =   DISCONNECT   = = = = 

Taglib

2001-12-22 Thread Law Kim Soon

Hi all,
How can i create a taglib that all me to put the below code to my jsp file-for example.
%@ taglib uri=/E--BookMalltaglib prefix=E-BookMall %
As far as i've know,it needs a jar file.
Thank you!

Cheers,
andy



Any useful tutorial sites for javaBean (JSP)

2001-11-25 Thread Law Kim Soon

Hi,
Is me again.I'm trying to use javaBean in my application where now is written in 
action script.I don't want to start as a beginner as i prefer to learn from 
examples.Hope you guys can brighten up my day.Thanks all.



SSL doubts

2001-11-19 Thread Law Kim Soon

Hi all,
I'm developing a transaction-based application and my main focus is on the encription 
of the customer's credit card number.How can i achieve that objective? 
At this moment,half of this application has been completed except for the payment 
function and is running 
under tomcat 3.2.1 + apache 1.3.22 under win98.Right now,i have no idea how a SSL 
works i don't know how to configure the SSL.Hope to learn from you people.
Thank you all!

Regards,
Andy





Drivers

2001-11-15 Thread Law Kim Soon

Hi,
How can i conect tomcat 3.2.1 to a SQL Server 7.
Sorry for this newbie question,but i need so guide
Thanks all

Regards,
Andy



Doubts on drivers

2001-11-15 Thread Law Kim Soon

First of all,i would like to thank Barney Hamish, Randy Layman and Carl Boudreau for 
entertaining my mail.Appreaciate it very much.

However,i still haven't clear my doubts.What is the difference between ODBC and those 
drivers in http://industry.java.sun.com/products/jdbc/drivers
There are so many of them but they did not mention which platform they can be 
supported.
Hope to learn for all of you.
Thanks.

Regards,
Andy



Re: Please Help

2001-07-17 Thread Law Kim Soon

Ben,
I managed to solved the problem. There is a typing error in the path
section.
Anyway, tq Ben.I really appreciate your help.
- Original Message -
From: Ben Kimball [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 18, 2001 5:41 AM
Subject: Re: Please Help


 Not totally sure - I do all my Java development on Linux, much less
hassle,
 but you might try the following:

 Since it is complaining about setting it dynamically, maybe you can set it
in
 the environmental properties (which will probably require a reboot) -
right
 click on My Computer, select Properties, then select Environment (or
 something like that, I'm doing this from memory, as I'm running under
Linux
 right now) and one of the things that shows under that should be the PATH
 variable - you should be able to set that with the long (Non-DOS 8.3)
 pathnames. Try plugging the info in there, rebooting, then seeing if the
info
 stays in the CLASSPATH.

 On Monday 16 July 2001 01:54, you wrote:
  Hie Ben,
  I have make the changes but I'm facing a new error message.
 
  Unable to ser CLASSPATH dynamically.
  Note: To set the CLASSPATH dynamically on win9x systems only DOS 8.3
   names may be used in TOMCAT_HOME!
  Setting your CLASSPATH statically.
 
  Using CLASSPATH:
 
C:\jakarta-tomcat-3.2.1\classes;C:\jakarta-tomcat-3.2.1\lib\ant.jar;C:\jaka
 r
 
ta-tomcat-3.2.1\lib\jasper.jar;C:\jakarta-tomcat-3.2.1\lib\jaxp.jar;C:\jaka
 r
 
ta-tomcat-3.2.1\lib\parser;C:\jakarta-tomcat-3.2.1\lib\servlet.jar;C:\jakar
 t a-tomcat-3.2.1\lib\webserver.jar
 
  Starting Tomcat in new window
  Cannot find file C:\jdk_1.3.1\bin\java (or one of its components).
  Check to ensure the path and filename are correct and that all required
  libraries are available.
  Any idea to solve this, Ben?
 
 
 
  - Original Message -
  From: Ben Kimball [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, July 16, 2001 2:20 AM
  Subject: Re: Please Help
 
   It looks like you have spaces between:
  
   C: \ jdk1.3.1 should be C:\jdk1.3.1
   C: \ jakarta-tomcat-3.2.1 should be C:\jakarta-tomcat-3.2.1
  
   You also need to make sure that c:\jdk1.3.1\bin is in your PATH,
   otherwise java.exe/javac.exe will not be found.
  
   On Sunday 15 July 2001 10:55, you wrote:
Actually,I'm a new user to Tomcat and currently having a problem
 
  starting
 
up the Tomcat. I have installed Tomcat 3.2.1 and jdk 1.3.1 on my PC
running win98. I have set all the paths required  but I kept on
 
  receiving
 
error message saying Bad command or file name. These are the
things I
have set:
   
set JAVA_HOME=C: \ jdk1.3.1
set TOMCAT_HOME=C: \ jakarta-tomcat-3.2.1
   
Can anyone please help me to solve this problem?
TQ
  
   
   Content-Type: text/html; charset=iso-8859-1; name=Attachment: 1
   Content-Transfer-Encoding: 7BIT
   Content-Description:
   





Please Help

2001-07-15 Thread Law Kim Soon



Actually,I'm a new user to Tomcat and currently 
having a problem starting up the Tomcat. I have installed Tomcat 3.2.1 and jdk 
1.3.1 on my PC running win98. I have set all the paths required but 
I kept on receiving error message saying 
"Bad command or file name". These are the things I 
have set:

set JAVA_HOME=C: \ jdk1.3.1set TOMCAT_HOME=C: \ 
jakarta-tomcat-3.2.1

Can anyone please help me to solve this 
problem?
TQ




Re: Please Help

2001-07-15 Thread Law Kim Soon

Hie Ben,
I have make the changes but I'm facing a new error message.

Unable to ser CLASSPATH dynamically.
Note: To set the CLASSPATH dynamically on win9x systems only DOS 8.3
 names may be used in TOMCAT_HOME!
Setting your CLASSPATH statically.

Using CLASSPATH:
C:\jakarta-tomcat-3.2.1\classes;C:\jakarta-tomcat-3.2.1\lib\ant.jar;C:\jakar
ta-tomcat-3.2.1\lib\jasper.jar;C:\jakarta-tomcat-3.2.1\lib\jaxp.jar;C:\jakar
ta-tomcat-3.2.1\lib\parser;C:\jakarta-tomcat-3.2.1\lib\servlet.jar;C:\jakart
a-tomcat-3.2.1\lib\webserver.jar

Starting Tomcat in new window
Cannot find file C:\jdk_1.3.1\bin\java (or one of its components).
Check to ensure the path and filename are correct and that all required
libraries are available.
Any idea to solve this, Ben?



- Original Message -
From: Ben Kimball [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 16, 2001 2:20 AM
Subject: Re: Please Help


 It looks like you have spaces between:

 C: \ jdk1.3.1 should be C:\jdk1.3.1
 C: \ jakarta-tomcat-3.2.1 should be C:\jakarta-tomcat-3.2.1

 You also need to make sure that c:\jdk1.3.1\bin is in your PATH, otherwise
 java.exe/javac.exe will not be found.

 On Sunday 15 July 2001 10:55, you wrote:
  Actually,I'm a new user to Tomcat and currently having a problem
starting
  up the Tomcat. I have installed Tomcat 3.2.1 and jdk 1.3.1 on my PC
  running win98. I have set all the paths required  but I kept on
receiving
  error message saying Bad command or file name. These are the things I
  have set:
 
  set JAVA_HOME=C: \ jdk1.3.1
  set TOMCAT_HOME=C: \ jakarta-tomcat-3.2.1
 
  Can anyone please help me to solve this problem?
  TQ

 
 Content-Type: text/html; charset=iso-8859-1; name=Attachment: 1
 Content-Transfer-Encoding: 7BIT
 Content-Description:
 





Change of my e-mail address

2001-05-27 Thread Law Kim Soon



Hie,
I would like to inform u that I would prefer to 
receive all the mail under the address below:
[EMAIL PROTECTED]
Thank You

Regard