Win a copy of Head First Android this week in the Android forum!

Vicky Nag

Ranch Hand
+ Follow
since Jul 02, 2003
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 Vicky Nag

Hi,

We are using Sun One Application Server
We are displaying .swf (Flash) through a JSP file.
The flash work Fine on HTTPS but does not work on HTTP.

Looking at the source (View source option in IE) we found that on HTTP the <object> tag does not have any classid and code base. It seems to be stripped off when using HTTP. We are providing it in the JSP in the Object tag.

Following is the code in JSP to display the flash. Please provide help why it does not work on HTTP but works on HTTPS.

<p>
<object classid="clsid 27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="718" height="287" id="final">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="/static/i/media/flash/final.swf?xmlFile=/static/i/media/flash/homepage_uk_en.xml" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="/static/i/media/flash/final.swf?xmlFile=/static/i/media/flash/homepage_uk_en.xml" quality="high" bgcolor="#ffffff" width="718" height="287" name="final" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</p>
Thanx in Advance

Regards
Vicky
SCJP 1.4
[ August 23, 2004: Message edited by: Vicky N ]
17 years ago
JSP
I would like to load and unload a servlet programitacally..
The idea is to have a servlet which will be alive and load/unload another servlet whenever required.
Help Please
Regards
Vicky
SCJP 1.4
17 years ago
Thanx for your reply
I would like to go for the "new" exam. When would that be avaliable..and What are the exam objectives, and what are the differences between the old and new exam.
Regards
Vicky
I have just completed SCJP and would like to start for SCWCD.
Could you give me some tips on how do i go about.
Till what date is the current exam valid and what books are avaliable to study for the exams.. Any websites etc...
Regards
Vicky
Thanx to K&B for writing such a wonderfull book.
Also thanx to javaranch.com/javacertificate.com/javaprepare.com/javacaps.com
Also thanx to Marcus Green and Dan.
I would recommened only K&B book but taking Dan and Marcus green's exam is worth while. Dan's exam are really harder than the actual exam but helps to improve java knowledge.
Also thanx to all the members of javaranch.com
Regards
Vicky
SCJP 1.4
18 years ago
I think the easiest way toi remember is that
e.g int []A,[]A1; // Gives compiler error
b'cos, the "[]" can be only after the primitive type "int" or after the variable A or A1
so
int []A , []A1 is invalid
int []A, A1[] is valid.
Regards
V
Thanx Anupreet..
Got it now
Regards
Vicky
Yes I am aware of that.. but the above code compiles without
"public int m() throws Exception {}" with a warning.
if i remove the return from the finally and place it at the end of the function, then it gives an error that it should be declared in the throws class.
I am not getting what's hapenning
Regards
Vicky

I was trying some codes with exceptions and finally
The above code compiles but issues a warning : finally clause cannot complete normally. Also note that the function does not declare that it throws exception (from catch clause).
Can anybody please explain what's hapenning in the above code.
Regards
Vicky
[ November 19, 2003: Message edited by: Vicky Nagarkar ]
I think the program below would solve the ways inner classes can be instaiantiated. Correct me if I am wrong.

Regards
Vicky
NonStaticInner in3 = new Outer().new NonStaticInner(); // Line3 Outer.NonStaticInner in4 = new Outer().new NonStaticInner(); //Line 4
Thanx for the explanations.
What about
NonStaticInner in3
and
Outer.NonStaticInner in4
How are they different or are they both the same .. Confused.
Regards
Vicky
class Outer
{
private static class StaticInner
{
}
private class NonStaticInner
{
}
public static void main(String args[])
{
StaticInner in1 = Outer.new StaticInner(); // Line 1, compiler error
Outer.StaticInner in2 = Outer.new StaticInner(); // Line 2, compiler error
NonStaticInner in3 = new Outer().new NonStaticInner(); // Line 3
Outer.NonStaticInner in4 = new Outer().new NonStaticInner(); //Line 4
}
}
Line 1 and Line 2 gives compiler error. I donot understand why??
Line 3 and Line 4 defines variables for Inner classes in 2 different ways and it compiles ok. I donot understand the difference between the two.
Can any body help please..
Regards
Vicky
What coding style does the exam have e.g.

I find the first one often confusing
V
[ Jess added UBB [code] tags to preserve whitespace -- check'em out! ]
[ November 12, 2003: Message edited by: Jessica Sant ]

Originally posted by Gavin Zijlstra:
Hello,

This works, however when you remove final, it doesn't.
Does anyone knows why?
Regards,
Gavin
[ November 12, 2003: Message edited by: Gavin Zijlstra ]



It works because its a compile time constant. If a compile time constant is within range you can assign it and the compiler will be happy.
In the above code 100 is within the range of byte so the compiler does not complain.
V
I have got the K & B book. I would like to know the steps to download the Bonus Master Exam .
Can anybody please help me.
Regards
Vicky
18 years ago