Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #39819 > unrolled thread
| Started by | Ralf Schneider <schneiderrx@freenet.de> |
|---|---|
| First post | 2022-08-12 17:10 +0000 |
| Last post | 2022-08-16 19:11 -0400 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.lang.java.programmer
Question about JSP Ralf Schneider <schneiderrx@freenet.de> - 2022-08-12 17:10 +0000
Re: Question about JSP "e.d.pro...@gmail.com" <e.d.programmer@gmail.com> - 2022-08-15 12:01 -0700
Re: Question about JSP Ralf Schneider <schneiderrx@freenet.de> - 2022-08-16 08:20 +0000
Re: Question about JSP Arne Vajhøj <arne@vajhoej.dk> - 2022-08-16 19:11 -0400
| From | Ralf Schneider <schneiderrx@freenet.de> |
|---|---|
| Date | 2022-08-12 17:10 +0000 |
| Subject | Question about JSP |
| Message-ID | <td61h9$5bcg$1@gwaiyur.mb-net.net> |
Dear All, one Question I have about JSP files: Are they old fashioned today as some people say or is this only one opinion from many others ? I will write web pages with Spring and I don't want to mix JSP files with thymeleaf/html pages. Best regards. Ralf
[toc] | [next] | [standalone]
| From | "e.d.pro...@gmail.com" <e.d.programmer@gmail.com> |
|---|---|
| Date | 2022-08-15 12:01 -0700 |
| Message-ID | <56b3b21e-0fb9-428a-9709-195f048086b2n@googlegroups.com> |
| In reply to | #39819 |
> one Question I have about JSP files: Are they old fashioned today as some > people say or is this only one opinion from many others ? > Web apps tend to start with JSP files. I don't know what you mean by old fashioned; it does support a lot of syntax which is currently not recommended. If you write clean tags with expression language (EL) and libraries (JSTL), it works fine. If you're starting a clean new app, I think you can avoid JSP. JSP files can call other code, other code doesn't do so well calling JSP files, so maybe unavoidable working with an existing app already full of JSPs. JSP is all back end. There's a pre-process that turns it into a .java file when the servlet gets a request for it. That Java program runs all back end code first (you can write Java code in a JSP file using scriptlets but there is a better way now). Then it kicks off any in-line Javascript code. Then it sends any html code to the front end and loads that. If you want to do back end code before the JSP loads and avoid the scriptlets, you can save the JSP file somewhere other than the default web path, catch the requests with a servlet, set pass values using EL, then forward the request to the JSP file. It is probably best to avoid JSP files if nothing in the app is forcing the use of them. If you can write them clean, they're basically fancy HTML, but can still be harder to debug.
[toc] | [prev] | [next] | [standalone]
| From | Ralf Schneider <schneiderrx@freenet.de> |
|---|---|
| Date | 2022-08-16 08:20 +0000 |
| Message-ID | <tdfk0c$17u08$1@gwaiyur.mb-net.net> |
| In reply to | #39820 |
Am Mon, 15 Aug 2022 12:01:57 -0700 (PDT) schrieb e.d.pro...@gmail.com: > If you're starting a clean new app, I think you can avoid JSP. > It is probably best to avoid JSP files if nothing in the app is forcing > the use of them. That is what I will do. Thank you for your explanation.
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2022-08-16 19:11 -0400 |
| Message-ID | <tdh880$akn$1@gioia.aioe.org> |
| In reply to | #39819 |
On 8/12/2022 1:10 PM, Ralf Schneider wrote: > one Question I have about JSP files: Are they old fashioned today as some > people say or is this only one opinion from many others ? > > I will write web pages with Spring and I don't want to mix JSP files with > thymeleaf/html pages. JSP is an old technology. But it is also a somewhat foundational technology for Java web development. I will claim that all Java web developers should know JSP. So you should definitely learn JSP. Whether you should use JSP for a project will depend on the framework choice. DIY framework: I would say go for JSP - it is simple and easy. JSF: definitely facelet - JSP is officially obsolete and lots of JSF stuff does not work with JSP. Spring MVC: different people have different preferences - some like JSP - some like Thymeleaf - you pick what you like (or you pick what has already been chose if it is an existing application). Arne
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web