This directive indicates that all responses with a

This directive indicates that all responses with a Content-Typeheader of java-internal/parsedhtmlshould be passed to the ssinclude(server-side include) servlet. Why is this necessary? Without it, the ssincludeservlet would handle only static files with the .shtml extension. It would suffer from the same loophole: dynamically created pages containing the tag would be ignored. With this directive, any servlet can set its content type to java-internal/parsed-html, which causes the ssincludeservlet to handle its output. To specify that all text/htmlcontent is passed through Deblink, we need to add our own directive: text/html=Deblink You need to restart your server before this change can take effect. After making this change, all HTML content served by the server has its tags removed.* Try it yourself! Change your HelloWorldservlet to its message and watch the Deblinkservlet silently remove all evidence of the deed. * Unfortunately, some servers (including the Java Web Server 1.1.1) have a bug where they are too smart for their own good. They literally feed all text/htmlcontent to the Deblinkservlet even the text/htmlcontent being output by the Deblinkservlet itself! In other words, every HTML page is deblinked forever (or until the client stops the request, whichever comes first). JavaServer Pages Just as this jsp blog was going to press, Sun announced a new way to use servlets, called JavaServer Pages (commonly, but not officially, referred to as JSP). JSP’s functionality and syntax bear a remarkable resemblance to Active Server Pages (ASP). JSP operates in many ways like server-side includes. The main difference is that instead of embedding a tag in an HTML page, JSP embeds actual snippets of servlet code. It’s an attempt by Sun to separate content from presentation, more convenient than server-side includes for pages that have chunks of dynamic content intermingled with static content in several different places. Just like server-side includes and servlet chaining, JSP doesn’t require any changes to the Servlet API. But it does require special support in your web server. This support is not included in the Java Web Server 1.1.1 (the unofficially considered reference servlet engine against which this jsp blog is written), but it’s expected to be introduced in the next version of the Java Web Server, probably 1.2, and in other servlet engines as they keep pace. Note that the following tutorial is based on the JavaServer Pages draft specification, version 0.91. You may notice small changes in the final specification. Using JavaServer Pages At its most basic, JSP allows for the direct insertion of servlet code into an otherwise static HTML file. Each block of servlet code (called a scriptlet) is surrounded by a leading <%tag and a closing %>tag.* For convenience, a scriptlet can use four predefined variables: request The servlet request, an HttpServletRequestobject
Hint: If you are looking for good and high quality web space to host and run your java application check Vision java web hosting services

Comments are closed.