Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

running

 
syam
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i wrote a servlet to print "hi".
it is running well.
but if i put that servlet in a package p;
and try to run that 404 error is coming.
why?
what should we do?
help needed
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to call the servlet in this way.
http://localhost:8080/yourApplnName/servlet/a.b.c.AMSServlet
Where AMSServlet is under "a.b.c" package. In other words, the first noncomment java code inside AMSServlet.java is package a.b.c;
regds
maha anna
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"syam",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic