File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes how to invoke servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

how to invoke servlet

Dhanashree Mankar
Ranch Hand

Joined: Aug 25, 2003
Posts: 123
Now i am getting a common problem of invoking a servlet. I checked many of discussions but i don't understand so please help me out.
First i tried with http:/localhost:8080 but it was not doing. So i changed port to 80
and now i wrote http://localhost/servlet/heolloworld but still not getting.
I am using pws but i stopped it initially.
so plz guide me
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
Well, I am assuming you are using tomcat based on your previous post error with compiling servlet
Did you startup tomcat by executing the startup.bat file located in the %tomcat_home%\bin? After tomcat comes up you should be able to access tomcat's index page through the url http://localhost:8080/. Tomcat uses the port number 8080 by default. This is a good test to see if tomcat is running correctly. Also the index page has several JSP/Servlet examples for you to look at.
Craig.
Dhanashree Mankar
Ranch Hand

Joined: Aug 25, 2003
Posts: 123
Did you startup tomcat by executing the startup.bat file located in the %tomcat_home%\bin? After tomcat comes up you should be able to access tomcat's index page through the url http://localhost:8080/. Tomcat uses the port number 8080 by default. This is a good test to see if tomcat is running correctly. Also the index page has several JSP/Servlet examples for you to look at.
Craig.[/QB]
--------------------------------------------------------------------------
Well my tomcat server is starting properly and servlet is also compiling properly.But http://localhost:8080 is giving error
plz help
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
What is the error? Can you provide the error? Also are you using port number 8080 for anything else?
Craig.
Dhanashree Mankar
Ranch Hand

Joined: Aug 25, 2003
Posts: 123
I am not using 8080 to any other purpose
error is:
Problem Report There was a communication problem.

Message ID TCP_ERROR

Problem Description The system was unable to communicate with the server.

Possible Problem Cause The Web server may be down.
The Web server may be too busy.
The Web server may be experiencing other
problems, preventing it from responding
to clients.
The communication path may
be experiencing problems.

Possible Solution Try connecting to this server later.
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
Also one more thing, I noticed you stated on your other post:
I installed tomcat3.3 successfully

How old is that version? That version must be pretty old. That could be one of your problems. I would install one of the latest versions, i.e. Tomcat 4+ or Tomcat 5+(which I believe they started calling it catalina).
Hope this helps.
Craig
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
Or have one of the moderators move this post to the Apache/Tomcat forum. I am not familiar with the structure of Tomcat3+. That forum may provide you with a better solution to your problems.
Craig.
Dhanashree Mankar
Ranch Hand

Joined: Aug 25, 2003
Posts: 123
Originally posted by cj jack:
Or have one of the moderators move this post to the Apache/Tomcat forum. I am not familiar with the structure of Tomcat3+. That forum may provide you with a better solution to your problems.
Craig.

-----------------------------------------------------------------------
Is my problem is bcz ofold version?
plz help.I don't have any other source to solve this problem. So plz guide me
Dhanashree Mankar
Ranch Hand

Joined: Aug 25, 2003
Posts: 123
PLEASE HELP
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
Originally posted by Dhanashree Mankar:

-----------------------------------------------------------------------
Is my problem is bcz ofold version?

You're the only one who can find that out. download tomcat and test it! let us know how it goes...


I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Dhanashree Mankar
Ranch Hand

Joined: Aug 25, 2003
Posts: 123
Originally posted by Andres Gonzalez:

You're the only one who can find that out. download tomcat and test it! let us know how it goes...

---------------------------------------------------------------------------
Now ihave downloaded tomcat 5 And everything is set now. But when i started startup.bat It gave some syntax error and new window opened and immediatey disappeared. What does this mean?
Dhanashree Mankar
Ranch Hand

Joined: Aug 25, 2003
Posts: 123
This is classpath setting:
set CATALINA_HOME=c:\tomcat
set JAVA_HOME=C:\jdk1.3
set PATH=c:\jdk1.3\bin;
set CLASSPATH=.;c:\jdk1.3\jre\lib\rt.jar;
set CLASSPATH=.;C:\tomcat\common\lib\servlet.jar;%CLASSPATH%
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 641
Dhanashree,
Have you renamed your directory ?? As it must be something like
jakarta-tomcat5.something something.
Also check your log files in tomcat/logs folder,for the exception.
Cheers
Praful


All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Dhanashree Mankar
Ranch Hand

Joined: Aug 25, 2003
Posts: 123
Originally posted by Praful Thakare:
Dhanashree,
Have you renamed your directory ?? As it must be something like
jakarta-tomcat5.something something.
Also check your log files in tomcat/logs folder,for the exception.
Cheers
Praful

------------------------------------------------------------------------
Yes i renamed directory to tomcat.but i am not getting any log folder here
plz help
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

I am closing this, as you've asked this question in Apache/Tomcat (the proper forum).

The window flashing on then off quickly has been discussed there many times, so trying searching that forum for "window closes"

Also, be sure IE has 'friendly' error messages turned off.

and finally, read the Tomcat FAQ for 404 errors:
here
[ November 20, 2003: Message edited by: Mike Curwen ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to invoke servlet