Re: How to export data to excel sheet from JSP

2002-11-27 Thread Ron Chan
maybe, http://jakarta.apache.org/poi/ --- Murali Mohan [EMAIL PROTECTED] wrote: Please elaborate it. Josep R. Raurell wrote: You must use csv format: a text file with values separated with ; or tabs. En/na Murali Mohan ha escrit: Hi, How to export data to excel sheet from

Re: How to convert hostname to IP address ?

2002-02-06 Thread Ron Chan
hi, i believe if you ping it, the output shows the numbers. --- sufi malak [EMAIL PROTECTED] wrote: Hi, how to convert a hostname to an IP address ?? thanks _ Join the world?s largest e-mail service with MSN Hotmail.

Re: string to char

2001-09-20 Thread Ron Chan
javadocs for String: toCharArray public char[] toCharArray() Converts this string to a new character array. Returns: a newly allocated character array whose length is the length of this string and whose contents are initialized to contain the character sequence represented by this

Re: e-mail

2001-07-09 Thread Ron Chan
try, http://www.jspinsider.com/tutorials/jsp/javamail/jspjavamail_intro.jsp --- Johann Eder [EMAIL PROTECTED] wrote: HI, can anyone tell me how to send e-Mails per JSP ? Any info and idea welcome... Thanks Hans

Re: Checking for Empty Result Set

2001-06-18 Thread Ron Chan
hi, only just saw this thread so maybe not understanding the entire problem but it sound like you want to do: rs = pstmt.executeQuery(); boolean b = rs.next(); while( b ) { ... rs.getXXX( YYY ); b = rs.next(); } --- sunil_s23 [EMAIL PROTECTED] wrote: This definitely caters to the case

Re: Checking for Empty Result Set

