Win a copy of Emmy in the Key of Code this week in the General Computing forum!

senthil kumaar

Greenhorn
+ Follow
since Apr 26, 2001
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 senthil kumaar

problem with response.setDateHeader("Expires", ...)
I included the line response.setDateHeader("Expires", System.currentTimeMillis() + 60000); in my servlet to clear my cache after 1 min.
When I did this with weblogic5.1 server it immediately clears my cache, if I try the same with Pramati Server it is working fine.
Can anyone help me to achieve the same in weblogic5.1

Thanx in advance
Senthil
16 years ago
Hi All,
I done my pages using JSP and backend as Oracle 9i. Is it possible to get reports in the browser using JSP?? if so, how to?
Thanx in advance
Senthil
17 years ago
JSP
Hi all,
I'm using Apache which is running in windows2000 to process my jsp and servlet pages. For some requests, my apache server abruptly shuts down with the following error message in the error log file.
can anybody help me in sorting the problem
[Wed Jan 09 20:57:50 2002] [crit] (10038)An operation was attempted on something that is not a socket: Parent: WSADuplicateSocket failed for socket 144.
[Wed Jan 09 20:57:50 2002] [error] (2)No such file or directory: master_main: create child process failed. Exiting.
[Wed Jan 09 20:58:50 2002] [error] forcing termination of child #0 (handle 684)

Thnx in Advance
Senthil
17 years ago
JSP
Hi Bosun,
Thanx for ur reply.
I don't want the user to view the entire code(including html).
senthil
18 years ago
Hi all,
Is there any way to prevent user from viewing sources ??
thanx in advance
senthil
18 years ago
the place where boolean var (x) is placed is for condition, which inturn return boolean value (true/false), using this value var (a)is assigned.
In this program instead of giving the condition, they directly given the boolean var (x), using the value of x it will assign the value to var (a).
[This message has been edited by senthil kumaar (edited May 04, 2001).]
Hi Nitin,
I think u got confused with this line.
a = x ? 1: 2;
which is indicated in red is condition
which is indicated in blue is the value to be assigned to var a.
I hope u understand.
Ok vivek, if that is the case then
String s="java";
String s5=s+"";
System.out.println(s==s5); // output true

then the o/p of this should be false, but it is giving true.

[This message has been edited by senthil kumaar (edited May 04, 2001).]
Hi,
public class TestString
{
public static void main(String[] args)
{
String s="java";
String s1="ja";
String s2="va";
String s3="ja"+"va";
String s4=s1+s2;
String s5=s+"";
System.out.println(s==s3);// output true
System.out.println(s==s4);// output false
System.out.println(s==s5);// output true
}
}

Plz, explain me(in detail) why I'm getting this output.
Thanx in advance
senthil
Hi sandhya,
public void amethod()
{
int i = 99;
ValHold v = new ValHold();
v.i=30;
another(v,i);
System.out.println(v.i);
}//End of amethod
public void another(ValHold v, int i)
{
i=0;
v.i = 20;
ValHold vh = new ValHold();
v = vh;
System.out.println(v.i+ " "+i);
}

In another(), the object ValHold is ref by a local ref.variable v, and that local ref.varible is now assigned to another object in another().
But, the ref.variable present in amethod() is still pointing the same object.So, u got the result as 10 0 20.
I think u r confused with 2 ref.variable with same name (v).
[This message has been edited by senthil kumaar (edited May 02, 2001).]

class Test
{
static int maxElements;
Test(int maxElements)
{
this.maxElements = maxElements;
}
public boolean equals(Test b)
{
if(maxElements==b.maxElements)
return true;
else
return false;
}
}
public class qequals
{
public static void main(String[] args)
{
Test a = new Test(100);
Test b = new Test(100);
if(a.equals(b))
System.out.println("Objects have the same values");
else
System.out.println("Objects have different values");
}
}
Actually the StringBuffer class doesn't override the method equals(), so if u invoke a method equals() in StringBuffer which inturn calls the equals() present in Object class, in Object class the equals() check only that both the refernces are pointing to the same Object.
Because of this if u got the result as false.