This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Servlet Security Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet Security" Watch "Servlet Security" New topic
Author

Servlet Security

Erik Pragt
Ranch Hand

Joined: Sep 08, 2001
Posts: 125
Hello everyone,
I have a question: Is it possible to invoke a servlet on every request on a webserver? For example, invoke the servlet when requesting http://<servername>/index.html, but also for http://<servername>/images/test.gif and for others files, like jsp, etc?
I want to create an authentication Servlet, and I tried to use the content types for this, but that is not really the solution. I really don't want to make use of a web.xml, for various reasons.
Any help would be highly appreciated!
Greetings,
Erik Pragt
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Sure it is. A servlet can generate any file that you might have a plain web server send. However, you will have to use web.xml to define how it is done. Web.xml is the basis for controlling Java web applications, you might as well get used to it.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet Security
 
Similar Threads
URL to servlet?
Change in servlet-class & servlet-name in web.xml not reflected? Why?
virtual hosts
Servlet Mapping vs Static resource
Servlet mapping