简体   繁体   English

带有JSP的Spring MVC

[英]Spring MVC with JSP

Are there any sample / tutorial on Spring MVC with JSP without using Tag Libraries. 在不使用标签库的情况下,是否有关于带有JSP的Spring MVC的示例/教程。 Pure JSP. 纯JSP。 I am not conversant with Tag Libraries and I am good with JSP. 我不熟悉Tag Libraries,并且对JSP很好。 So I would like to see if there are any examples and tutorials using pure JSP without ANY tag libraries. 因此,我想看看是否有没有使用任何标记库的使用纯JSP的示例和教程。

I don't mean to say this in a degrading manner, but if you are good with JSP, you should be able to pick up the Spring MVC tags easily. 我并不是要用贬义的方式讲这句话,但是如果您对JSP感到满意,那么您应该能够轻松使用Spring MVC标记。 JSP, custom tags and ELs go hand-in-hand. JSP,自定义标签和EL齐头并进。 They are created for a reason: to make your life simpler. 创建它们的原因是:使您的生活更简单。 A quick example, if you use Spring MVC's form tag , Spring MVC will automatically prefill the form fields for you based on the data you have in the model. 一个简单的例子,如果您使用Spring MVC的form标签 ,Spring MVC将根据模型中的数据自动为您预填充表单字段。 Think about how tedious your code will be to prefill the checkboxes/radiobuttons or preselect the drop down lists. 考虑一下您的代码预填充复选框/单选按钮或预选择下拉列表将多么繁琐。

If you are also Spring Security, the provided custom tags allow you to easily control what data to be displayed based on the user roles. 如果您也是Spring Security,则提供的自定义标签使您可以轻松地根据用户角色控制要显示的数据。

Writing all of that using pure JSP don't even make sense to me... not to mention the amount of time wasted writing less than perfect home grown solutions. 使用纯JSP编写所有这些内容对我来说甚至都没有意义……更不用说浪费时间写少于完美的家庭解决方案了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM