Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Banashri Mandal

Greenhorn
+ Follow
since Jun 12, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
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 Banashri Mandal

Thanks all. I was having the same confusion. The replies helped me a lot.
Hi,
I am planning to write SCBCD 5 in Feb'11. I don't know much about EJB, so I picked up Head First book to understand the concepts and I expected that the book would help me to write my SCBCD 5 exam which is the latest exam.
But after visiting the site, I got to know that SCBCD mainly covers EJB 3 and EJB 3 is much diffetent from the earlier versions of the same.
I am confused now. Which version of EJB should I learn ? Would it good for my preparation if I learn the basic concepts of EJB from HF and then move on to EJB 3 from Manning book ?

I believe that if I start reading EJB 3 in Action, it would be difficult to understand as I have no basic knowledge on EJB. Let me know what I should do.
Yaa, I started tomcat server after restarting my system. But as http://localhost:8080 does not show the homepage of apache, so I dont think server started properly.
13 years ago
Hello.

I am having problem to use tomcat server for my application. I downloaded apache-tomcat-6.0.18.exe from apache site and installed in my system. I am using Vista Home Basic operating system. JDK version is 1.6.0_10.

I have configured the server properly by changing environment variables. Then I start tomcat server to deploy my web app. My web app works properly. But when I restart my system, from next time, tomcat server stops working.

Can anybody please tell me why this problem is occurring ? I can use tomcat only once, if I restart or shut down my system and then want to deploy web app, tomcat does not work. Even the homepage ( http://localhost:8080) is not shown.

Please suggest me what to do.

13 years ago

Hi all,

I appeared SCJP 1.5 last monday, and got 98%.

Thanks to this site which allowed me to share my doubts while preparing. Kathie Sierra book for SCJP preparation is the best book, which helped me most for the preparation.

Thanks to all of you.
Thanks. But what about the first scenario, then ? If I comment out both Line 1 and Line 2, does not the code write anything to the file ?
The code gives expected output.
Hello.
Please see the following code. I wrote the code by myself. But it may look like the code on Serialization in K & B book.


Please see that two lines are marked in boldface.
I have a query on this code.

1. If I comment out Line 1 and Line 2 ( in boldface ) , the code will show the expected output. We know the reason.
2. If I comment out only Line 2, the code is showing the expected output.
3. If I comment out only Line 1, EOFException is thrown at runtime. But why ?


Please let me know why Exception is thrown in the 3rd scenario. Thanks in advance.

( Jesper Young: Added code tags )
Does this group discuss only those questions which we get from some mock test papers ?

I wrote the program by myself. If any mock test contains that question, I don't know about that.

Please explain the output of the code.
Thanks. But I did not want to keep my newFile.txt in oldDir. I am just asking how file2.txt goes to outside of oldDir after the calling renameTo() method.
Thanks.
But please see the code, I have written.
When I run the code, I get file1.txt in oldDir directory and newFile.txt outside of oldDir with "Testing" written in that file.

Please explain why it happens. Does it mean that file2.txt is now outside of oldDir with the new name ?


Please provide me some more info about renameTo() method.
Thanks in advance.

import java.io.* ;

class Test {

public static void main ( String [] args ) {
try {
File oldDir = new File("oldDir") ;
oldDir.mkdir() ;

File f1 = new File ( oldDir, "file1.txt");
f1.createNewFile();
File f2 = new File(oldDir,"file2.txt") ;
f2.createNewFile();

FileWriter fw = new FileWriter(f2);
fw.write("Testing");
fw.flush();
fw.close();

File new1 = new File("newFile.txt") ;
System.out.println(f2.renameTo(new1));
}
catch ( Exception e ) { e.printStackTrace() ; }
}
}
Hello.
I have a doubt in this piece of code.

File oldDir = new File("oldDir") ;
oldDir.mkdir() ;
File f1 = new File ( oldDir, "file1.txt");
f1.createNewFile();
File f2 = new File(oldDir,"file2.txt") ;
f2.createNewFile();
f2.renameTo(new File("newFile.txt"));

Here, after running the code, inside oldDir I get two files.. file1.txt, file2.txt. Can anyone tell me why the last line is not executing ? I mean, oldDir should consists of two files.. file1.txt and newFile.txt ( as f2 is renamed to newFile.txt ) .

Please clarify my doubt.