代替 web.xml 配置信息的框架 - jWebAnnotation
jWebAnnotation 是一個使用注解來代替 web.xml 配置信息的框架,這在有很多servlet的web應用中是非常有用的。
要使用 jWebAnnotation 需要在 web.xml 指定配置:
<servlet> <display-name>ControllerServlet</display-name> <servlet-name>ControllerServlet</servlet-name> <servlet-class>com.google.code.jwebannotation.WebAnnotationServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>ControllerServlet</servlet-name> <url-pattern>*.do</url-pattern> <url-pattern>/Index.do</url-pattern> </servlet-mapping> <listener> <listener-class>com.google.code.jwebannotation.WebAnnotationLifecycle</listener-class> </listener>
本文由用戶 fmms 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!