wood burning stoves 2.0*
The moose likes Servlets and the fly likes Where is servlet Folder? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Where is servlet Folder?" Watch "Where is servlet Folder?" New topic
Author

Where is servlet Folder?

Eric Wang
Greenhorn

Joined: Dec 21, 2000
Posts: 22
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

Joined: Nov 26, 1999
Posts: 72

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

Joined: Dec 21, 2000
Posts: 22
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

Joined: Nov 26, 1999
Posts: 72

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Where is servlet Folder?
 
Similar Threads
How to set server.xml?
invoking a servlet
How to package a project and install in tomcat webapps?
How to "Hello World"?
Running Servlets, have a question