aspose file tools*
The moose likes Tomcat and the fly likes howto invoke servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "howto invoke servlet" Watch "howto invoke servlet" New topic
Author

howto invoke servlet

Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
hi, i have configure to host my web application under c:\test
now, i want to invoke servlet which i put it under c:\test\web-inf\classes\servlet\myservlet , and the servlet name is HelloWWW2 ,
my problem is i couldn't invoke it by this command in browser ,
http://localhost/test/servlet/myservlet.HelloWWW2
am i using the right command ?
or anyone can guide me by very beginning explanation, i'm really dummy here
note: i have modify port number to 80 , so i didn't use localhost:8080

thks in advance for answering !
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
this is the code sample
Niti Auekittiroj
Greenhorn

Joined: Dec 31, 2003
Posts: 7
The way you invoke servlet with
http://localhost/test/servlet/myservlet.HelloWWW2
is correct
But your servlet must place under folder "classes"
and folder's name WEB-INF must be uppercase
The result is this path
c:\test\WEB-INF\classes\myservlet
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Also, save yourself trouble and grief (down the road) by reading up on the Invoker.

http://test.javaranch.com/wiki/view?InvokerServlet
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
thank you , i manage to get it ....thks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: howto invoke servlet