Srikanth Reddy

Greenhorn
+ Follow
since Jun 05, 2004
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 Srikanth Reddy

Hi all,

I passed my SCJP 1.4 with 96%. I want to say thank you to this forum. It helped me a lot. I studied the excellent K&B's book and practised mock exams especially Dan's and Marcus exams. I read most of the postings on this SCJP forum which helped me a lot.

Thanks again to one and all who help me in getting good score.
17 years ago
Hi all,

I passed my SCJP 1.4 with 96%. I want to say thank you to this forum. It helped me a lot. I studied the excellent K&B's book and practised mock exams especially Dan's and Marcus exams. I read most of the postings on this SCJP forum which helped me a lot.

Thanks again to one and all who help me in getting good score.


Cheers
Srikanth Reddy
17 years ago
Hi ,

The result will be compile-time error.

Suppose the comparison is as below:

RelationalExpression instanceof ReferenceType

According to JLS,

"If a cast of the RelationalExpression to the ReferenceType would be rejected as a compile-time error, then the instanceof relational expression likewise produces a compile-time error."

In your example, at line

boolean b3 = color2 instanceof Blue;

color2 is a reference type to Red whereas you are comparing with Blue and the casting to Blue from Red is a compile time error. So is the result.
[ October 06, 2004: Message edited by: Srikanth Reddy ]
I have a problem in configuring my web server (Tomcat 4.1). Actually I have 2 web servers. One is Apache and another is Tomcat runnning on 2 different machines. I want to configure servers like:

When a request comes to http://tomcatserver/directory1/ then the this should map it to http://apacheserver/directory1.

Is it possible ? Can any body please help me.
17 years ago
I have an applet loaded by a servlet from my main web server. This applet has to load an image from my another web server. I know that applet loaded by one web server cannot access resources from other web servers. And I cannot put signed applet signed by a certificating authority. What way can I load the image ? Thanks in advance.
17 years ago

Originally posted by Natarajan Shanka:
Hi Reddy,
If webapp1 Aand Webapp2 is in same application server then you can pass session objects through servlet-context objects, which is common place holder for all servlet in the same application server.

Shankar
SCJP, SCWCD



Hi Natarajan,

Could you please give some sample code for how to pass session object between servlet contexts ? Thanks in advance.
17 years ago

Originally posted by Natarajan Shanka:
Hi Reddy,
If webapp1 Aand Webapp2 is in same application server then you can pass session objects through servlet-context objects, which is common place holder for all servlet in the same application server.

Shankar
SCJP, SCWCD

17 years ago
I think you may be getting an Exception while loading the driver or may be getting the null connection. Try to print the exception to a log file and see what exception you are getting. Becoz by looking at your code if an exception is thrown it will go to catch block and you will not be able to execute the lines for forwarding to other page.
17 years ago
I have two web applications. webapp1 and webapp2. When a user is logged in webapp1, a session is created and some values are stored in the session. By clicking a link in webapp1 user navigates to webapp2. How to pass the session object created in webapp1 to webapp2, if webapp1 and webapp2 are on the same server and if they are on different servers ?
17 years ago
I have tried using Tomcat server. I am able to write to property file.
Only change I made is in the line:

p.store(new FileOutputStream(getServletContext().getRealPath("/WEB-INF/SequentialNumber.properties")),null);
17 years ago