2001-06-18 Thread Ron Chan
is empty ? Thanks, Sunil. --- Ron Chan [EMAIL PROTECTED] wrote: hi, only just saw this thread so maybe not understanding the entire problem but it sound like you want to do: rs = pstmt.executeQuery(); boolean b = rs.next(); while( b ) { ... rs.getXXX( YYY ); b = rs.next

Re: RES: Organizing Application Constants

2001-04-09 Thread Ron Chan
Hi, Maybe something like: 1 public abstract class AbstractConstant 2 { 3 private final static int APP1 = 1; 4 private final static int APP2 = 2; 5 public static class App1Constant extends AbstractConstant { 6 public App1Constant() {

Re: Organizing Application Constants

2001-04-09 Thread Ron Chan
Hi, in a .properties file 1. have an entry indicating the currentDB=someDBName 2. have as many dbURL concatenated with the supported db names eg: dbURLOracle="oracle:1521:someWhere" dbURLDB2="..." initialize your memory object using the ResourceBundle by first getting the currentDB, then

Re: Organizing Application Constants

2001-04-09 Thread Ron Chan
hi, something like: 1 import java.util.*; 2 public abstract class AbstractConstant 3 { 4 public final static int APP1 = 1; 5 public final static int APP2 = 2; 6 private final static String cdb = "currentDB"; 7 private final static

Re: RES: Organizing Application Constants

2001-04-09 Thread Ron Chan
blem than doing all these. Rodrigo. -Mensagem original- De: Ron Chan [mailto:[EMAIL PROTECTED]] Enviada em: Segunda-feira, 9 de Abril de 2001 13:25 Para: [EMAIL PROTECTED] Assunto: Re: Organizing Application Constants hi, something like: 1 import jav

Re: Organizing Application Constants

2001-04-09 Thread Ron Chan
Hi, have a look at: http://www.amazon.com/exec/obidos/ASIN/0130258784/ref=cm_mp_wl/102-0605334-4278509?colid=1GAUDJ7KO2QH2 using a 'strategy' pattern, you can generate all the classes you need and they should be invoked 'transparently'. you can restrict the classes to supply in a jar. Also,

Welcome to the JoSePh-INTEREST list, :),

2001-02-22 Thread Ron Chan
Hi JoSePh, many (not all) appreciate what you do. many (not all) appreciate your opinion, sarcasm and knowledge. many (not all) would probably appreciate you email the 'offenders' directly. thanks, ron --- Nasser Dassi [EMAIL PROTECTED] wrote: NOBODY CARES, ANYMORE. NOBODY LOVES YOU.

Re: JSP/Array/JDBC

2000-12-08 Thread Ron Chan
hi, try: http://java.sun.com/docs/books/tutorial/uiswing/events/tablemodellistener.html see teh TableSorter. ron --- Dan Lopez [EMAIL PROTECTED] wrote: Need Help! I had been retrieving data from Sybase databse. This was working fine. I was querying views created from external db

Re: resultset to jsp

2000-11-13 Thread Ron Chan
after a connection closure (i.e. the connection is not held open if you have a resultset reference, rather the reference becomes invalid if you close the connection). Could be wrong though. -Duncan -Original Message- From: Ron Chan [mailto:[EMAIL

Re: resultset to jsp

2000-11-05 Thread Ron Chan
e, rather the reference becomes invalid if you close the connection). Could be wrong though. -Duncan -Original Message- From: Ron Chan [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 04, 2000 2:02 PM To: [EMAIL PROTECTED] Subject: Re: resultset to jsp

Re: resultset to jsp

2000-11-04 Thread Ron Chan
? - Original Message - From: Ron Chan [EMAIL PROTECTED] Date: Friday, November 3, 2000 5:02 pm Subject: Re: resultset to jsp Hi, why not put the resultset into a TableModel format for transport. Whatever display, if AppleJTable, if html, can loop rows and columns into a table tag. etc

Re: resultset to jsp

2000-11-03 Thread Ron Chan
Hi, why not put the resultset into a TableModel format for transport. Whatever display, if Applet/App, can use JTable, if html, can loop rows and columns into a table tag. etc. ron --- T A Flores [EMAIL PROTECTED] wrote: It is possible, however, why would you want to use and array why not

Re: Hiding code

2000-10-26 Thread Ron Chan
Hi, might as well try obfuscating the classes also! ron --- Dave Daniels [EMAIL PROTECTED] wrote: You should be able to precompile the JSPs, then distribute just the resulting class files. - Original Message - From: Kate McNamara [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent:

Re: off-topic: Thumbnail Generator

2000-10-25 Thread Ron Chan
Hi, I presume you want to lower the resolution of the uploaded images and use the html lowsrc attribute: IMG [NAME="imageName"] SRC="Location" [LOWSRC="Location"]... In the event this is not the case, you can create a table with rows and columns and just place the original images in

Re: string in javascript

2000-10-20 Thread Ron Chan
Hi, this comes to mind but is probably not the correct way! StringTokenizer st = new StringTokenizer( s, "\n" ); String ss = ""; while( st.hasMoreTokens() ) { ss += st.nextToken() + "br"; } something like that, then show ss in the jsp. ron --- david chan [EMAIL PROTECTED] wrote: Hi, I

Re: Uploading file

2000-10-20 Thread Ron Chan
Hi, http://technet.oracle.com/doc/java.815/a64685/basic4.htm#1002507 ron --- Antonio Jimenez [EMAIL PROTECTED] wrote: the solution is LONG RAW Oracle datatype Cheong Takhoe wrote: Hi, I'm trying to achieve the method above with Oracle and it works ... but only for files less

Re: Output-Stream for logging

2000-10-13 Thread Ron Chan
Hi, maybe this will work for you: If you already have println everywhere, the simplest is to pipe it to a log.dat file. then use "tail -f log.dat" to monitor the log. ron --- Stefan Henke [EMAIL PROTECTED] wrote: Hi, I want to integrate a logfile into my webapp to write some info to

Re: Tracking user visit

2000-10-09 Thread Ron Chan
Hi, 1. have the servlet note every doGet and doPost. 2. create a database table to store the information above about which page the user has visited; also store other information like timestamp etc. 3. use a report writer to report on the table. One can get alot of information on user behaviour

Re: Need some ideas on JSP, JavaBeans and JDBC

2000-10-03 Thread Ron Chan
Hi, I use a bean that returns a DefaultTableModel that holds the data from iterating through the result set. ron --- Ryan Richards [EMAIL PROTECTED] wrote: I have written a small app that uses the Factory pattern to create object via a Factory class. I have a jsp that calls this class to

Re: To: Sufi ASK ANYTHING Malak

2000-10-02 Thread Ron Chan
Hi all, what is the point of the subject line if no one follows it. create a forum "anything java" or the like if you like all that free form approach. I refuse to help those who do not seem like they are helping themselves. I tell myself if everyone who knows and ignores these postings, no

Re: Dictionary help please!

2000-09-01 Thread Ron Chan
Hi, a dictionary is a hash table, ie. items stored are hashed and their order changes with insertion and removal of items in the collection. having said that, I have an 'ordered' hashtable. it retains the advantages of the hashtable, yet you are able to get the items like a vector. quite

Re: SV: what's wrong with this JSP file ? Urgent Please

2000-08-15 Thread Ron Chan
Hi, isn't the following what you want? int n = rs.getInt( 1 ); boolean b = rs.wasNull(); ron --- Magnus Walter [EMAIL PROTECTED] wrote: Change the SQL statement, configure the table to use default values, use some JavaScript to check the form values before submitting will all FIX the

Re: bit off topic - HELP on books

2000-08-14 Thread Ron Chan
Hi, ed roman's ejb book is available: http://www.interpasnet.com/JSS/index.htm?id=11 wrox's prof jsp is good. ron --- Abudhahir A [EMAIL PROTECTED] wrote: Thanks Patrick. - Original Message - From: Patrick Buchanan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday,

Re: Problem with Date object in jsp

2000-08-13 Thread Ron Chan
Hi, cannot say I understand your statement about "cannot go to the timestamp format", but 1. are you using java.util and java.sql Dates correctly? 2. you can always new Timestamp( d.getTime().getTiem() ) to create a Timestamp if all else fails! 3. If you are using Oracle, I believe timestamp is

Re: DB Access problem

2000-08-09 Thread Ron Chan
Hi, I ran your code with slight changes and it works. I suggest you look at the odbc configuration. ron modified code below. if you set break points inside the rs.next loop you will see the names. import java.util.*; import java.sql.*; import java.net.URL.*; public class DBLoginBean6{

Re: DB Access problem

2000-08-09 Thread Ron Chan
Hi, to get the count: String query = "SELECT count(*) FROM EMPLOYEE where FIRST_NAME='first'"; while (rs.next()) { int i = rs.getInt( 1 ); System.out.println( "i: " + i ); ... ron --- Tarik Makota [EMAIL PROTECTED] wrote: OK I found a problem,

Re: Free MSQLS Server JDBC driver

2000-08-08 Thread Ron Chan
Hi, try: http://www.freetds.org/ ron --- Oscar_Silván [EMAIL PROTECTED] wrote: Does any one know how can i get a free JDBC type 4 driver for Microsoft SQL server 7.0? Thanks to all. Oscar Silván Oró Globaliza Network, S.A. Telf.: 91 351 39 69 Fax: 91 351 37 13 E-mail: [EMAIL

Re: Refreshing Page after few minutes

2000-08-04 Thread Ron Chan
Hi, try: res.setHeader( "Refresh", "300" ); ron --- Sumit Honwad [EMAIL PROTECTED] wrote: Hello Experts, Can anyone tell me how can i refresh my page say after 4-5 minutes Regards Sumit From: "Hensley, Zachary" [EMAIL PROTECTED] Reply-To: A mailing list about Java Server

Re: How can I schedule a Job in JSP or servlet...

2000-08-03 Thread Ron Chan
Hi, http://java.sun.com/docs/books/tutorial/uiswing/misc/timer.html maybe useful. ron --- Jim Preston [EMAIL PROTECTED] wrote: No offense intended, but some of the proposed solutions to this simple query strike me as falling into the "shooting flies with a battleship" category; you're

Re: date formate fectching??dd/mm/yyyyy

2000-08-03 Thread Ron Chan
Hi, try something like this: import java.util.*; import java.text.*; public static void main( String[] args ) { String s = args[ 0 ]; SimpleDateFormat sf = new SimpleDateFormat( "-MM-dd" ); ParsePosition pos = new ParsePosition(0); Date d = sf.parse( s, pos); sf = new

Re: JSP-Bean question

2000-08-02 Thread Ron Chan
Hi, 1. did you really put an _ in the file name? 2. is the class file named the same as the file name, should be other wise it cannot compile. So it is either no _ or has an upper case 'S'. 3. you should package your class and place it in its directory in the recommended place by the vendor. if

Re: problem in JSP compilation when beans are used

2000-07-14 Thread Ron Chan
Hi, on first glance, one problem will be that a bean needs a null constructor. ron --- Syamala kotamraju [EMAIL PROTECTED] wrote: Hi, Here's the code for testBeans.jsp file HTML HEAD META NAME="GENERATOR" Content="Microsoft Developer Studio" META HTTP-EQUIV="Content-Type"

Re: how to detect a browser closing

2000-07-10 Thread Ron Chan
Hi all, see if 'stale connections' in J.Hunter's book is what you want. ron --- "Cogley, Jonathan" [EMAIL PROTECTED] wrote: Jeff, What you described sounds similar to Response.IsClientConnected() in ASP which returns whether or not the client is still connected (JSP has something

Re: Oracle Stored Procedure from JSP

2000-06-28 Thread Ron Chan
Hi, Sun has a book on Java JDBC/ODBC that is very good. take a look. ron --- Mutahar Qayum [EMAIL PROTECTED] wrote: How can i retreive resultset from stored procedures from JSP , iam using JDBC. thanks a million.

No Subject

2000-06-27 Thread Ron Chan
Hi, please say what errors you get. In any case, you have to result.next() before accessing the fields. ron --- Sanjay Gomes [EMAIL PROTECTED] wrote: Hello All, I have written a simple JSP for connecting to a database and displaying a particular field in it. Can someone tell me whats

Re: Invoking a servlet via a hyperlink

2000-06-07 Thread Ron Chan
Hi, not sure if this is standard approach: 1. make a hyperlink a../a 2. give it an onclick="clicked()" 3. define the clicked() function. 4. in the function do a: document.formName.submit() oh yes, define that form with the method=POST and the action pointing to your servlet. ron --- Ferghil

Re: JDk1.2.2 with Oracle

2000-06-02 Thread Ron Chan
Hi, there is something called the README file that comes with your Oracle, please make the effort to read it: Oracle JDBC Drivers release 8.1.6 README What Is New In This Release? The major new features added since the

Re: StackOverflowError

2000-06-02 Thread Ron Chan
Hi, also reconsider using recursion for this purpose. All recursions can be implemented in loops and not incur the stack problem. ron --- Eddie Sheffield [EMAIL PROTECTED] wrote: Well, it doesn't necessarily mean that you're in an infinite loop. As another poster pointed out though it does

Re: Creating a Shopping Cart using Model 2

2000-04-27 Thread Ron Chan
Hi, for fun, there is an example at: www.pitt.edu/~urcml thanks, ron --- Marc Krisjanous [EMAIL PROTECTED] wrote: Hi all, Kevin Duffey has provided me with some helpful advice in the way I have coded my JSP's. He mentioned the MVC pattern. Is this something to do with the Model 2

Re: ResultSet first() does not work

2000-04-17 Thread Ron Chan
Hi, good explanation in pages 589 of White's book "jdbc api tutorial and reference, 2nd edition". basically, you need to: Connection con = Driver... Statement stmt = con.createStatement( ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); stmt.setFetchSize... ResultSet rs =

Re: JSP and JDBC

2000-04-06 Thread Ron Chan
Hi, page 545, JDBC API tutorial and reference by White et al., use PreparedStatement with addBatch() and executeBatch(). ron --- Portal Team [EMAIL PROTECTED] wrote: Hi I have around 100 records worth of data which i collect from the client and i need to update the database. Eg. of

example JSP, servlet, JB, JDBC

2000-02-07 Thread Ron Chan
Hi all, www.pitt.edu/~urcml there is a simple example covering various java technologies. ron __ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com

Re: Jsp Book

2000-02-04 Thread Ron Chan
Hi all, also see Wrox's Java and XML, that has some JSP coverage. ron --- Danny Trieu [EMAIL PROTECTED] wrote: Java Server Progamming is the book to buy. Right now there isn't any book that's specific about JSP. The earliest one that I know of is coming out in April or May named