• 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

Problems with JAVA webserver 2.0

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have downloaded the trial version of javawebserver2.0. I coded a small servlet test in c:\javawebserver2.0\servlets directory and compiled it and put the class file in the same directory. After starting the server i tried to run the servlet by
http://127.0.0.1:8080/servlets/test
and i was getting a status coded of 404 Requested URL not found.
Can any one help me in this regard.
Also can any one tell me how to code servlets (Which directory) in javawebserver2.0 and where the class file has to be.
Thanks a bunch
Chandar
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
take the "s" off "servlets", like this:
http://localhost:8080/servlet/test where test is the servlet's name.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
-------------------------------------------------------------
i think your URL should be http://localhost:8080/servlet/test
-------------------------------------------------------------
put your servlet i.e .class files in servlet directory only.
-------------------------------------------------------------
if you put your .class files in example directory then your
URL will be http;//localhost:8080/test only
-------------------------------------------------------------

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
once u wrote servlet and placed in servlets directory,u need to access it by http://127.0.0.1:8080/servlet/test and not by
http://127.0.0.1:8080/servlets/test.it is because servlets is a directory and each is a independent servlet in that directory.so
access by servlet and not by servlets in its URL

Originally posted by chandarv:
I have downloaded the trial version of javawebserver2.0. I coded a small servlet test in c:\javawebserver2.0\servlets directory and compiled it and put the class file in the same directory. After starting the server i tried to run the servlet by
http://127.0.0.1:8080/servlets/test
and i was getting a status coded of 404 Requested URL not found.
Can any one help me in this regard.
Also can any one tell me how to code servlets (Which directory) in javawebserver2.0 and where the class file has to be.
Thanks a bunch
Chandar


 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic