go to link : Find camera digital ,hd camcorder , led lcd hdtv , Find camera digital ,hd camcorder , led lcd hdtv ,
Tuesday, March 29, 2011
Creating Servlet Filters with Rational Application Developer
You can find the original, high resolution video tutorial on creating Java ServletFilters right here: jpa.thebookonhibernate.com Creating a Custom Servlet Filter Thisfree, multimedia tutorial shows you how to use IBM's Rational Application Developer (IRAD) 6.0 to create a Servlet Filter. The web.xml file is then edited to apply the filter to the CountrySnooperServlet, to ensure that only true, patriotic Americans actually get to see the output of the CountrySnooperServlet. We also add in a little TimeStamping or Time Logging functionality, but that's neither here nor there. If you found something helpful here, please do your part and help support the site. Link to us, buy some books, support our sponsors, tell your developer friends about us, and remember: Happy Java! package com.examscam.web.filter; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; public class AmericanFilter implements Filter { public void init(FilterConfig arg0) throws ServletException { // TODO Auto-generated method stub } public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String language = request.getLocale().getDisplayLanguage(); if (language!="Spanish") { response.getWriter().print("Only people speaking American can view this Servlet ...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment