如何让 Tiles 2 与 Spring MVC 3 Web 应用程序配合使用?
是否有一些易于遵循的教程,可供 Spring MVC 新手将 Tiles 2 添加到非常简单的应用程序?哎呀,我真的不在乎它是不是 Tiles 2。我只是无法忍受一遍又一遍地复制同一个 JSP。
我来自 Rails 世界,那里的分部非常简单。
我基本上只需要一个 main.jsp 文件,其中包含可以从其他 JSP 中替换的部分。
<咆哮> 我找到的每个教程都列出了数百行 XML,并假设我知道 viewResolvers、ContextLoadListeners 和 JohnsonRods 是什么。我意识到我还有很多东西要学。我很自豪,仅 3 天后我就得到了干净的 url 和带注释的控制器。但作为一名 C# 和 Ruby 开发人员,我发现 Java Web 编程很痛苦。 (顺便说一句,我的日常工作让我转向 Java,这就是为什么我必须承受痛苦..lol) < /咆哮>
感谢您的任何帮助。
Is there some easy to follow tutorial for a Spring MVC newbie to add Tiles 2 to a very simple application? Heck, I don't really care if it's Tiles 2. I just can't stand copying the same JSP over and over.
I come from the Rails world where partials are dirt simple.
I basically just need a main.jsp file that contains sections that I can replace from other JSP's.
< rant >
Every tutorial I find lists what seems like hundreds of lines of XML and assumes I know what viewResolvers, ContextLoadListeners and JohnsonRods are. I realize I have a lot to learn. I'm proud that after only 3 days I got clean urls and annotated controllers working. But being a C# and Ruby developer, I'm finding Java web programming painful. (btw, my day time job is moving me to Java that's why I must suffer the pain..lol)
< /rant >
Thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许你应该尝试Spring Roo。它生成的webapp使用Tiles2。
您还可以查看本教程 有帮助。
Perhaps you should try Spring Roo,. The webapp generated by it uses Tiles2.
You could also see if this tutorial helps.
结束这个。有人告诉我改用 Struts 1...:-/
Closing this. I was told to use Struts 1 instead... :-/