What is the Java equivalent to ASP.NET Http Modules?

泄露秘密 提交于 2019-12-22 13:57:05

问题


I'm considering rewriting a small Http Module i made in ASP.NET in Java. Based on a specific URL, the Http Module inserts some HTML on an empty HTML layout, do some basic reformatting, and finally returns the rendered HTML.

Being new to Java web development, what is the equivalent to ASP.NET Http Modules?


回答1:


The equivalent of HTTP Modules in ASP.NET would be Filters in Java Servlet API 2.3+.




回答2:


Make sure to take a look at the following frameworks if you intend to apply styles and formatting to your pages:

  • SiteMesh
  • Facelets

You know, it's a 3rd-party framework world in Java, in contrast to one-party always-Microsoft world in dot NET... first search for a framework that does what you need; then look for comparisons of the 100s of frameworks that you found; then ask a question in a Stackoverflow about which one is better; then get confused by reading the contradicting answers and write your own tool ;-)



来源:https://stackoverflow.com/questions/2080208/what-is-the-java-equivalent-to-asp-net-http-modules

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!