Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Roy Sin

+ Follow
since Mar 12, 2002
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Roy Sin

I am a bit confused.
1) Does J2EE server support JSP ? From what i read from the documentation, it does.

2) So if it does, why can't i view a JSP Page once i launch the Default Server or must i put it into a .war file thingy and deploy ?

3) If it does not support, then what is the best web server to use ?
[ August 12, 2004: Message edited by: Bear Bibeault ]
17 years ago
Need some advice from the experts out there.. I have three classes i.e. main.class, readFile.class and writeFile.class that is needed to be put in different directories.
let's assumes that readFile and writeFile DIRECTORY is the subdirectory of main directory and the readFile.class and writeFile.class is in the directories respectively...
how do i get the codes in main.class to read the codes of readFile.class and writeFile.class ?
do i use a package or is there a better way to do it ?
am i able to "call" the classes e.g.

or is there another way to put the directory path of the class ?
19 years ago
i created a program to insert items into the MS Access database. it works fine on my side but when i sent it to my user, they keep getting "No suitable driver". I am using window 2000 and they are using window NT. Could it be this is the error ? my code is below. I did not want them to create the driver so i read my jdbc-odbc connection from a text file. Below is the code

and my text file has the following lines :

pls help.....
Thanks for ur help...
20 years ago
well, basically it depends what data does ur flat file consists of...
if it is just normal strings n endline char at the end...
ie. a

u could just use bufferedreader
if it is a whole string that is seperated by deliminators... and u wish to get each character out.. then u use stringtokenizer
ie a,b,c,d,e
bufferedreader code

stringtokenizer code

do a search on these topics.. there are lots of examples about bufferedreader and stringtokenizer.. also .. read up on the API Index..
20 years ago
i wuz just wondering if there is a way to really determine the end of file.
For e.g.
i have a text file containing data
the data should end at the char "e" but if i put 2 spaces below the "e". The program will continue till the spaces are read too...
here is my sample code. i am adding data into the database

my table will then show
how to get rid of this ??? hhheeelllppp !!!
20 years ago
hahahah.. it seems that i am the only one replying myself.. but hey.. i found out the solution.. so i m here to share it....
as u know.. there is a limitation for string tokenizer.. so to get ard the prob.. i counted the total no of elements in the row.. then i count the no. of elements that are not delimiters.. then i subtracted the two...
for e.g.
i want to get the number 6 from column 6....

Hope it helps anyone with the same problem..
20 years ago
okie... does anyone out there have any ideas of how to get pass this limitation... other than putting space between the delimiters ? anyway, fyi.. the int c starts with 1 .....
20 years ago
sorri.. for the StringTokenizer,
it should be
StringTokenizer in = new StringTokenizer (line,"|")...
it is bcos i want to get the column data.. it is supposed to allow users to add or delete data between the delimiter...
20 years ago
does anyone know how to do this.. i need to break up a string with "|" as the delimiter..
the data is as follows :
i am unable to extract the numberr 6 out.. pls help.. my code is as follows :
BufferedReader br = new BufferedReader(inputFile);
line = br.readLine();
StringTokenizer in = new StringTokenizer(line,"|",true);
while (in.hasMoreTokens())
lineRead = in.nextToken();
if (c==6)
System.out.println("U got the number 6");
20 years ago