0

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?

Jasper de Vries
  • 19,370
  • 6
  • 64
  • 102
  • That is not the answer to my question. –  Aug 05 '20 at 14:00
  • It is a duplicate of your question as it stands (specifically you title). Unless you make the question more clear why you end the question with a different question than in the title, the duplicate has all the info – Kukeltje Aug 05 '20 at 15:01

1 Answers1

-4

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.

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 Controllers and JSP VIEWS

or,

b) SpringMVC Controllers with JSP VIEWS.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Pablo Santa Cruz
  • 176,835
  • 32
  • 241
  • 292
  • Thank you. I think I will use JSF because I will automatically generate JSF pages from the entity later. Is it safe to transform JSP into JSF pages? –  Aug 05 '20 at 14:02
  • It should be. Never tried though. – Pablo Santa Cruz Aug 05 '20 at 14:26
  • 1
    Uhhhhhh 1:JSF does in very little ways conflict with javascript usage in pages. Not in my pages (and I don't need a lot of added javascript). Component frameworks like PrimeFaces MIGHT but not more or less than any other javascript based components, even angular ones or whatever. 2: Using JSP with JSF has beeen looooooong deprected... (see the proposed duplicate of the question, https://stackoverflow.com/questions/7914660/what-is-the-difference-between-creating-jsf-pages-with-jsp-or-xhtml-or-jsf-ex) 3: why servlet controllers and not jaxrs?, sorry but this is imo a bad answer in multiple ways. – Kukeltje Aug 05 '20 at 14:59
  • So its better for me to use JSF instead of JSP? As I said, im building little web application for booking movie ticket, home page, login and register, admin to add movie records and user to book them. Thats it. –  Aug 05 '20 at 15:06
  • 1
    @JelenaIvanovic Well, yes and no, JSP and JSF are different things. In the early days (more than 10 years ago) JSP was used a the technical 'view definition' layer for JSF. Within JSF 1.2 already superceeded by facelets. JSP by itself still has its place when e.g. using it with pure javascript based ui frameworks just not with JSF. If you want to use JSF, don't use it with JSP, if you want to use JSP (with something else) then don't use JSF – Kukeltje Aug 05 '20 at 17:26