hiçbir kolayca bunun için kasada özelliği yoktur
teşekkürler. Bir Filter
, tüm HTTP yöntemlerine uygulanacak ek yüke sahip değildir. Ancak, ek yükü olan Filter
kodunda bir mantık varsa, bu mantığı istenmeyen HTTP yöntemlerine uygulamamanız gerekir. Eğer json istekleri (post) i get üzerine yaptım ama nasıl yazılarda bunu yapmak için üzerine sql ve html için bahar escaper nasıl uygulanacağını bilebilir
public class HttpMethodFilter implements Filter
{
public void init(FilterConfig filterConfig) throws ServletException
{
}
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain filterChain) throws IOException, ServletException
{
HttpServletRequest httpRequest = (HttpServletRequest) request;
if(httpRequest.getMethod().equalsIgnoreCase("POST")){
}
filterChain.doFilter(request, response);
}
public void destroy()
{
}
}
hi: Burada
örnek kod? http://stackoverflow.com/questions/1812891/java-escape-string-to-prevent-sql-injection/39440337#39440337 adresine bakın. – shareef