同时使用JSF和JSP是否很好 [英] Is it good to use JSF and JSP in same time

查看:54
本文介绍了同时使用JSF和JSP是否很好的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始编程,我试图创建一个简单的网站来预订电影票.因此,我为admin主页,user主页,login页面和register页面创建了JSP页面.我只想知道,因为我现在想为我的网站创建主页,并且我想将所有这些页面存储在该主页中,以便用户可以从一个页面跳转到另一个页面.所以我的问题是,使用JSP在mysql上登录和注册表单是否很好,对于主页,应该使用JSF还是JSP?

Im begginer at programming and im trying to create one simple site for booking movie tickets. So i created JSP pages for admin home page, user home page, login page and register page. I just want to know, because I want to now make home page for my site and I want to store all this pages in that home page so users can jump form one to another. So my question is, is it good to use JSP for login and register forms with mysql, and for home page, should I use JSF or JSP?

推荐答案

在整个站点中,我只会坚持使用其中一个.请记住,JSF在下面使用JSP.您可以将JSP视为JSF的构建块.因此,如果您决定使用JSF,则将在JSF视图中使用JSP.

I would stick to only one of them in the whole site. Do keep in mind that JSF uses JSP underneath. You can think of JSP as a building block for JSF. So, if you decide to use JSF, you will be using JSP in your JSF views.

我个人不喜欢JSF样式编程.它可能与您的网站的某些JavaScript使用冲突,并且如果您对框架没有足够的经验和知识,则可能难以跟踪错误.但这只是我的经验.

I personally don't like JSF style programming. It might conflict with some JavaScript usage of your site, and tracking down errors might be difficult if you don't have enough experience and knowledge of the framework. But that is just my experience.

如果我是你,我会选择:

If I were you, I would pick from:

a)Servlet控制器和JSP视图

a) Servlet Controllers and JSP VIEWS

b)具有JSP VIEWS的SpringMVC控制器.

b) SpringMVC Controllers with JSP VIEWS.

这篇关于同时使用JSF和JSP是否很好的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