Web application security is the major security concern for e-business and information sharing communities. Research showed that more than 75% attacks are being deployed at application layer and almost 90% applications are vulnerable to these attacks. Various security mechanisms in the form of signature base models, anomaly detection, scanner, firewall and intrusion detection has been proposed but ineffective to provide complete security solution at application level. These provide partial solutions are ineffective to provide defense against zero day attacks with low false positive rate. We have introduced a novel approach for effective defenses against the application level attacks. Our system use the Bayesian filter to mitigate the context base attacks which are easily eludes packet level inspection. Our intelligent system is ontology base which analyze the input semantically and capable to detect zero day attacks with negligible false positive rates. The ontology base system can be refined and extended over time. Ontology base system also help in focusing on specific portion of network packet where attack is possible, thus reduce the research space and avoid sequential search.