Aashu Rao

Greenhorn
+ Follow
since Nov 28, 2004
Merit badge: grant badges
For More
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 Aashu Rao

Hi,
Thanks for the quick reply . I use windows 98 so I can't see all the errors in console.... the last part after starting the server is like this....


at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316
)
at org.apache.catalina.core.StandardService.start(StandardService.java:4
50)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:214
3)
at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
Apr 16, 2005 10:41:33 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Apr 16, 2005 10:41:33 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Apr 16, 2005 10:41:33 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/60 config=C:\Program Files\Apache Group\Tomcat 4.1
\conf\jk2.properties



I can view the web.xml file when I m online. And offline I can see the page only after commenting the DOCTYPE statement. Is it ok if I comment that statement. But I think that statement is a must.
I donno much about XML.
So please let me know if I m missing something.

Thanks and regards,
R.Aashu
18 years ago
Hi,
I have installed Tomcat, when I try to open web.xml I get this

error: Page cannot be displayed

The system cannot locate the resource specified. Error processing resource 'http://java.sun.com/dtd/web-app_2_3.dtd'.

when I commented this statement , I can view the page, but my server gives many errors on startup.
can anyone please tell me what is wrong !!!
I have windows 98 OS and Tomcat 4.1

thanks in advance,
R. Aashu
18 years ago
Hi,
This is the code I got from a mock,

interface Ques01 {
String str = " Ques01 " ;
}

class Ques02 {
String str = " Ques03 " ;
};

class Ques extends Ques02 implements Ques01 {
// String str = "Ques";
public static void main ( String args [ ] ) {
System . out . println ( str ) ;
}
}

We have 2 variables named str , 1 is a staic variable and the other instance variable.
I dont see the reference as ambiguous, coz str in print statement should refer to interface
static variable, then why does it gives this error ?

reference to str is ambiguous, both variable str in Ques02 and
variable str in Ques01 match
System . out . println ( str ) ;
^
Help please !

Thanks in advance,
Regards,
R.Aashu
Animesh,

Thanks a Lot for the explaination, I got it.
Actually I posted it here bymistake and was searching in SCJP forum.
he he he

Regards,
R.Aashu
19 years ago
Hello friends,

Can anyone please help me with explanation for this code ?


char i;
in:
for(i=0;i<5;i++) {
switch(i++) {
case '0': System.out.println("0");
case 1: System.out.println("1"); break in;
case 2: System.out.println("2"); break;
case 3: System.out.println("3");break;
case 4: System.out.println("4");
case '5': System.out.println("5");
}
}


the output is:
2
4
5

I am not getting the reason for this output.


Thanks and regards,
R.Aashu
19 years ago