• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where is servlet Folder?

 
Eric Wang
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All:
As we know, when we using Tomcat, all the class file should be under webapps\Root\WEB-INF\classes folder.
But when we type in the URL is http://localhost/servlet/anyfile.class
so how come I can't file the servlet folder under tomcat folder, but I can run my class file, no problem.
So my question is:
1. How come I can't find the folder, but I will be able to run the class file?
2. Does it define inside any file, can I change the servlet to other name?
Thanks for the help.
Eric
 
Ravee Bhat
Ranch Hand
Posts: 72
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey
the word 'servlet' is just a directive for your http server.
just to let it know it has to look for a class file.
regards
ravee.
 
Eric Wang
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ht Ravee Bhat:
Then mean there is not actual directory under Tomcat, am I right?
Then how come must be servlet, not other names?
I just want to know the flow only.
regards
Eric
 
Ravee Bhat
Ranch Hand
Posts: 72
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eric,
That is right. This directive maps requests to the default folder for the servlets. And you can configure this URL mapping for names other than 'servlet' for servlets anywhere else.
hope this helps.
regards
ravee.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic