Figure 2-10. Standard servlet aliases These mappings provide
Figure 2-10. Standard servlet aliases These mappings provide some insight into how the Java Web Server uses its core servlets. You can see / invokes file, *.shtml invokes ssinclude, and /servlet invokes invoker. The most specific wildcard pattern is used, which is why /servlet uses the invokerservlet to launch a servlet instead of using the file servlet to return a file. You can change the default aliases or add new aliases. For example, changing the /servlet prefix would change the URL used to access servlets. Right now, we’re interested in adding another alias. You should add an alias that specifies that *.html invokes file, Deblink. After making this change, any file ending in .html is retrieved by the fileservlet and passed to Deblink. Try it yourself. Create a blinky.html file in server_root/public_html that is sprinkled with a few blink tags and try surfing to http://server:8080/blinky.html. If everything’s set up right, all evidence of the blink tags is removed. The Loophole This technique has one large loophole: not all HTML comes from files with the .html extension. For example, HTML can come from a file with the .htm extension or from some dynamically created HTML. We can work around multiple file extensions with more aliases. This, however, still doesn’t catch dynamic content. We need our second technique for creating a servlet chain to plug that hole. We really want to specify that all text/htmlcontent should pass through the Deblinkservlet. The JavaServer Administration Tool does not yet include a graphical way to do this. Instead, we can make the change with a simple edit of a properties file. The properties file can be found at server_root/properties/server/javawebserver/webpageservice/mimeservlets.properties. It contains directives like this: java-internal/parsed-html=ssinclude
Hint: If you are looking for high quality webhost to host and run your jsp application check Vision web hosting jsp services