jsp与spring

     Believe it or not, JavaServer Pages has been the go-to view technology for Java-based
web applications for almost 15 years. Although it started out as an ugly, Java-centric
twist on similar templating technologies (such as Microsoft’s Active Server Pages), JSP
has evolved over the years to include support for an expression language and custom
tag libraries.
Spring supports JSP views in two ways:
InternalResourceViewResolver can be used to resolve view names into JSP
files. Moreover, if you’re using JavaServer Pages Standard Tag Library (JSTL)
tags in your JSP pages, InternalResourceViewResolver can resolve view names
into JSP files fronted by JstlView to expose JSTL locale and resource bundle
variables to JSTL’s formatting and message tags.
Spring provides two JSP tag libraries, one for form-to-model binding and one
providing general utility features.
Whether or not you use JSTL or intend to use Spring’s JSP tag libraries, it’s important
to configure a view resolver to resolve JSP views. Although a few of Spring’s other view
resolvers could be used to map view names to JSP files, InternalResourceViewResolver is the simplest and most commonly used view resolver for this task. We
touched on configuring InternalResourceViewResolver in chapter 5. But that was
done in haste just so you could exercise your controllers in a web browser. Let’s take a
closer look at InternalResourceViewResolver and see how to tweak it to do your
bidding.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值