Les Dsouza

Greenhorn
+ Follow
since Jan 29, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Les Dsouza

" The future ain't what it used to be "
- Yogi Berra
select sysdate-100 from dual;
or
select current_date-100 from dual;
This works in oracle.
regards.
[ October 30, 2002: Message edited by: Les Dsouza ]
Hi,
I guess you could use javascript on the client side for this.
regards.
21 years ago
JSP
Hi,
You can use the javamail api for this. You'll also need the JAF API.
You can get the javamail API and java activation framework (JAF) API from the sun site.
Check out the code below, you can adapt it to your needs:

regards.
21 years ago
JSP
Hi,
1. From account should be a valid account on the yahoo server.
2. Yahoo mail server requires authentication, so set the property "mail.smtp.auth" to true.
3. To get debugging info call setDebug(true) on session object.
Hope this helps.
21 years ago
Hi,
Junit is for unit testing of java classes.
Jmeter can be used for testing servlets - unit as well as load testing.
regards,
lester
Thanks Thomas paul,
your article was a big help.
-lester
22 years ago
Hi,
You can try the following:
File fil = new File(filename);
FileOutputStream fos=null;
if (fil.exists()){
// file is already there so append to it
fos = FileOutputStream(fil,true);
}
else{
fos=new FIleOutputStream(fil);
}

hope this helps,
Lester.
[ March 12, 2002: Message edited by: Les Dsouza ]
22 years ago
You can try
System.getProperty("user.dir")

hope this helps.
22 years ago
Try -
File f = new File("./webapps/examples/WEB-INF/classes/mytestfile.txt");
//whatever filename
FileWriter fw = new FileWriter(f);
fw.write("test");
fw.close();

Hope this is useful...
[ February 15, 2002: Message edited by: Les Dsouza ]
22 years ago
You can try using the FilenameFilter, see the code below. Hope it is helpful...
22 years ago
The problem appears to be in:
File f1 = s.getStoreName();
fos1 = new FileOutputStream(f1);
f1 actually represents a folder.
ref your code:

Hence exception will be thrown when you try to open an fileoutputstream to it.
hope this solves your problem.
22 years ago
If you are reading the user input from System.in then the problem maybe because System.in.read returns the user entered text+Carriage return + linefeed (in windows, in unix it will have text+ CR). Hence you need to discard these before using the input string for comparison.
check out the example below:

hope this helps...
22 years ago
If TextFileIn is a class defined by you make sure it can be found in one of the folders in your classpath.
Also make sure your classpath includes "." (ie the current folder).
If textFileIn is not in a package, put it in th3e same folder as your main class and then compile.
If TextFileIn is in a package then you need to import it.
You can also check out the following code:
22 years ago