Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

about tomcat 5

  Asked By: Jason    Date: Apr 18    Category: Java    Views: 718

I have copied my java class file("Hello.class")in the following
directory "\Tomcat 5.0\WEBAPPS\servlets-examples\WEB-INF\CLASSES\Hello".
Then start Tomcat 5 from "/bin/startup.bat".
Openned internet explorer . put url written as below
The messege "no resources found" is given by the browser.
But when i try 2 run their example class it gives desired result.
My Hello.java is totally correct . I copied it from "The complete
reference Java 2" by Herbert Schilt.
Plz help me.
plz tell me where i hav 2 copy my java class file & what will be the
url in my browser.



3 Answers Found

Answer #1    Answered By: Michael Evans     Answered On: Apr 18

The place you kept file  is right just type below in
the browser
it will run
Although folder name is different but even I have to
try for five hours to get the correct  syntax

Answer #2    Answered By: Woodrow Jones     Answered On: Apr 18

For Running The Serlet(.java) File Try These Url
The Problem is U Don't Not Use
in Your Url
For Servlet Running U Need To Give The New Created Folder (in Your Case
servlet-examples).Then Put Your Servlet .class File in
Then Use The Above Url You'll Get The Result

Answer #3    Answered By: Iris Sanders     Answered On: Apr 18

the procedure is as follows:-

1)execute the pgm to get .class file

2)copy .class file  to

if your tomcat  is in d:(assume)

d:\tomcat4.1\webapps\root\web-inf\class folder

if html file is also there then copy  html file to

d:\tomcat4.1\webapps\root folder

3)change the XML file and give the url  name

4)start tomcat server

5)call the servlet from the browser

and type the following in the html page

http://localhost:<port number>/<urlname>

Didn't find what you were looking for? Find more on about tomcat 5 Or get search suggestion and latest updates.