• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

howto invoke servlet

 
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 834
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this is the code sample
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 834
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you , i manage to get it ....thks!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic