• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Servlets not running on web server  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I bought some webspace on Linux server with domainname say, www.somename.com. It had two directories: "cgi-bin", "servlets". The servlets directory is a link to "/www/htdocs/servlets/somename/ " where as the root directory for the website is "/www/htdocs/somename".
I copied my class files to the servlets directories(which run fine on local machine). It gives me 404 error when accessed with the url "http://www.somename.com/servlet/classname. What is wrong with it?

Now as I said the root dircetory for the website is "/www/htdocs/somename/" were I have index.htm etc.. Now there is a servlets directoy with in that root dir : /www/htdocs/somename/servlets/. I stored my servlets class files in this dir.. Now this servlet dir is a link to some dir. :/www/htdocs/servlets/somename/. Now u might see that the sites root dir is not with in the servlets directory, but a dir has been created with in servlets dir outside the sites root dir. and a link has been given form the site's servlets root dir to the dir :/www/htdocs/servlets/somename/ outside the sites root dir..

the dir hierarchy is
|----> Servlets----->somename
www---->htdocs---->| |(link)
|------>somename---->servlets
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Java Ranch has a naming policy, described here and "Gopinath G" is not a valid name. Please choose one which meets the requirements.
Thanks.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have access to the configuration files for the server? It's hard to tell what the problem is from looking at the file layout you show, which seems reasonable at a first glance.
Just in case it is a really easy problem, have you checked that the URL you are using is exactly the same splling and case as your servlet class? SOmetimes if you have been testing on a non-case-sensitive system like MS Windows, and move to a case-sensitive system like Unix or Linux this can catch you out.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!