Narasimha Sharma

Greenhorn
+ Follow
since Jul 04, 2011
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 Narasimha Sharma

I get this error: when I type http://localhost:8080 in my firefox address bar

Unable to connect
Firefox can't establish a connection to the server at localhost:8080
12 years ago
Since you are calling a constructor of a class using super() or this(), you don't have an object of that class yet.. So, you don't have access to instance variables or methods of that class. So, while instantiating a class using super() or this(), you have access only to their static members since they are loaded when jvm loads the class.

For eg:

class sample
{

static int a=10;

int b=11;

sample(int x)
{
//Something
}

sample()
{
this(a); Is Correct !
this(b); Is Incorrect ! (Both inserted individually)
}

}
12 years ago
Thanks Bear !! It worked when I moved the folder to webapps rather than webapps->ROOT ..

Thanks Tom for the welcome !!
12 years ago
Hi.. I've also cleared OCJP (on June 23rd). I haven't got my kit yet.

But, after writing my exam, i've registered my profile in certview.oracle.com. There I could see the shipment created on June 26th. So, I'm waiting for my kit !!

How many days it would take generally to get it ? The site says utmost 45 days.. But, earlier it was around 30 days. Some one could clarify this !

12 years ago
Hi..

I'm trying to install Tomcat5.5 on Suse Linux 10.1 OS. But it doesn't work.

I've untar'ed the core version of tomcat 5.5( apache-tomcat-5.5.33.tar.gz ). I've run startup.sh script in ~/tomcat/bin/ using ROOT login.

It gives me this output:

/opt/Narasimha/SCWCD/tomcat/bin> ./startup.sh
Using CATALINA_BASE: /opt/Narasimha/SCWCD/tomcat
Using CATALINA_HOME: /opt/Narasimha/SCWCD/tomcat
Using CATALINA_TMPDIR: /opt/Narasimha/SCWCD/tomcat/temp
Using JRE_HOME: /usr/lib/jvm/java/jre
Using CLASSPATH: /opt/Narasimha/SCWCD/tomcat/bin/bootstrap.jar

But when I check the browser by http://localhost:8080, I don't get the Tomcat welcome page. Where did I go wrong ?

I've tried installing it in windows. There is a "tomcat5w.exe" file with which I have started the service. So, Is there anything else that I need to do to enable it in Linux ?
12 years ago
Hi...

I'm using tomcat 5.5 for the first time. I have a jdk6 installed in my system. When I try to deploy a servlet, it is not getting picked up in the browser.

I have created a directory structure like this

WebApps
|
|
V
ROOT
|
|
---Sample
|
|
---index.html
|
WEB-INF
|
---web.xml
|
classes
|
----HelloServlet.class




This is a copy of my web.xml :

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>

<servlet>
<servlet-name>myHello</servlet-name>
<servlet-class>HelloServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>myHello</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>

</web-app>


Link Tag my index.html :

<A HREF="hello">Run HelloServlet</A>


I get this error when I click the "Run HelloServlet" link :

HTTP Status 404 - /Sample/hello

type Status report

message /ch1/hello

description The requested resource (/ch1/hello) is not available.
Apache Tomcat/5.5.33


12 years ago